menubar, images, IDE hang and resizeStack
Posted: Mon Sep 30, 2024 4:29 am
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.
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.