-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Assertion failure while waking from sleep on MacOS #5683
Comments
This is needed for multi-viewport support. |
This might just be a quirk of how macOS handles monitors during standby:
GLFW on macOS filters out displays which are asleep. This seems reasonable, but according to the quirk described above that sounds like that creates a brief moment in time where GLFW could report 0 monitors. Ignoring the assert is definitely wrong, but maybe it'd be reasonable for the GLFW backend to just ignore the monitor change event when |
I agree, that sounds good (with a comment and # ref to explain why) |
Any plans for a fix? This does happen still. |
I don't want to hijack this issue, but I'm getting the same assert if you try to use the
|
Hi, I did manage to fix this particular issue by adding the following code to
I wanted to do a pull request but I'm pretty new to versioning and got confused by how git works... |
This specifically was an issue with the backend erroneously setting I'm going to look at this on a Mac later. |
I couldn't find a way to repro the main/first issue on a Mac here. |
Happens on my MacBook Pro (15-inch, 2016), MacOS Monterey 12.6.3 when waking from sleep (though not deterministically). I did not yet see it on a more recent M1 mac. |
happens on the M2 as well, but less frequently. |
I couldn't repro this but applied the suggested fix nonetheless : 19b436f . |
Sorry to bring up an closed issue but this commit |
Apologies for the typo, pushed fix 2e810d5 (first time I do a code edit directly on github!). |
Version: 1.89 (Docking)
Back-ends:
imgui_impl_glfw
imgui_impl_opengl3
OS: MacOS 12.3.1
When waking my machine from sleep while running my app, imgui fails to assert
g.PlatformIO.Monitors.Size > 0
imgui/imgui.cpp
Line 8938 in 64b88da
It doesn't do this consistently, there is about a 50% chance it will happen on each sleep wake cycle.
How does disabling this assertion affect the integrity of imgui?
I've currently commented it out and experienced no issues.
I'm curious if anyone experiences the same issue, as I'm currently unable to test it on another system.
The text was updated successfully, but these errors were encountered: