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