mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-16 19:11:13 +00:00
Crash on Ctrl+Tab for DockSpaceOverViewport with PassthruCentralNode flag #4792
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#4792
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version: 1.86 WIP (18516)
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: MSVC
Operating System: Windows 10
My Issue/Question:
I want to use the
ImGui::DockSpaceOverViewportfunction in my application, but it will cause crash when pressing Ctrl+Tab navigation key, i wonder if this is a bug or i didn't understand the usage of dockspace.Screenshots/Video
Step to reproduce the issue based on the
example_glfw_opengl3:Code crashes here:
Standalone, minimal, complete and verifiable example:
Just add the following code to the main.cpp of
example_glfw_opengl3will reproduce the issue.This is code we changed recently. Can you confirm if updating to very latest commit still reproduce the issue?
yes, i just pull the lastest docking branch, the above issue is running using the lastest code
if add the following code before accessing
CmdBuffer.Data, it will crash elsewhere.from the debug stack, i can see the value of
CmdBuffer.Sizeis zero, but i don't know how to correct this.Should be fixed by
0647cf4, thank you very much for reporting and helping!wow, thank you for the quick response, i just pulled and checked, no crash any more!
I stumbled upon the same issue while migrating to imgui 1.87 wip (docking branch). It seems to happens only with empty windows. You can reproduce it like this :
A Begin followed by and End call will always result in a crash if the window is docked and reached with ctrl+tab. This can also be reproduced with the log or long text display windows of the imgui demos because theses windows have such a code path.
Thank you, will look into fixing soon.
@RT222 I cannot reproduce a crash. Can you post details and a callstack? What is your backend and your config flags? (best to Copy the build info available in About box).
I however noticed that during CTRL+Tabbing the background color of the viewport will start appearing above non-docked windows which is most likely due to the BgColor/dimming changes done in 1.86.
Using the latest docking commit (
ocornut/imgui@08f3aa8972) and the default imgui examples files without any modification, I was able to reproduce this crash consistently on all win32 and sdl2 based backends by docking the log window on the main viewport.Then I tried to test more build configurations and I think I found why you couldn't reproduce it on your end : it only happens on 64 bits builds. Try it with any backend built on debug/64bits, and I'm pretty confident you should get this crash too.
Here's my build infos :
Thank you I have managed to repro. It is possible to get a better assert with
#define IMGUI_DEBUG_PARANOIDin imconfig.hPushed a fix
f1a0731It's embarrassing how many regressions those window dimming/bgcolor system changes caused :(
Leaving this open because of :
> I however noticed that during CTRL+Tabbing the background color of the viewport will start appearing above non-docked windows which is most likely due to the BgColor/dimming changes done in 1.86.
Everything is working fine now, thanks for the quick fix.
Moving this to #5917 as main issue here has been fixed a while ago.