IMA on FreeMenu

Linux specific forum
wombats
Enthusiast
Enthusiast
Posts: 717
Joined: Thu Dec 29, 2011 5:03 pm

IMA on FreeMenu

Post 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. /:
User avatar
mk-soft
Always Here
Always Here
Posts: 6245
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: IMA on FreeMenu

Post by mk-soft »

Please put running code in to test :(
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
BarryG
Addict
Addict
Posts: 4173
Joined: Thu Apr 18, 2019 8:17 am

Re: IMA on FreeMenu

Post by BarryG »

What is the value of popupMenus()? What does that procedure do?
wombats
Enthusiast
Enthusiast
Posts: 717
Joined: Thu Dec 29, 2011 5:03 pm

Re: IMA on FreeMenu

Post 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.
wombats
Enthusiast
Enthusiast
Posts: 717
Joined: Thu Dec 29, 2011 5:03 pm

Re: IMA on FreeMenu

Post 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!"
Post Reply