Hi,
I'm currently developping a new Mac OS target built along the iOS one. When launching the Mac app from within Xcode, it crashes in within the 30 secondes. The crash log is not related to my application but to Xcode. When running my app stand-alone. It runs ok, no crash.
The crash is on a very common mistake (invalid string range), and I can't figure why this bug is not widely reported.
More intringuing is that there are time ranges (not always the same) where Xcode stops crashing. !?
Here Below is the beginning of a crash log, if anyone has a clue.
Process: Xcode [42747]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 8.3.3 (12175.1)
Build Info: IDEFrameworks-12175001000000000~12
App Item ID: 497799835
App External ID: 822319371
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [42747]
User ID: 501
Date/Time: 2017-08-13 16:52:54.372 +0200
OS Version: Mac OS X 10.12.6 (16G29)
Report Version: 12
Anonymous UUID: F9270CC0-2D36-9A8E-EC2F-95106C92C413
Sleep/Wake UUID: E383A60D-2027-405E-B4F0-C32BD26C60F4
Time Awake Since Boot: 370000 seconds
Time Since Wake: 13000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
ProductBuildVersion: 8E3004b
UNCAUGHT EXCEPTION (NSRangeException): -[__NSCFConstantString substringWithRange:]: Range {0, 63} out of bounds; string length 0
UserInfo: (null)
Hints:
Backtrace:
0 __exceptionPreprocess (in CoreFoundation)
1 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
2 objc_exception_throw (in libobjc.A.dylib)
3 +[NSException raise:format:] (in CoreFoundation)
4 -[__NSCFString substringWithRange:] (in CoreFoundation)
5 -[iCloudClientConnection processOutput] (in iCloudSupport)
6 __45-[iCloudClientConnection stream:handleEvent:]_block_invoke (in iCloudSupport)
7 DVTInvokeWithStrongOwnership (in DVTFoundation)
8 -[iCloudClientConnection stream:handleEvent:] (in iCloudSupport)
9 _signalEventSync (in CoreFoundation)
10 _cfstream_shared_signalEventSync (in CoreFoundation)
11 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (in CoreFoundation)
12 __CFRunLoopDoSources0 (in CoreFoundation)
13 __CFRunLoopRun (in CoreFoundation)
14 CFRunLoopRunSpecific (in CoreFoundation)
15 RunCurrentEventLoopInMode (in HIToolbox)
16 ReceiveNextEventCommon (in HIToolbox)
17 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
18 _DPSNextEvent (in AppKit)
19 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
20 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
21 -[NSApplication run] (in AppKit)
22 NSApplicationMain (in AppKit)
23 start (in libdyld.dylib)
abort() called
Application Specific Signatures:
NSRangeException
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fffba99d2cb __exceptionPreprocess + 171
1 DVTFoundation 0x0000000107341aeb DVTFailureHintExceptionPreprocessor + 194
2 libobjc.A.dylib 0x00007fffcf7ae48d objc_exception_throw + 48
3 CoreFoundation 0x00007fffbaa1bc3d +[NSException raise:format:] + 205
4 CoreFoundation 0x00007fffba8eb37b -[__NSCFString substringWithRange:] + 171
5 iCloudSupport 0x0000000120a706a0 -[iCloudClientConnection processOutput] + 398
6 iCloudSupport 0x0000000120a70c2c __45-[iCloudClientConnection stream:handleEvent:]_block_invoke + 460
7 DVTFoundation 0x000000010726c39d DVTInvokeWithStrongOwnership + 75
8 iCloudSupport 0x0000000120a70a36 -[iCloudClientConnection stream:handleEvent:] + 124
9 CoreFoundation 0x00007fffba953d64 _signalEventSync + 228
10 CoreFoundation 0x00007fffba96fe8d _cfstream_shared_signalEventSync + 461
11 CoreFoundation 0x00007fffba933321 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
12 CoreFoundation 0x00007fffba91421d __CFRunLoopDoSources0 + 557
13 CoreFoundation 0x00007fffba913716 __CFRunLoopRun + 934
14 CoreFoundation 0x00007fffba913114 CFRunLoopRunSpecific + 420
15 HIToolbox 0x00007fffb9e74ebc RunCurrentEventLoopInMode + 240
16 HIToolbox 0x00007fffb9e74cf1 ReceiveNextEventCommon + 432
17 HIToolbox 0x00007fffb9e74b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
18 AppKit 0x00007fffb840da54 _DPSNextEvent + 1120
19 AppKit 0x00007fffb8b897ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
20 DVTKit 0x00000001079052e4 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 394
21 AppKit 0x00007fffb84023db -[NSApplication run] + 926
22 AppKit 0x00007fffb83cce0e NSApplicationMain + 1237
23 libdyld.dylib 0x000000010a9b9235 start + 1