-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Fixed init of the main thread #298
Conversation
I have not noticed this issue on Mac. How can I try to reproduce it? Also, which CI jobs failed due to this issue? |
It is random, depends what thread (main or worker) is first, but have a look at one of the many attempts in #296 , but it did not appear there first, I have seen that before, but just re-running the job saved the day usually. |
I also haven't noticed this, does it happens with reading from files only? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you! LGTM
(I do not know how to reproduce this bug but I've seen it pop up in other tests)
Here is an example of this failure on |
I believe it can happen with any input, we just reproduced that with @v-dobrev on his Mac with an extra |
@tzanio, here's a diff on diff --git a/glvis.cpp b/glvis.cpp
index 67d755e..9c255e9 100644
--- a/glvis.cpp
+++ b/glvis.cpp
@@ -1498,6 +1498,7 @@ int main (int argc, char *argv[])
return 1;
}
+ std::this_thread::sleep_for(std::chrono::milliseconds{100});
SDLMainLoop();
return 0;
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks @najlkin!
Okay, thanks guys. I trust you |
This PR fixes initialization of the main thread object, which was sometimes happening in a non-main thread first and as it calls
SDL_Init()
, it was causing crashes on Mac (including CI runners ❗ ).