imgui
imgui copied to clipboard
Hang when destroying viewports in example_sdl2_opengl3 (only when vsync is deactivated)
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:
Dear ImGui 1.90.9 WIP (19082)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=199711
define: _WIN32
define: _WIN64
define: _MSC_VER=1939
define: _MSVC_LANG=201402
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
--------------------------------
io.BackendPlatformName: imgui_impl_sdl2
io.BackendRendererName: imgui_impl_opengl3
io.ConfigFlags: 0x00000443
NavEnableKeyboard
NavEnableGamepad
DockingEnable
ViewportsEnable
io.ConfigViewportsNoDecoration
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x00001C0E
HasMouseCursors
HasSetMousePos
PlatformHasViewports
HasMouseHoveredViewport
RendererHasVtxOffset
RendererHasViewports
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,64
io.DisplaySize: 1280.00,720.00
io.DisplayFramebufferScale: 1.00,1.00
--------------------------------
style.WindowPadding: 8.00,8.00
style.WindowBorderSize: 1.00
style.FramePadding: 4.00,3.00
style.FrameRounding: 0.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 8.00,4.00
style.ItemInnerSpacing: 4.00,4.00
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:
Minimal, Complete and Verifiable Example code:
// modified line 79 of example_sdl2_opengl3/main.cpp to disable vsync
SDL_GL_SetSwapInterval(0); // 0 for immediate updates