Closed damntourists closed 8 months ago
strange :thinking: It works on my fedora and it works on github codespace that uses ubuntu... Could you try delve?
ok, nevermind, now it crashes on my machine too. Error message is:
File: /home/runner/work/cimgui-go/cimgui-go/cimgui/imgui/imgui.cpp, Line: 6603
exit status 1
but the helloword example works for me fine
Just want to add that I run into crash/segfaults with all the examples (helloword example included). On Windows 11 pro.
I think its the problem with SingleWindowWithMenubar
also, imgui.cpp:6603
IM_ASSERT(g.WithinFrameScope); // Forgot to call ImGui::NewFrame()
ℹ️ The issue has just happened to me on macOS Sonoma (14.0) as well - mentioned in #700.
Found the root cause of the crash: It happens only when SetSizeCallback method of imgui's backend is set, If size is changed or is too big by default it crashes.
What happend?
Hi there, I'm trying to run the
example/widgets.go
example file and it works fine initially, however whenever I resize the window it crashes. Another issue I just encountered was a segfault when clicking theListBox
andList
tab. Below you'll find an example where it crashed when switching to one of those tabs.Code example
``` GOROOT=/home/brett/.goenv/versions/1.21.2 #gosetup GOPATH=/home/brett/go/1.21.2 #gosetup /home/brett/.goenv/versions/1.21.2/bin/go build -o /home/brett/.cache/JetBrains/GoLand2023.2/tmp/GoLand/___go_build_github_com_AllenDang_giu_examples_widgets github.com/AllenDang/giu/examples/widgets #gosetup # github.com/AllenDang/cimgui-go In file included from cimnodes_wrapper.h:6, from cimnodes_structs_accessor.cpp:6: cimgui/cimnodes.h:111:29: warning: declaration of ‘EmulateThreeButtonMouse ImNodesIO::EmulateThreeButtonMouse’ changes meaning of ‘EmulateThreeButtonMouse’ [-fpermissive] 111 | EmulateThreeButtonMouse EmulateThreeButtonMouse; | ^~~~~~~~~~~~~~~~~~~~~~~ cimgui/cimnodes.h:95:40: note: ‘EmulateThreeButtonMouse’ declared here as ‘typedef struct EmulateThreeButtonMouse EmulateThreeButtonMouse’ 95 | typedef struct EmulateThreeButtonMouse EmulateThreeButtonMouse; | ^~~~~~~~~~~~~~~~~~~~~~~ cimgui/cimnodes.h:112:33: warning: declaration of ‘LinkDetachWithModifierClick ImNodesIO::LinkDetachWithModifierClick’ changes meaning of ‘LinkDetachWithModifierClick’ [-fpermissive] 112 | LinkDetachWithModifierClick LinkDetachWithModifierClick; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cimgui/cimnodes.h:101:44: note: ‘LinkDetachWithModifierClick’ declared here as ‘typedef struct LinkDetachWithModifierClick LinkDetachWithModifierClick’ 101 | typedef struct LinkDetachWithModifierClick LinkDetachWithModifierClick; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cimgui/cimnodes.h:113:28: warning: declaration of ‘MultipleSelectModifier ImNodesIO::MultipleSelectModifier’ changes meaning of ‘MultipleSelectModifier’ [-fpermissive] 113 | MultipleSelectModifier MultipleSelectModifier; | ^~~~~~~~~~~~~~~~~~~~~~ cimgui/cimnodes.h:107:39: note: ‘MultipleSelectModifier’ declared here as ‘typedef struct MultipleSelectModifier MultipleSelectModifier’ 107 | typedef struct MultipleSelectModifier MultipleSelectModifier; | ^~~~~~~~~~~~~~~~~~~~~~ cc1plus: note: unrecognized command-line option ‘-Wno-changes-meaning’ may have been intended to silence earlier diagnostics # github.com/AllenDang/cimgui-go In file included from cimnodes_wrapper.h:6, from cimnodes_wrapper.cpp:4: cimgui/cimnodes.h:111:29: warning: declaration of ‘EmulateThreeButtonMouse ImNodesIO::EmulateThreeButtonMouse’ changes meaning of ‘EmulateThreeButtonMouse’ [-fpermissive] 111 | EmulateThreeButtonMouse EmulateThreeButtonMouse; | ^~~~~~~~~~~~~~~~~~~~~~~ cimgui/cimnodes.h:95:40: note: ‘EmulateThreeButtonMouse’ declared here as ‘typedef struct EmulateThreeButtonMouse EmulateThreeButtonMouse’ 95 | typedef struct EmulateThreeButtonMouse EmulateThreeButtonMouse; | ^~~~~~~~~~~~~~~~~~~~~~~ cimgui/cimnodes.h:112:33: warning: declaration of ‘LinkDetachWithModifierClick ImNodesIO::LinkDetachWithModifierClick’ changes meaning of ‘LinkDetachWithModifierClick’ [-fpermissive] 112 | LinkDetachWithModifierClick LinkDetachWithModifierClick; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cimgui/cimnodes.h:101:44: note: ‘LinkDetachWithModifierClick’ declared here as ‘typedef struct LinkDetachWithModifierClick LinkDetachWithModifierClick’ 101 | typedef struct LinkDetachWithModifierClick LinkDetachWithModifierClick; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cimgui/cimnodes.h:113:28: warning: declaration of ‘MultipleSelectModifier ImNodesIO::MultipleSelectModifier’ changes meaning of ‘MultipleSelectModifier’ [-fpermissive] 113 | MultipleSelectModifier MultipleSelectModifier; | ^~~~~~~~~~~~~~~~~~~~~~ cimgui/cimnodes.h:107:39: note: ‘MultipleSelectModifier’ declared here as ‘typedef struct MultipleSelectModifier MultipleSelectModifier’ 107 | typedef struct MultipleSelectModifier MultipleSelectModifier; | ^~~~~~~~~~~~~~~~~~~~~~ cc1plus: note: unrecognized command-line option ‘-Wno-changes-meaning’ may have been intended to silence earlier diagnostics /home/brett/.cache/JetBrains/GoLand2023.2/tmp/GoLand/___go_build_github_com_AllenDang_giu_examples_widgets SIGSEGV: segmentation violation PC=0x60c70e m=7 sigcode=1 signal arrived during cgo execution goroutine 13 [syscall, locked to thread]: runtime.cgocall(0x5612f0, 0xc0002070d8) /home/brett/.goenv/versions/1.21.2/src/runtime/cgocall.go:157 +0x4b fp=0xc0002070b0 sp=0xc000207078 pc=0x40b18b github.com/AllenDang/cimgui-go._Cfunc_ImGuiListClipper_Step(0xc000524f30) _cgo_gotypes.go:7253 +0x45 fp=0xc0002070d8 sp=0xc0002070b0 pc=0x4c77e5 github.com/AllenDang/cimgui-go.(*ListClipper).Step.func2(0xc0001dccd8?) /home/brett/go/1.21.2/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20231009021832-f9856eb4a9a7/cimgui_funcs.go:2058 +0x34 fp=0xc000207110 sp=0xc0002070d8 pc=0x4ce1d4 github.com/AllenDang/cimgui-go.(*ListClipper).Step(0xc000097300?) /home/brett/go/1.21.2/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20231009021832-f9856eb4a9a7/cimgui_funcs.go:2058 +0x91 fp=0xc000207190 sp=0xc000207110 pc=0x4ce151 github.com/AllenDang/giu.(*ListClipperWrapper).Build(0xc0003f9d10) /home/brett/work/__rnd__/prism/localized/giu/ListClipper.go:39 +0xd6 fp=0xc0002071f0 sp=0xc000207190 pc=0x5500b6 github.com/AllenDang/giu.Layout.Build(...) /home/brett/work/__rnd__/prism/localized/giu/Layout.go:28 github.com/AllenDang/giu.(*ChildWidget).Build(0xc0002ae800) /home/brett/work/__rnd__/prism/localized/giu/Widgets.go:76 +0x93 fp=0xc000207238 sp=0xc0002071f0 pc=0x554e73 github.com/AllenDang/giu.Layout.Build(...) /home/brett/work/__rnd__/prism/localized/giu/Layout.go:28 github.com/AllenDang/giu.(*TabItemWidget).BuildTabItem(0xc0002ae7c0) /home/brett/work/__rnd__/prism/localized/giu/Widgets.go:613 +0x79 fp=0xc000207280 sp=0xc000207238 pc=0x555e79 github.com/AllenDang/giu.(*TabBarWidget).Build(0xc000524b10) /home/brett/work/__rnd__/prism/localized/giu/Widgets.go:657 +0x5f fp=0xc0002072c0 sp=0xc000207280 pc=0x55601f github.com/AllenDang/giu.Layout.Build(...) /home/brett/work/__rnd__/prism/localized/giu/Layout.go:28 github.com/AllenDang/giu.(*WindowWidget).Layout(0xc0002ae100, {0xc0002078e8?, 0x17, 0x17}) /home/brett/work/__rnd__/prism/localized/giu/Window.go:149 +0x2c2 fp=0xc000207350 sp=0xc0002072c0 pc=0x556862 main.loop() /home/brett/work/__rnd__/prism/localized/giu/examples/widgets/widgets.go:46 +0x60eb fp=0xc000207a68 sp=0xc000207350 pc=0x55e00b github.com/AllenDang/giu.(*MasterWindow).render(0xc0001a1ce0) /home/brett/work/__rnd__/prism/localized/giu/MasterWindow.go:224 +0x169 fp=0xc000207cb0 sp=0xc000207a68 pc=0x551d09 github.com/AllenDang/giu.(*MasterWindow).render-fm()log
To Reproduce
Version
master
OS
ubuntu