App crashes on launch

How do you go about debugging an app that compiles without errors, but crashes as soon as it launches? This is a mac app created in an earlier version of xojo (2014?) but compiled in 2021 1.1 after attempting to remove/repair the depreciated functions.

If I hit run, it compiles, attempts to launch, then immediately crashes with a warning from the Mac OS about sending a crash log.

Without seeing that crash log, there’s not much anyone can do to help. You can post the top couple of sections of it here and you should open a Feedback Case with the entire log.

I used some System.DebugLog lines in the “app.open” event which looks like this:


//load disclaimer
System.DebugLog(“started open event”)
Disclaimer="This product is for entertainment purposes only, and should not be used for official "_
+"weight and balance calculations or records. GlidePlan makes no claims or warrantees about the "_
+"accuracy of information contained within, or derived from this program. It is the sole responsibility "_
+“of the pilot in command to determine a safe and accurate center of gravity for the aircraft to be flown.”

U = new Units
AddGlider
LastSaved=WriteDocument
System.DebugLog(“Mark 1”)
EditGliderWindow.show
System.DebugLog(“Mark 2”)
NSA = new Secure
System.DebugLog(“Mark 3”)
NSA.ActivateGMOS
System.DebugLog(“Mark 4”)
NSA.ReadSNFile


It seems to crash between “Mark 1” and “mark 2” when showing EditGliderWindow. The console log looks like this:


