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

[bug] Selecting the ListBox or List tab in the widgets example crashes the application on macOS #724

Closed
rokf opened this issue Oct 24, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@rokf
Copy link

rokf commented Oct 24, 2023

What happend?

Clicking on either the ListBox or List tab crashes the widgets application on macOS Sonoma 14.0.

The message in the console is File: /Users/runner/work/cimgui-go/cimgui-go/cimgui/imgui/imgui.cpp, Line: 2955 in both cases.

CleanShot 2023-10-24 at 19 13 16

Code example

I've noticed this on the official widgets example from examples/widgets.

To Reproduce

cd examples
go build widgets.go
./widgets

Click on either the ListBox or List tab on the bottom of the window.

Version

master

OS

macOS Sonoma 14.0

@rokf rokf added the bug Something isn't working label Oct 24, 2023
@zachwelch
Copy link

Reproduced today on Ubuntu 22.04:

goroutine 6 [syscall, locked to thread]:
runtime.cgocall(0x561230, 0xc0003b6f58)
        /usr/lib/go-1.21/src/runtime/cgocall.go:157 +0x4b fp=0xc0003b6f30 sp=0xc0003b6ef8 pc=0x40b18b
github.com/AllenDang/cimgui-go._Cfunc_ImGuiListClipper_Step(0xc0002f7a40)
        _cgo_gotypes.go:7253 +0x45 fp=0xc0003b6f58 sp=0xc0003b6f30 pc=0x4c7725
github.com/AllenDang/cimgui-go.(*ListClipper).Step.func2(0xc0003948a8?)
        .../go/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20231009021832-f9856eb4a9a7/cimgui_funcs.go:2058 +0x34 fp=0xc0003b6f90 sp=0xc0003b6f58 pc=0x4ce114
github.com/AllenDang/cimgui-go.(*ListClipper).Step(0xc0002a2000?)
        .../go/pkg/mod/github.com/!allen!dang/cimgui-go@v0.0.0-20231009021832-f9856eb4a9a7/cimgui_funcs.go:2058 +0x91 fp=0xc0003b7010 sp=0xc0003b6f90 pc=0x4ce091
github.com/AllenDang/giu.(*ListBoxWidget).Build.func1()
        .../src/giu/ExtraWidgets.go:319 +0xa5 fp=0xc0003b7128 sp=0xc0003b7010 pc=0x54c6c5
github.com/AllenDang/giu.(*CustomWidget).Build(0x0?)
        .../src/giu/ExtraWidgets.go:136 +0x17 fp=0xc0003b7138 sp=0xc0003b7128 pc=0x54c317
github.com/AllenDang/giu.Layout.Build(...)
        .../src/giu/Layout.go:28
github.com/AllenDang/giu.(*Layout).Build(0xc0002e9ba4?)
        <autogenerated>:1 +0x59 fp=0xc0003b7168 sp=0xc0003b7138 pc=0x557519
github.com/AllenDang/giu.Layout.Build(...)
        .../src/giu/Layout.go:28
github.com/AllenDang/giu.(*ChildWidget).Build(0xc000344240)
        .../src/giu/Widgets.go:76 +0x93 fp=0xc0003b71b0 sp=0xc0003b7168 pc=0x554df3
github.com/AllenDang/giu.(*ListBoxWidget).Build(0xc0002ea7e0)
        .../src/giu/ExtraWidgets.go:358 +0x28b fp=0xc0003b7238 sp=0xc0003b71b0 pc=0x54c5eb
....

@gucio321
Copy link
Collaborator

I see, unfortunately can't focus on it right now because I'm quite busy with AllenDang/cimgui-go#229 (causes many). Will look into this ass soon as I get some time ;-)

@fnicastri
Copy link

@gucio321
issue still there, any suggestion?
I'm trying to use master to remove the 64 column limit on tablewidget

@gucio321
Copy link
Collaborator

gucio321 commented Feb 4, 2024

My suggestion is to fix the bug 😁 - contributions are welcome!
Unfortunately i didn't finish working on the problem mentioned in a comment above. I was quite busy last few months tbh and had no time for my open source work.

@fnicastri
Copy link

fnicastri commented Feb 5, 2024

My suggestion is to fix the bug 😁 - contributions are welcome!

I would try but... I would need to understand why it is not compiling on my machine, a AppleSilicon Mac running MacOs, and then dive in to the code.
I'm sorry but right now I have no time to solve both.

Thank you

@gucio321
Copy link
Collaborator

After my research on the latest commit (probably after #733 that updated cimgui-go) this doesn't happen anymore.
image

LMK if someone still has this bug.

@rokf
Copy link
Author

rokf commented Feb 17, 2024

Have just tried repeating the steps on the latest master and can't reproduce it - it works now, at least on macOS Sonoma 14.3.1 (go version go1.21.3 darwin/arm64).

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants