Hi, today I ran into a tricky problem.
My Desktop App evaluates Commandline Strings for importing files “headless” before the first window is opened.
So I am checking the Commandline String in the app.Open Event and do the import stuff.
When it is done, I am quitting the App.
So far so good… but this leads into hard crashes of my app… even within debugger.
What I am missing? Is app.Open Event the right place to do this?
Is it possible that my Quit Command causes this Inconsistency?
Here’s the systems’ error log:
Process: DataReader.debug [1674]
Path: /Users/USER/Documents/*/DataReader.debug.app/Contents/MacOS/DataReader.debug
Identifier: com.jakobssystems.DataReader
Version: 1.0 (1.0.0.3.21)
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: DataReader.debug [1674]
User ID: 501
Date/Time: 2014-12-18 23:35:20.838 +0100
OS Version: Mac OS X 10.10.1 (14B25)
Report Version: 11
Anonymous UUID: 8499CF80-6108-9289-669C-83C831F631D4
Sleep/Wake UUID: 43788E6A-4A45-489C-A974-2E476C1BEB94
Time Awake Since Boot: 23000 seconds
Time Since Wake: 19000 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSApp with wrong _running count'
Application Specific Backtrace 1:
0 CoreFoundation 0x92e7c343 __raiseError + 195
1 libobjc.A.dylib 0x9bf4ca2a objc_exception_throw + 276
2 CoreFoundation 0x92e7c1ca +[NSException raise:format:arguments:] + 138
3 Foundation 0x91ee22b1 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 118
4 AppKit 0x96e12bb2 -[NSApplication run] + 401
5 XojoFramework 0x006fdd77 SSLSettings_SetValidateCertificates + 1095
6 XojoFramework 0x006fc32f RuntimeRun + 49
7 DataReader.debug 0x0014d0e1 REALbasic._RuntimeRun + 34
8 DataReader.debug 0x0000590a _Main + 257
9 DataReader.debug 0x000026dc main + 36
10 DataReader.debug 0x00517193 start + 53
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x92e7ccd7 ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 7
1 com.apple.CoreFoundation 0x92e7c659 __raiseError + 985
2 libobjc.A.dylib 0x9bf4ca2a objc_exception_throw + 276
3 com.apple.CoreFoundation 0x92e7c1ca +[NSException raise:format:arguments:] + 138
4 com.apple.Foundation 0x91ee22b1 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 118
5 com.apple.AppKit 0x96e12bb2 -[NSApplication run] + 401
6 com.xojo.XojoFramework 0x006fdd77 0x5a9000 + 1396087
7 com.xojo.XojoFramework 0x006fc32f RuntimeRun + 49
8 com.jakobssystems.DataReader 0x0014d0e1 REALbasic._RuntimeRun + 34
9 com.jakobssystems.DataReader 0x0000590a _Main + 257
10 com.jakobssystems.DataReader 0x000026dc main + 36
11 com.jakobssystems.DataReader 0x00517193 start +
....