Intuition/GadTools image menus (IM_ITEM/IM_SUB)

This forum is for general developer support questions.
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: Intuition/GadTools image menus (IM_ITEM/IM_SUB)

Post by chris »

salass00 wrote:This bug is already assigned. FWIW I tried running your test case using the latest SVN version of popupmenu.class on my beta system and I couldn't get it to crash here. After allocating signal 17 the popup menu stopped opening but it didn't crash or cause the OS to freeze.
OK, sounds like some progress has been made on it, that's all I wanted to hear.
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: Intuition/GadTools image menus (IM_ITEM/IM_SUB)

Post by chris »

salass00 wrote:This bug should be fixed in gadtools.library 53.5.
Unfortunately it isn't completely. Normal menu and sub-items work fine within some test code (I'm having problems elsewhere, but that's a different story), however, items with sub-items attached to them cause label.image to crash.

You can see this for yourself by modifying my original test code so the IM_ITEM is the one with sub-items, rather than the ARexx menu.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: Intuition/GadTools image menus (IM_ITEM/IM_SUB)

Post by salass00 »

chris wrote: Unfortunately it isn't completely. Normal menu and sub-items work fine within some test code (I'm having problems elsewhere, but that's a different story), however, items with sub-items attached to them cause label.image to crash.

You can see this for yourself by modifying my original test code so the IM_ITEM is the one with sub-items, rather than the ARexx menu.
I will look into this next week.

Unfortunately my PC which I use for much of my development just stopped working yesterday evening :-(. I think it may be just the PSU that's died though.

At the moment when I connect the power and turn on the switch on the back it just makes a strange whining sound and the power light flickers.
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: Intuition/GadTools image menus (IM_ITEM/IM_SUB)

Post by chris »

salass00 wrote:
chris wrote: Unfortunately it isn't completely. Normal menu and sub-items work fine within some test code (I'm having problems elsewhere, but that's a different story), however, items with sub-items attached to them cause label.image to crash.

You can see this for yourself by modifying my original test code so the IM_ITEM is the one with sub-items, rather than the ARexx menu.
I will look into this next week.

Unfortunately my PC which I use for much of my development just stopped working yesterday evening :-(. I think it may be just the PSU that's died though.

At the moment when I connect the power and turn on the switch on the back it just makes a strange whining sound and the power light flickers.
Sounds like the PSU. Hopefully you can get it back up and running soon.

wrt image menus, do you know what would cause an entire menu (or sub-menu) to not render? I'm playing around with IM_ITEM and all I'm getting is the menu not appearing - even if I only update one item as IM_ITEM with a basic label.image LABEL_Text only.

The only difference (that I can see) between my code and the earlier test code is that mine AllocVec()s the NewMenu structure and then pokes everything in. It works for normal NM_ITEM entries though. Any ideas?
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: Intuition/GadTools image menus (IM_ITEM/IM_SUB)

Post by salass00 »

chris wrote: Sounds like the PSU. Hopefully you can get it back up and running soon.
I have it running again now with a new CoolerMaster 600W PSU.
wrt image menus, do you know what would cause an entire menu (or sub-menu) to not render? I'm playing around with IM_ITEM and all I'm getting is the menu not appearing - even if I only update one item as IM_ITEM with a basic label.image LABEL_Text only.

The only difference (that I can see) between my code and the earlier test code is that mine AllocVec()s the NewMenu structure and then pokes everything in. It works for normal NM_ITEM entries though. Any ideas?
Could you post a small test code that reproduces this? I tried modifying your previous code to add a sub to the image item and turning the image item into an image sub but it didn't cause any problems here.
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: Intuition/GadTools image menus (IM_ITEM/IM_SUB)

Post by chris »

salass00 wrote:Could you post a small test code that reproduces this? I tried modifying your previous code to add a sub to the image item and turning the image item into an image sub but it didn't cause any problems here.
http://homepage.ntlworld.com/cdyoung/tmp/im_menu.lha
I can't get it to crash now, but the above gives an empty (invisible) "Prefs" menu - you can tell it's invisible because hovering over where the "sub-item" menu should be makes it show the sub-menu!

This is exactly what I'm seeing elsewhere.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: Intuition/GadTools image menus (IM_ITEM/IM_SUB)

Post by salass00 »

chris wrote: http://homepage.ntlworld.com/cdyoung/tmp/im_menu.lha
I can't get it to crash now, but the above gives an empty (invisible) "Prefs" menu - you can tell it's invisible because hovering over where the "sub-item" menu should be makes it show the sub-menu!

This is exactly what I'm seeing elsewhere.
That's a bit strange. When I try on my update 6 install it works as you describe (the submenu when it shows is as wide as the screen though) but when I try using my beta install I can't get it to display the submenu at all. I guess I will have to debug the layout code in gadtools to find out why this is happening...
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: Intuition/GadTools image menus (IM_ITEM/IM_SUB)

Post by salass00 »

It took me long enough but I've finally found and managed to fix what was causing the problem. The reason was the layout function was storing the original leftedge of the image at one offset and then later trying to read it back at a different one (this was in turn caused by different packing being used on an internal structure making the error not immediately obvious).
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: Intuition/GadTools image menus (IM_ITEM/IM_SUB)

Post by chris »

Fredrik, you are my favourite OS4 developer. Thank you for fixing these issues!
User avatar
trixie
Posts: 411
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: Intuition/GadTools image menus (IM_ITEM/IM_SUB)

Post by trixie »

+1 :-)
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Post Reply