imgui icon indicating copy to clipboard operation
imgui copied to clipboard

Window Freeze using Multi Viewport and hidding main window

Open jmyvalour opened this issue 1 year ago • 0 comments

Version/Branch of Dear ImGui:

Version 1.90.5, Branch: docking

Back-ends:

backends/imgui_impl_sdl2.cpp backends/imgui_impl_opengl3.cpp

Compiler, OS:

Ubuntu 22, clang18

Full config/build information:

Dear ImGui 1.90.5 WIP (19046)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=201103
define: __linux__
define: __GNUC__=4
define: __clang_version__=18.1.3 (++20240322073153+ef6d1ec07c69-1~exp1~20240322193300.86)
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

imgui version: 085781f5ca5372d5fc804d7e44b5bf27a8994af7, docking branch

Details:

My Issue/Question:

Hello,

When launching the Demo without any modification (SDL2 + OpenGL3) on Ubuntu22, everything works fine until I move one window out of the main window, and hide the main one behind any other tab I got open. At this point I can see the whole demo freezing (one frame per second), Here is the callstack where the freeze is coming from:

libc.so.6!poll (Unknown Source:0) (waiting one second) libxcb.so.1![Unknown/Just-In-Time compiled code] (Unknown Source:0) libxcb.so.1!xcb_wait_for_special_event (Unknown Source:0) libGLX_mesa.so.0!glLabelObjectEXT (Unknown Source:0) libGLX_mesa.so.0!glLabelObjectEXT (Unknown Source:0) libGLX_mesa.so.0!glLabelObjectEXT (Unknown Source:0) libGLX_mesa.so.0!glLabelObjectEXT (Unknown Source:0) iris_dri.so![Unknown/Just-In-Time compiled code] (Unknown Source:0) main() (example_sdl2_opengl3/main.cpp:202) aka glClear(GL_COLOR_BUFFER_BIT);

I detected this problem into my application but was able to reproduce the same exact behavior on the ImGUI Demonstration code too. To reproduce, I just take the "Hello, world!" window and move it out of the main window, then I only display this one and let the main window behind another tab for example. If I remove the ImGuiConfigFlags_ViewportsEnable flag, it works fine, but as soon as I hide the main window, it goes back into these freeze again, wondering if I can force the refresh rate and overload this xcb_wait_for_special_event in some way.

I don't think this is related to imgui viewport, but I am not sure where to look at... wondering if someone on a linux system got the same problem, it looks related to the freeze issue related discussed here : https://github.com/ocornut/imgui/issues/6208 I tried to update all my system to the following version but the issue is still present, Extended renderer info (GLX_MESA_query_renderer): Vendor: Intel (0x8086) Device: Mesa Intel(R) UHD Graphics (TGL GT1) (0x9a60) Version: 24.0.4 Accelerated: yes Video memory: 31807MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) UHD Graphics (TGL GT1)

Thank you for your help, any advice, hint would be really helpful,

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

jmyvalour avatar Apr 04 '24 09:04 jmyvalour