mirror of
https://github.com/ocornut/imgui.git
synced 2026-10-16 22:40:48 +00:00
Crash in GetMousePosOnOpeningCurrentPopup #9551
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#9551
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:
v1.92.9b, docking
Back-ends:
Custom
Compiler, OS:
Windows 11, MSVC
Full config/build information:
Details:
Crash in GetMousePosOnOpeningCurrentPopup
GetMousePosOnOpeningCurrentPopup()from within a popup. The two previous imgui calls areBeginPopupEx(...)Selectable(...)It seems to be a simple typo but I wanted to double-check whether I'm missing something:
That function tests whether
g.BeginPopupStackis nonempty, but proceeds to accessg.OpenPopupStack. In my case, BeginPopupStack has size 1, but OpenPopupStack has size 0. (Both have capacity 8).I assume the fix is to simply access
BeginPopupStackin all three places.Thanks in advance!
Screenshots/Video:
The screen right before the crash:

The crash in VS, showing how OpenPopupStack is empty and accessed at idx 0 regardless:

Minimal, Complete and Verifiable Example code:
Sorry it seems like GitHub is facing a wave of spams. I blocked them and enabled some temporary interaction limits.