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

menubar disappears and panics on app close in windows #3

Open
kdar opened this issue Mar 19, 2013 · 5 comments
Open

menubar disappears and panics on app close in windows #3

kdar opened this issue Mar 19, 2013 · 5 comments

Comments

@kdar
Copy link

kdar commented Mar 19, 2013

I'm not sure if you have windows, but if you open up a menu (like in examples/widgets.go) and then you close that menu by making it lose focus, the menubar completely disappears and I see a remove item &{Menu{0x12c342e0}} in console. When you close the app, it panics:

panic: runtime error: call of nil func value
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x0]

goroutine 1 [syscall]:
github.com/salviati/go-qt5/qt5._Cfunc_drv(0x8, 0x3)
C:/Users/outroot/AppData/Local/Temp/go-build940075959/github.com/salviati/go-qt5/qt5/_obj/_cgo_defun.c:42 +0x31
@salviati
Copy link
Owner

I don't have windows, however I got the menubar disappear under GNU/Linux (amd64), using go 1.0.3. It doesn't panic though. It may be a problem with the lengthy widgets.go, which I just pulled from visualfc's go-ui. Can you provide a minimal code that reproduces the problem?

@kdar
Copy link
Author

kdar commented Mar 19, 2013

I could, but widgets.go seems like a good test case. Even if I have just a simple window with a menubar, it does exactly the same thing.

@salviati
Copy link
Owner

I wrote a minimal test case, and confirmed that the problem is in the bindings. Unfortunately, I don't have any time to spare on this project these days. Patches are welcome.

@kdar
Copy link
Author

kdar commented Mar 19, 2013

Can you point me in the right direction? I'll take a look. Honestly not entirely sure how this binding works, and how the lua is used and everything. If you have time for a quick rundown it would be nice.

@salviati
Copy link
Owner

Sure. If it's something specific to menu/menubar, you can start by checking make/lua/ui/{menu,menubar}.lua and move up in the dependency tree: widget.lua and hand-written code under goqtdrv5 (cdrv.cpp is generated by lua scripts).

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

No branches or pull requests

2 participants