Skip to content
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

Crash Click Palette Demo Window #2320

Closed
pbc37 opened this issue Jan 29, 2019 · 5 comments
Closed

Crash Click Palette Demo Window #2320

pbc37 opened this issue Jan 29, 2019 · 5 comments

Comments

@pbc37
Copy link

pbc37 commented Jan 29, 2019

Dear ImGui 1.67 WIP (16602)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=201500
define: _WIN32
define: _WIN64
define: __MINGW32__
define: __MINGW64__
define: __GNUC__=6
--------------------------------
io.BackendPlatformName: imgui_impl_glfw
io.BackendRendererName: imgui_impl_opengl3
io.ConfigFlags: 0x00000000
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.BackendFlags: 0x00000006
 HasMouseCursors
 HasSetMousePos
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,64
io.DisplaySize: 1280.00,720.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

Operating System: Windows 7 64-bits Service Pack 1
Branch: Master

My Issue/Question:

When I click randomly at the Palette Window in the Demo Window it crashes.

Screenshots/Video

Console:
https://gyazo.com/4e103f97f44613afbbab7cd05156fe27

GIF:
https://gyazo.com/32f7c79e8a297cbe7421c05a4118c889

I did not change any code from the GLFW+OPENGL example
@ocornut
Copy link
Owner

ocornut commented Jan 30, 2019

Hello,

I cannot seem to reproduce your issue.
Could you provide a call-stack? (as requested by the Issue template?)

You say "I did not change any code from the GLFW+OPENGL example"
However your screenshot shows a path of "tfm_seriousgame/bin/main_win.exe" which is not the filename of the example, so this is contradictory.

Can you repro in the unmodified examples/ application?

(PS: You can attach pictures/GIF in your github posts, prefer using github attachment over Gyazo)

@pbc37
Copy link
Author

pbc37 commented Jan 30, 2019

I use my own makefile with the compiler MinGW 64 bits but the code in the main.cpp imgui.cpp etc. has not been modified. It also happens to me with GLFW+Vulkan. I have the lastest version of freetype and glfw, maybe it's the library version of glfw or another.
These are the compilator flags: -std=c++17 -m64 -Wall
These are the lastest versions of these libraries: -lopengl32 -lglfw3 -lfreetype -lgdi32 -static
A compilation comand looks like this:
x86_64-w64-mingw32-g++ -std=c++17 -m64 -Wall -g -c -Iinclude -Llib lib/imgui_widgets.cpp -o obj_win/lib/imgui_widgets.o -lopengl32 -lglfw3 -lfreetype -lgdi32 -static

Glfw3 and freetype are static but i tried changing it and it doesn't change the outcome at all.

I tried compiling it with Visual Studio and it works perfectly so maybe ¿minGW? No idea.

Here's the stack trace with gdb. I used the cygwin gdb debugger I suppose that's not a problem.
-Before the IM_ASSERT
(gdb) bt
#0 ImGui::Begin (name=0x22fb90 "##Tooltip_00", p_open=0x0, flags=34341703) at lib/imgui.cpp:4639
#1 0x0000000000416634 in ImGui::BeginTooltipEx (extra_flags=0, override_previous_tooltip=true) at lib/imgui.cpp:6443
#2 0x000000000041653b in ImGui::BeginTooltip () at lib/imgui.cpp:6419
#3 0x00000000004166a8 in ImGui::SetTooltipV (fmt=0x5cbc2b <WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER+2995> "...", args=0x22fca8 "\004\004") at lib/imgui.cpp:6456
#4 0x0000000000416705 in ImGui::SetTooltip (fmt=0x5cbc2b <WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER+2995> "...") at lib/imgui.cpp:6467
#5 0x000000000040b528 in ImGui::EndFrame () at lib/imgui.cpp:3606
#6 0x000000000040b8df in ImGui::Render () at lib/imgui.cpp:3685
#7 0x0000000000475271 in main () at src/main.cpp:172

-After the IM_ASSERT
(gdb) s
4640 IM_ASSERT(g.FrameScopeActive); // Forgot to call ImGui::NewFrame()
(gdb) s
_assert (_Message=0x5cc08a <WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER+4114> "g.FrameScopeActive", _File=0x5cb094 <WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER+28> "lib/imgui.cpp", _Line=4640)
at /usr/src/debug/mingw64-x86_64-runtime-5.0.4-1/misc/wassert.c:19
19 /usr/src/debug/mingw64-x86_64-runtime-5.0.4-1/misc/wassert.c: No such file or directory.
(gdb) bt
#0 _assert (_Message=0x5cc08a <WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER+4114> "g.FrameScopeActive", _File=0x5cb094 <WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER+28> "lib/imgui.cpp", _Line=4640)
at /usr/src/debug/mingw64-x86_64-runtime-5.0.4-1/misc/wassert.c:19
#1 0x000000000040f3b3 in ImGui::Begin (name=0x22fb90 "##Tooltip_00", p_open=0x0, flags=34341703) at lib/imgui.cpp:4640
#2 0x0000000000416634 in ImGui::BeginTooltipEx (extra_flags=0, override_previous_tooltip=true) at lib/imgui.cpp:6443
#3 0x000000000041653b in ImGui::BeginTooltip () at lib/imgui.cpp:6419
#4 0x00000000004166a8 in ImGui::SetTooltipV (fmt=0x5cbc2b <WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER+2995> "...", args=0x22fca8 "\004\004") at lib/imgui.cpp:6456
#5 0x0000000000416705 in ImGui::SetTooltip (fmt=0x5cbc2b <WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER+2995> "...") at lib/imgui.cpp:6467
#6 0x000000000040b528 in ImGui::EndFrame () at lib/imgui.cpp:3606
#7 0x000000000040b8df in ImGui::Render () at lib/imgui.cpp:3685
#8 0x0000000000475271 in main () at src/main.cpp:172

I hope that's enough info, if i can help in anything with this tell me! 👍

@ocornut
Copy link
Owner

ocornut commented Jan 30, 2019

Thanks for the callstack.
I think this bug existed for a few commits before 1.67 and then was fixed. Try updating your copy.

@ocornut
Copy link
Owner

ocornut commented Jan 31, 2019

I confirmed this bug was introduced by d845135 and fixed in b3469fa (Fixed on January 2nd). Sorry for the issue.

@ocornut ocornut closed this as completed Jan 31, 2019
@pbc37
Copy link
Author

pbc37 commented Jan 31, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants