App won't launch, just bounces in dock forever

I am trying to recompile an app that hasn’t been updated in a couple of of years. I fixed some minor build errors under the new IDE, installed the latest MBS plugins, and went to run. The icon just bounces on and on and on for minutes and then stops bouncing and then the Finder tells me my app is not responding. I have to force quit it.

Any ideas how to proceed? I can’t even think how to debug it when I can’t even get to the point where I can step through the code and the compiler gives me an all clear on no errors when using “Command-K”

What gives?

Sounds like something is happening in the app.open or window.open event - perhaps a timeout or a tight loop. Try putting a break on the first line and step through.

Is the App perhaps codesigned and are you trying to run in on OSX 10.9 or lower?
I have the same here with one of my Apps.

What error message shows up in the console?

Yes, it is code signed, but I removed that external script, removed all the code from app.open, and it still just bounces in the dock. I am now at a loss of what else to remove to check it. :frowning:

You need to look in the console.

Make sure that you’re up to date with all your plugins and Xojo.

Have you registered the MBS plugins in the Open Event. I once had an issue where the debugging app ran but the compiled app didn’t (the app crashed) and it was because I hadn’t registered the MBS plugins and they were showing lots of warnings.

I am running the demo versions of Xojo and MBS as I want to see if they will compile before I spend $1000+ for everything.

Here is what console is telling me:

Heaviest stack for the main thread of the target process:
100 start + 53 (AppName.debug + 6736563) [0x66dab3]
100 main + 36 (AppName.debug + 6566033) [0x644091]
100 _Main + 191 (AppName.debug + 6678559) [0x65f81f]
100 _EarlyStartup + 100 (AppName.debug + 6678158) [0x65f68e]
100 _NewAppInstance + 202 (AppName.debug + 6642253) [0x656a4d]
100 MenuBar1.MenuBar1%o<MenuBar1.MenuBar1>% + 130 (AppName.debug + 2256075) [0x227ccb]
100 MenuBar1.MenuBar1.Constructor%%o<MenuBar1.MenuBar1> + 164 (AppName.debug + 2255726) [0x227b6e]
100 MenuBar1.MenuBar1.Untitled6%%o<MenuBar1.MenuBar1> + 3368 (AppName.debug + 2246036) [0x225594]
100 MenuItem.Append%%oo + 52 (AppName.debug + 112503) [0x1c777]
100 RuntimeMenuItemAppend + 38 (XojoFramework + 1166484) [0x92dc94]
100 ??? (XojoFramework + 1165951) [0x92da7f]
100 RuntimeRaiseException + 217 (XojoFramework + 1711641) [0x9b2e19]
100 ??? (XojoFramework + 1031272) [0x90cc68]
100 ??? (XojoFramework + 1021844) [0x90a794]
100 __semwait_signal + 10 (libsystem_kernel.dylib + 104694) [0x9a3f68f6]
*100 semaphore_wait_continue + 0 (kernel + 1353536) [0xffffff800034a740]

The report should tell you which thread crashed, most of the time it’s 0.

I see nothing weird in this snippet of the crash report.

I’d love to know whats in the menu bar & menu item constructors since these could be custom subclasses of either / both
thats where things appear to go off the rails

100 MenuBar1.MenuBar1.Constructor%%o<MenuBar1.MenuBar1> + 164 (AppName.debug + 2255726) [0x227b6e]
100 MenuBar1.MenuBar1.Untitled6%%o<MenuBar1.MenuBar1> + 3368 (AppName.debug + 2246036) [0x225594]
100 MenuItem.Append%%oo + 52 (AppName.debug + 112503) [0x1c777]
100 RuntimeMenuItemAppend + 38 (XojoFramework + 1166484) [0x92dc94]

Yes! The menubar seems to be the area of trouble. I deleted the whole menu bar and anything referencing it to see what would happen and my app was able to launch. So, the menu bar is causing this somehow, is there a way to pinpoint further where exactly the issue may be coming from?

Thanks!

custom menu item subclasses that have constructors CAN cause issues depending on how they are coded

I removed this one dynamic menu item and the app is launching fine! Thank you so, so, so much :slight_smile: