cimgui-go: InputTextWithHint is broken

InputTextWithHint is broken

Tentatively"commit 280ec596116b5bf60a8541169603f7cce7db702b". works fine

error.log is empty

on the last commit (not implement-imvector) crash in my project

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 1 [running]:
github.com/AllenDang/cimgui-go.InputTextCallbackData.EventFlag.func2(0xc00029d7b0?)
        S:/goProject/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20230816065634-b5893ac3ee03/cimgui_funcs.go:19717 +0x2c
github.com/AllenDang/cimgui-go.InputTextCallbackData.EventFlag({0xc00029d7b0, 0x40000, 0x40000, 0xc0002a4108, 0x0, 0x0, {0xc0002a4110, 0x3}, 0x2, 0x4, ...})
        S:/goProject/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20230816065634-b5893ac3ee03/cimgui_funcs.go:19717 +0xa5
github.com/AllenDang/cimgui-go.generalInputTextCallback(0x717c5ff650)
        S:/goProject/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20230816065634-b5893ac3ee03/input_text.go:34 +0xf8
github.com/AllenDang/cimgui-go._Cfunc_igInputTextWithHint(0x266f6242a50, 0x266f6242960, 0x266f6242c60, 0x4, 0x40000, 0x7ff6f1da2b00, 0xc0002a4108)
        _cgo_gotypes.go:25593 +0x53
github.com/AllenDang/cimgui-go.InputTextWithHint.func2(0x7ff6f21be5a0?, 0xc0002a3f30?, 0xc0000afa98?, 0x7ff6f1be0bca?, 0x40000, 0xc0000afaa8?)
        S:/goProject/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20230816065634-b5893ac3ee03/input_text.go:79 +0xbb
github.com/AllenDang/cimgui-go.InputTextWithHint({0x7ff6f2221abd?, 0x7ff6f24e1f01?}, {0x7ff6f2221fb6, 0x5}, 0x7ff6f21743d0, 0x0, 0x7ff6f2259bb8)
        S:/goProject/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20230816065634-b5893ac3ee03/input_text.go:79 +0x1df
poehelper/window.pageGeneral()
        S:/goProject/PoEHelper/window/Settings.go:104 +0x45
poehelper/window.SettingsWindow(0xc0?)
        S:/goProject/PoEHelper/window/Settings.go:68 +0x29f
main.loop()
        S:/goProject/PoEHelper/main.go:156 +0x5d
github.com/AllenDang/cimgui-go.loopCallback()
        S:/goProject/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20230816065634-b5893ac3ee03/backend.go:22 +0x3d
github.com/AllenDang/cimgui-go._Cfunc_igRunLoop(0x266ea4646b0, 0x7ff6f1da2870, 0x7ff6f1da28b0, 0x7ff6f1da28f0, 0x7ff6f1da2970)
        _cgo_gotypes.go:27778 +0x4e
github.com/AllenDang/cimgui-go.(*GLFWBackend).Run.func1(0x7ff6f1da2245?)
        S:/goProject/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20230816065634-b5893ac3ee03/glfw_backend.go:98 +0x9f
github.com/AllenDang/cimgui-go.(*GLFWBackend).Run(0xc000122900?, 0x7ff6f22599b8?)
        S:/goProject/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20230816065634-b5893ac3ee03/glfw_backend.go:98 +0x33
main.main()
        S:/goProject/PoEHelper/main.go:146 +0x356
exit status 2
make: *** [Makefile:9: run] Error 1

crash in demo from examples/

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 1 [running]:
github.com/AllenDang/cimgui-go.InputTextCallbackData.EventFlag.func2(0xc000158240?)
        S:/goProject/cimgui-go/cimgui_funcs.go:19717 +0x2c
github.com/AllenDang/cimgui-go.InputTextCallbackData.EventFlag({0xc000158240, 0x40000, 0x40000, 0xc000152390, 0x0, 0x0, {0xc0001523a0, 0xa}, 0xb, 0xc, ...})
        S:/goProject/cimgui-go/cimgui_funcs.go:19717 +0xa5
github.com/AllenDang/cimgui-go.generalInputTextCallback(0xd1c9dff760)
        S:/goProject/cimgui-go/input_text.go:34 +0xf8
github.com/AllenDang/cimgui-go._Cfunc_igInputTextWithHint(0x2363fa8c4d0, 0x2363fa8ba90, 0x2363fa8ba70, 0xb, 0x40000, 0x7ff79bab95d0, 0xc000152390)
        _cgo_gotypes.go:25593 +0x53
github.com/AllenDang/cimgui-go.InputTextWithHint.func2(0x7ff79be93c80?, 0xc000154820?, 0x2363fa8b5d0?, 0x2363fa8b5d0?, 0x40000, 0x0?)
        S:/goProject/cimgui-go/input_text.go:79 +0xbb
github.com/AllenDang/cimgui-go.InputTextWithHint({0x7ff79bebae4b?, 0x436f000000000002?}, {0x7ff79bebe66a, 0x14}, 0x7ff79be69d60, 0x0, 0x7ff79bec5d40)
        S:/goProject/cimgui-go/input_text.go:79 +0x1df
main.showWidgetsDemo()
        S:/goProject/cimgui-go/examples/main.go:64 +0x23f
main.loop()
        S:/goProject/cimgui-go/examples/main.go:103 +0x17
github.com/AllenDang/cimgui-go.loopCallback()
        S:/goProject/cimgui-go/backend.go:22 +0x3d
github.com/AllenDang/cimgui-go._Cfunc_igRunLoop(0x23613f5d130, 0x7ff79bab9340, 0x7ff79bab9380, 0x7ff79bab93c0, 0x7ff79bab9440)
        _cgo_gotypes.go:27778 +0x4e
github.com/AllenDang/cimgui-go.(*GLFWBackend).Run.func1(0xc000072410?)
        S:/goProject/cimgui-go/glfw_backend.go:98 +0x9f
github.com/AllenDang/cimgui-go.(*GLFWBackend).Run(0xc00007e080?, 0x7ff79bec5d58?)
        S:/goProject/cimgui-go/glfw_backend.go:98 +0x33
main.main()
        S:/goProject/cimgui-go/examples/main.go:139 +0x21d
exit status 2

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 17

Commits related to this issue

Most upvoted comments

@gucio321 I don’t understand anything on commit 022a31c244c16b4c277df236733960bbdf07a99b imgui.InputTextWithHint is not working for some reason.

good news! GO PR has been merged. Waiting for go release

I managed to fix this single case (GetEventFlags) by using runtime.pinner. I will try to implement this mechanism in generator