-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix some crashes #74
Fix some crashes #74
Conversation
Thanks. I'm willing to merge both changes, but a bit of due diligence first. How are you encountering the Do you have a small test case for the segfault? If it's originating from GLFW, then I'd like to report it upstream. Are there possible side-effects to the |
Both errors cropped up in response to me closing the window---by me clicking on the close button with the mouse, not by issuing a Like I said in the commit message (I should have copied it into the text above), I've seen As far as the segfault goes, I could get that to happen relatively reliably with some of the examples in GLVisualize (run them once, close the window, then run them again). My suspicion is that the use of CC @SimonDanisch. |
I can confirm both errors ;) I must admit, that I fixed the `InexactError locally and forgot about it :D |
At least on Linux, this ccall can return numbers that are not 0 or 1 (I've seen 189).
OK, @jayschwa I added tests for both issues. The first commit should be completely uncontroversial. The second is basically a way of circumventing a bug in a user's @SimonDanisch, the bug that triggers the segfault in many of the GLVisualize examples has the direct fix in JuliaGL/GLWindow.jl#26; that should be applied no matter what happens to the 2nd commit here. |
👍 on first commit. I'll defer to @SimonDanisch on the second since I guess it depends on what happens in his other packages. |
I think this is a fair temporary fix! I'll look deeper into the issue when I clean up context handling and event management! |
@SimonDanisch, since JuliaGL/GLWindow.jl#26 is merged, should I drop the second? |
Wow, quite a coincidence of timing. If I understand correctly, we should keep both, so I guess this could be merged. |
Thanks for the contribution @timholy. Thanks for weighing in @SimonDanisch. I'll tag a point release from master this weekend. |
This fixes two problems (observed on Linux w/ NVIDIA drivers):
Bool(x)
produces anInexactError
ifx != 0 && x != 1
yield()
before destroying the window allows any already-scheduled drawing operations to occur, preventing an error like: