-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Hang when destroying viewports in example_sdl2_opengl3 (only when vsync is deactivated) #7717
Comments
It looks like it's actually stuck within |
I use neither SDL nor OpenGL, but this sounds a lot like the backend trying to release resources that are still in use by the graphics hardware. Basically a synchronization issue, which means that the crash depends on timing and GPU load. In that case it should happen even with VSync enabled if you saturate your GPU with work and it didn't have enough time to catch up yet when destroying the context. Depending on the guarantees OpenGL makes this could be an error in the backend implementation (improper synchronization) or a driver bug. |
Correct. The Ryzen GPU is your iGPU and the Radeon one is your dGPU.
In modern times "integrated GPUs" refers to GPUs integrated with the CPU. (As opposed to GPUs integrated into the motherboard like you used to see on desktops eons ago.)
That is unfortunate because this smells like a driver bug. Could you see if the issue happens with
Good test! Yeah, the issue applying specifically to the iGPU probably part of the bug from AMD's perspective.
@GamingMinds-DanielC Good theory, but in OpenGL object lifetimes are managed by the driver so even if this is the case it's still a driver bug. |
I just tried on opengl3 + glfw, the problem doesn't seem to happen. Neither it seems to happen with sdl2 + dx11 example, although I have not checked which graphic cards are being picked in these examples now that I think about it. For now, manually picking the working card is enough for me, although if you want me to do more tests, I can try to find more time on the following weeks. |
Thanks for reporting back!
That's quite surprising. If you could verify that it's running on the iGPU when you get a chance that'd definitely be great, but if you're happy there's no rush. (With vsync off you'd probably be able to tell which GPU is being used just by looking at which one is busy in Task Manager. You can also enable the GPU engine column in the details tab and check it.) |
Version/Branch of Dear ImGui:
Version v1.90.9 WIP, Branch: Docking
Back-ends:
imgui_impl_SDL2.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Windows 10 + MSVC 2022
Full config/build information:
Details:
My Issue:
When disabling vsync, I'm experiencing a silent hang in the sdl2 + opengl3 docking example. It occurs when trying to drag a window inside a bigger window. I'm attaching a video of the behavior (although it's probably hard to see it, I'm clicking trying to drag things after dragging a window and releasing it on top of another one, but the program has become unresponsive).
Then breaking the debug in visual studio, I noticed that the next statement of execution is inside ImGui_ImplSDL2_DestroyWindow. I'm attaching a screenshot of this as well, and the call stack, not sure if it would be helpful or not.
Screenshots/Video:
hang.webm
![image](https://private-user-images.githubusercontent.com/198346/341542324-72c7ac95-ef04-4c5c-ad6c-f25bc5b598f1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1Mjg2MjEsIm5iZiI6MTcyMDUyODMyMSwicGF0aCI6Ii8xOTgzNDYvMzQxNTQyMzI0LTcyYzdhYzk1LWVmMDQtNGM1Yy1hZDZjLWYyNWJjNWI1OThmMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwOVQxMjMyMDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kMGExMzQ4ZjQ0MzlkODVmMDA4NTdkN2RiZmQ2NzQ3OTJhZGYxNTlkZTNhNjlkNWNkYjIyOTliODdlOWQzY2M1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.mm3xC_4U4TZ0ai2ad6QlDEUYilMJWqtbpHNpYkOOmAs)
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: