menubar, images, IDE hang and resizeStack

All flavors welcome.
Forum rules
Be kind.
Post Reply
User avatar
neville
Posts: 37
Joined: Wed Jul 31, 2024 1:03 am
Location: Canberra, Australia
Contact:

menubar, images, IDE hang and resizeStack

Post by neville »

Just had a nasty scare. The large stack I have been working on suddenly became inaccessible, any attempt to open the stack causing the IDE to hang. (And of course my TimeMachine drive recently corrupted itself!) I could use the Inspector to edit the scripts of the stack, but I found nothing wrong there. The debugger just hung on "open stack.." So it was hanging on trying to display the existing cards. I could not use the Project Browser as seemingly the version we have needs to open/display the stack. I actually rather doubt the stack was recoverable using the current OXTLite.

I was able to use the LC Project Browser to examine the controls of the stack in the latest LC, as it seems to only need the stack in memory. The first thing I noticed was the stack had height 65,535. Fixing that did not help. Eventually I found that the menubar group had acquired a bunch of images which shouldn't be there - the stack operations do move a lot of images around, changing their layer, and I must have done something stoopid. Some of these images were located partly below the bottom of the stack. And the height of the card was larger than the (corrected) height of the stack. Removing the images from the menubar group resolved my issues. I surmise that, because this is on a Mac with editMenus set to false, the card was resized to greater than the stack height in order to hide the menubar, moving all my content down, and then the engine attempted, but failed, to resize the stack to match, and consequently hung the IDE .

There is a note in the documentation for the resizeStack message in LC that for this handler errors are suppressed because an (unknown? unfixed?)) error was hanging the IDE! So my guess is that a related bug has bitten me. It would be interesting to know when this note was added - after LCC, and possibly around the time of Sonoma? - I am using Ventura, not Sonoma, but I offer this sorry tale in case there is clue to resolve the Sonoma-menubar-images problem.
User avatar
tperry2x
Posts: 2392
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: menubar, images, IDE hang and resizeStack

Post by tperry2x »

That's interesting - I don't know why images would end up in the menubar group.
I think you could have used "start using stack" to load the stack into memory in OXT Lite / OXT, then you could have used the project browser to fix it in there without displaying it.

I'm intrigued - can you replicate the same error again with a sacrificial stack that doesn't matter? - if you can post the steps here, I'd be interested to see if this can be prevented in future.
no-imgs.png
no-imgs.png (44.42 KiB) Viewed 465 times
User avatar
OpenXTalkPaul
Posts: 2176
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: menubar, images, IDE hang and resizeStack

Post by OpenXTalkPaul »

In OXT DPE DP4 for Mac (I can't speak for OXT Lite) I had only done minimal cosmetic changes to Project Browser, there should be no difference in its behaviors from LC Community 9.6.3's behaviors.

I believe LOOOOONG ago, like classic/carbon era, the engine did allow to have icons in menubar menus on Mac OS (9), but I don't believe that works on modern macOS (although I am sure OS X+ / NSMenu does support that, it's the OXT engine that doesn't anymore).
User avatar
neville
Posts: 37
Joined: Wed Jul 31, 2024 1:03 am
Location: Canberra, Australia
Contact:

Re: menubar, images, IDE hang and resizeStack

Post by neville »

I'm intrigued - can you replicate the same error again with a sacrificial stack that doesn't matter? - if you can post the steps here, I'd be interested to see if this can be prevented in future.
To clarify, the error causing images to be placed into the menubar group was entirely mine, not an LC or OxT bug, it is just the subsequent IDE hang I would like to pin down - without success so far.

I created a test stack with a (Mac) menubar, and placed an image onto the card, at the bottom of the card, then copied that image into the menubar. The stack does resize to hide the menubar without triggering an IDE hang so something more is going on with my original bug - my original stack was much more complex, and I have no idea about all the steps that might have been involved. The test stack does however exhibit at least one possible bug. The card containing the menubar has a different size from the stack -I don't think that is supposed to happen since the card size is not writeable. And once on opening this test stack it resized incorrectly and at an offscreen position, but no hang yet. I attach it although I doubt if it is worth anyone's time in looking at it. Just worth noting the event in case something similar happens to others.
User avatar
tperry2x
Posts: 2392
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: menubar, images, IDE hang and resizeStack

Post by tperry2x »

Okay, thanks Neville.
I did want to redo the "Menu builder" stack anyway.
(I keep talking about it, never get a chance to look at it properly). Hopefully I can make this my next task.

If anyone wants to provide any mockups in Photoshop / Gimp / [image editor of your choice] uploaded here, as to how you want it to look and work... that would be most welcome.

If not, I'll just go off on my own tangent and put something together.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest