Page 1 of 1
IMA on FreeMenu
Posted: Sun Nov 24, 2024 9:09 am
by wombats
Hi,
I'm using the Qt subsystem.
Does anyone have any idea why I'd get an IMA on the second line? I thought IsMenu() was supposed to check the menu is valid.
Code: Select all
If IsMenu(popupMenus())
FreeMenu(popupMenus())
EndIf
I do a lot of stuff with QtScript (especially using setStyleSheet), so I wonder if that could be an issue. I've found things on Google about crashes with that, but they're not much help because I don't know what's going on behind the scenes in PB. I tried using gdb to debug, but trying to compile with the command-line compiler resulted in a segmentation fault. /:
Re: IMA on FreeMenu
Posted: Sun Nov 24, 2024 10:15 am
by mk-soft
Please put running code in to test

Re: IMA on FreeMenu
Posted: Sun Nov 24, 2024 10:26 am
by BarryG
What is the value of popupMenus()? What does that procedure do?
Re: IMA on FreeMenu
Posted: Sun Nov 24, 2024 3:44 pm
by wombats
I am trying to make a small example to test but so far unable to recreate it. Which suggests it’s a problem in my program, but it’s weird. Sorry. popupMenus() contains the same enumeration value used in CreatePopupMenu.
PB 6.11 worked with the command-line, but I can’t get -ds to work. GDB keeps saying the exe has no debugging symbols.
Re: IMA on FreeMenu
Posted: Sun Nov 24, 2024 11:11 pm
by wombats
It's some kind of issue with setStyleSheet that I unfortunately can't reproduce in a small example. I'll keep trying, but my project is quite large and it's tough to try and narrow down what could be the issue.
If it helps anyone, the terminal says this:
"Could not convert argument 0 at"
"%entry@:1"
"Passing incompatible arguments to C++ functions from JavaScript is dangerous and deprecated."
"This will throw a JavaScript TypeError in future releases of Qt!"