default 17:20:28.455654 -0700 SeeG.debug started open event
default 17:20:28.456508 -0700 SeeG.debug Mark 1
error 17:20:28.535789 -0700 SeeG.debug Unable to simultaneously satisfy constraints:
(
“<NSLayoutConstraint:0x600001660550 NSToolbarButton:0x600000920f00.bottom <= NSStackView:0x7f90fc717020.top - 2 (active)>”,
“<NSLayoutConstraint:0x600001660500 V:|-(>=3)-[NSToolbarButton:0x600000920f00] (active, names: ‘|’:NSToolbarItemViewer:0x7f90fc722850 )>”,
“<NSLayoutConstraint:0x6000016605a0 NSStackView:0x7f90fc717020.bottom == NSToolbarItemViewer:0x7f90fc722850.bottom - 4 (active)>”,
“<NSLayoutConstraint:0x600001611e00 ‘NSView-Encapsulated-Layout-Height’ NSToolbarItemViewer:0x7f90fc722850.height == 1 (active)>”
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600001660550 NSToolbarButton:0x600000920f00.bottom <= NSStackView:0x7f90fc717020.top - 2 (active)>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, set a symbolic breakpoint on LAYOUT_CONSTRAINTS_NOT_SATISFIABLE to catch this in the debugger.
default 17:20:28.593176 -0700 SeeG.debug Mark 2
default 17:20:28.593221 -0700 SeeG.debug Mark 3
default 17:20:28.597781 -0700 hidd Connection removed: IOHIDEventSystemConnection uuid:B41B2CBC-E823-4E75-9FB3-652A96757B0E pid:8500 process:SeeG.debug type:Passive entitlements:0x0 caller:HIToolbox: ___GetIOHIDEventSystemClient_block_invoke + 26 attributes:(null) inactive:0
default 17:20:28.613802 -0700 loginwindow -[PersistentAppsSupport applicationQuit:] | for app:SeeG.debug, _appTrackingState = 2
default 17:20:28.613838 -0700 loginwindow -[PersistentAppsSupport applicationQuit:] | App: SeeG.debug, quit, updating active tracking timer
default 17:20:29.321184 -0700 ReportCrash Saved crash report for SeeG.debug[8500] version SeeG (1.0.2.3.51) to SeeG.debug_2021-06-20-172029_Matts-MacBook-Pro-4.crash
default 17:20:33.616348 -0700 loginwindow -[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] | previouslyRunningApps: (
{
BackgroundState = 0;
BundleID = “com.glideplan.seeg”;
Hide = 0;
Path = “/Users/Matthew/Desktop/SeeG Stuff/SeeG.debug.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.console”;
Hide = 0;
Path = “/Applications/Utilities/Console.app”;
},
{
BackgroundState = 2;
BundleID = “com.xojo.xojo”;
Hide = 0;
Path = “/Applications/Xojo 2021 Release 1.1/Xojo.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.safari”;
Hide = 0;
Path = “/Applications/Safari.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.mail”;
Hide = 0;
Path = “/Applications/Mail.app”;
},
{
BackgroundState = 2;
BundleID = “com.omnigroup.omnioutliner4”;
Hide = 0;
Path = “/Applications/OmniOutliner.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.finder”;
Hide = 0;
Path = “/System/Library/CoreServices/Finder.app”;
},
{
BackgroundState = 3;
BundleID = “com.adobe.acrobat.pro”;
Hide = 0;
Path = “/Applications/Adobe Acrobat DC/Adobe Acrobat.app”;
},
{
BackgroundState = 2;
BundleID = “com.c-command.spamsieve”;
Hide = 0;
Path = “/Applications/SpamSieve.app”;
}
)

I just commented out the “EditGliderWindow.show” line, and it still crashed, with this log:

default 17:28:13.784858 -0700 lsd Non-fatal error enumerating at , continuing: Error Domain=NSCocoaErrorDomain Code=260 “The file “PlugIns” couldn’t be opened because there is no such file.” UserInfo={NSURL=PlugIns/ – file:///Users/Matthew/Desktop/SeeG%20Stuff/SeeG.debug.app/Contents/, NSFilePath=/Users/Matthew/Desktop/SeeG Stuff/SeeG.debug.app/Contents/PlugIns, NSUnderlyingError=0x7fb983a45690 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
default 17:28:13.826210 -0700 loginwindow -[PersistentAppsSupport applicationReady:] | App: SeeG.debug, ready, updating active tracking timer
default 17:28:13.826279 -0700 loginwindow -[ApplicationManager checkInAppContext:refCon:eventData:] | checked in app : SeeG.debug
default 17:28:13.830025 -0700 distnoted register name: com.apple.sharedfilelist.change object: com.apple.LSSharedFileList.ApplicationRecentDocuments/com.glideplan.seeg token: f466a pid: 328
default 17:28:13.924770 -0700 launchservicesd CHECKIN:0x0-0x4c44c4 8525 com.glideplan.seeg
default 17:28:13.927221 -0700 loginwindow -[ApplicationManager checkInAppContext:refCon:eventData:] | checked in app : SeeG.debug
default 17:28:13.984012 -0700 lsd Non-fatal error enumerating at , continuing: Error Domain=NSCocoaErrorDomain Code=260 “The file “PlugIns” couldn’t be opened because there is no such file.” UserInfo={NSURL=PlugIns/ – file:///Users/Matthew/Desktop/SeeG%20Stuff/SeeG.debug.app/Contents/, NSFilePath=/Users/Matthew/Desktop/SeeG Stuff/SeeG.debug.app/Contents/PlugIns, NSUnderlyingError=0x7fe119322480 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
default 17:28:14.002456 -0700 SeeG.debug Current system appearance, (HLTB: 1), (SLS: 0)
default 17:28:14.009286 -0700 SeeG.debug Post-registration system appearance: (HLTB: 1)
default 17:28:14.030351 -0700 distnoted register name: com.apple.xctest.FakeForceTouchDevice object: com.glideplan.seeg token: f4263 pid: 8525
default 17:28:14.212053 -0700 SeeG.debug NSApp cache appearance:
-NSRequiresAquaSystemAppearance: 1
-appearance: (null)
-effectiveAppearance: <NSCompositeAppearance: 0x600002c38500
(
“<NSAquaAppearance: 0x600001a1cd40>”,
“<NSAccessibilitySystemAppearance: 0x600001a1cf80>”,
“<NSAquaAppearance: 0x600001a1ccc0>”,
“<NSSystemAppearance: 0x600001a1ce80>”
)>
default 17:28:14.222577 -0700 distnoted register name: com.apple.nsquiet_safe_quit_give_reason object: com.glideplan.seeg token: f4278 pid: 8525
error 17:28:14.278158 -0700 tccd Failed to copy signing info for 8525, responsible for file:///Users/Matthew/Desktop/SeeG%20Stuff/SeeG.debug.app/Contents/MacOS/SeeG.debug: #-67062: Error Domain=NSOSStatusErrorDomain Code=-67062 “(null)”
default 17:28:14.284129 -0700 tccd -[TCCDAccessIdentity staticCode]: static code for: identifier com.glideplan.seeg, type: 0: 0x7f8c2aa07d40 at /Users/Matthew/Desktop/SeeG Stuff/SeeG.debug.app
default 17:28:14.395829 -0700 hidd Connection added: IOHIDEventSystemConnection uuid:8ACA06D0-A3E7-42CF-8119-A319D8B26264 pid:8525 process:SeeG.debug type:Passive entitlements:0x0 caller:HIToolbox: ___GetIOHIDEventSystemClient_block_invoke + 26 attributes:(null) inactive:1
default 17:28:18.829859 -0700 loginwindow -[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] | checkAgainstApp is : SeeG.debug
default 17:28:18.829878 -0700 loginwindow -[PersistentAppsSupport appShouldBeRelaunched:] | entered. checking app: SeeG.debug
default 17:28:18.829910 -0700 loginwindow -[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] | Adding to relaunchArray: SeeG.debug
default 17:28:18.842452 -0700 loginwindow -[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] | Contents:(
{
BackgroundState = 0;
BundleID = “com.glideplan.seeg”;
Hide = 0;
Path = “/Users/Matthew/Desktop/SeeG Stuff/SeeG.debug.app”;
},
{
BackgroundState = 2;
BundleID = “com.xojo.xojo”;
Hide = 0;
Path = “/Applications/Xojo 2021 Release 1.1/Xojo.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.console”;
Hide = 0;
Path = “/Applications/Utilities/Console.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.safari”;
Hide = 0;
Path = “/Applications/Safari.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.mail”;
Hide = 0;
Path = “/Applications/Mail.app”;
},
{
BackgroundState = 2;
BundleID = “com.omnigroup.omnioutliner4”;
Hide = 0;
Path = “/Applications/OmniOutliner.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.finder”;
Hide = 0;
Path = “/System/Library/CoreServices/Finder.app”;
},
{
BackgroundState = 3;
BundleID = “com.adobe.acrobat.pro”;
Hide = 0;
Path = “/Applications/Adobe Acrobat DC/Adobe Acrobat.app”;
},
{
BackgroundState = 2;
BundleID = “com.c-command.spamsieve”;
Hide = 0;
Path = “/Applications/SpamSieve.app”;
}
)
default 17:28:24.237154 -0700 SeeG.debug LSExceptions shared instance invalidated for timeout.
default 17:28:26.738751 -0700 SeeG.debug started open event
default 17:28:26.739541 -0700 SeeG.debug Mark 1
default 17:28:26.739599 -0700 SeeG.debug Mark 2
default 17:28:26.739645 -0700 SeeG.debug Mark 3
default 17:28:26.744185 -0700 hidd Connection removed: IOHIDEventSystemConnection uuid:8ACA06D0-A3E7-42CF-8119-A319D8B26264 pid:8525 process:SeeG.debug type:Passive entitlements:0x0 caller:HIToolbox: ___GetIOHIDEventSystemClient_block_invoke + 26 attributes:(null) inactive:0
default 17:28:26.759832 -0700 loginwindow -[PersistentAppsSupport applicationQuit:] | for app:SeeG.debug, _appTrackingState = 2
default 17:28:26.759867 -0700 loginwindow -[PersistentAppsSupport applicationQuit:] | App: SeeG.debug, quit, updating active tracking timer
default 17:28:27.471629 -0700 ReportCrash Saved crash report for SeeG.debug[8525] version SeeG (1.0.2.3.51) to SeeG.debug_2021-06-20-172827_Matts-MacBook-Pro-4.crash
default 17:28:31.761515 -0700 loginwindow -[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] | previouslyRunningApps: (
{
BackgroundState = 0;
BundleID = “com.glideplan.seeg”;
Hide = 0;
Path = “/Users/Matthew/Desktop/SeeG Stuff/SeeG.debug.app”;
},
{
BackgroundState = 2;
BundleID = “com.xojo.xojo”;
Hide = 0;
Path = “/Applications/Xojo 2021 Release 1.1/Xojo.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.console”;
Hide = 0;
Path = “/Applications/Utilities/Console.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.safari”;
Hide = 0;
Path = “/Applications/Safari.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.mail”;
Hide = 0;
Path = “/Applications/Mail.app”;
},
{
BackgroundState = 2;
BundleID = “com.omnigroup.omnioutliner4”;
Hide = 0;
Path = “/Applications/OmniOutliner.app”;
},
{
BackgroundState = 2;
BundleID = “com.apple.finder”;
Hide = 0;
Path = “/System/Library/CoreServices/Finder.app”;
},
{
BackgroundState = 3;
BundleID = “com.adobe.acrobat.pro”;
Hide = 0;
Path = “/Applications/Adobe Acrobat DC/Adobe Acrobat.app”;
},
{
BackgroundState = 2;
BundleID = “com.c-command.spamsieve”;
Hide = 0;
Path = “/Applications/SpamSieve.app”;
}
)

I’ve definitely had iOS apps crash because of a bad layout constraint. Looks like yours is in EditGliderWindow, although I don’t have recent desktop app experience to tell you more.

And then there’s the missing PlugIns.

And then there’s something related to Passive Entitlements and signing.

When the app crashes on macOS, it shows a dialog, copy paste the contents of that dialog as that is the crash report. This will provide more information as to what is causing the crash. Sometimes, it can tell you exactly what is causing the crash, othertimes it can take a while.

The crash dialog will only be shown if he’s using developer mode.

Looking through that crash log, these two items jump out to me:

Unable to simultaneously satisfy constraints:

set a symbolic breakpoint on LAYOUT_CONSTRAINTS_NOT_SATISFIABLE to catch this in the debugger.

It seems to me that you’ve got a constraint problem… and that’d definitely make your app crash.

Are you using any declares or plugins for layout purposes on this window?

While spelunking the logs the other day, I see this message a lot for Apple’s own apps also.

Do you mean this? Crash an application on NSException - #20 by Sam_Rowlands

No. I mean a tool that Apple provides called CrashReporterPrefs which allows you to specify how crash reports are shown. It’s part of the Xcode Additional Tools and looks like this:

Basic is the default, but if you somehow got your machine set to Server or the “Display alert dialog for uncaught exceptions.” turned off, you might not see the dialog.

Do you mean these?
https://download.developer.apple.com/Developer_Tools/Additional_Tools_for_Xcode_13_beta/Additional_Tools_for_Xcode_13_beta.dmg

The page gives an error “Sorry, you aren’t authorized”.

Yes

Thanks @Greg_O_Lone for letting us know.

@Beatrix_Willius Urm… Try going to developer.apple.com first, logging-in and then trying the link again.

No dice.

Please try to download the Xcode 13 beta first. I had the same error message “Sorry, you’re not …”, went to Downloads, Applications and clicked on Xcode 13 Beta (but stopped download, because on my Mojave it won’t work). After that, Sam’s link worked fine…

1 Like

Error messages are so really very hard. Okay, downloading now.

1 Like

Either that or download the additions tools that go with the version of Xcode that you’re using. You can get to that where you download historical versions of Xcode.

https://developer.apple.com/download/all/?q=Additional

1 Like