After submitting my app for review, I received a rejection on account of it crashing in MacOS 12.4 environment. The Objective-C app was developed in MacOS 12.4 and the app runs OK in Xcode and as a standalone executable. The crash log shows the exception type as SIGABRT and documentation. indicates that the crash may arise from an uncaught exception. Part of the crash log is shown below. How can I find out where the problem is occurring in my code?
Application Specific Backtrace 0:
0 CoreFoundation 0x00000001b15e5198 __exceptionPreprocess + 240
1 libobjc.A.dylib 0x00000001b132fe04 objc_exception_throw + 60
2 CoreFoundation 0x00000001b150cc98 -[__NSArrayM copyWithZone:] + 0
3 Caption Pro 0x000000010259db78 Caption Pro + 105336
4 Caption Pro 0x000000010259cc58 Caption Pro + 101464
5 Caption Pro 0x000000010259c720 Caption Pro + 100128
6 CoreFoundation 0x00000001b1558854 -[NSSet makeObjectsPerformSelector:] + 216
7 AppKit 0x00000001b40a678c -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1080
8 AppKit 0x00000001b409aa70 loadNib + 416
9 AppKit 0x00000001b4099fa0 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 800
10 AppKit 0x00000001b4099ba4 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 220
11 AppKit 0x00000001b4099974 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 388
12 AppKit 0x00000001b408b740 NSApplicationMain + 576
13 dyld 0x00000001027c508c start + 520
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x1b1462d98 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1b1497ee0 pthread_kill + 288
2 libsystem_c.dylib 0x1b13d2340 abort + 168
3 libc++abi.dylib 0x1b1452b08 abort_message + 132
4 libc++abi.dylib 0x1b1442950 demangling_terminate_handler() + 336
5 libobjc.A.dylib 0x1b1338320 _objc_terminate() + 144
6 libc++abi.dylib 0x1b1451ea4 std::__terminate(void (*)()) + 20
7 libc++abi.dylib 0x1b1454c1c __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 36
8 libc++abi.dylib 0x1b1454bc8 __cxa_throw + 140
9 libobjc.A.dylib 0x1b132ff6c objc_exception_throw + 420
10 CoreFoundation 0x1b150cc98 -[__NSSingleObjectArrayI objectAtIndex:] + 140
11 Caption Pro 0x10259db78 0x102584000 + 105336
12 Caption Pro 0x10259cc58 0x102584000 + 101464
13 Caption Pro 0x10259c720 0x102584000 + 100128
14 CoreFoundation 0x1b1558854 -[NSSet makeObjectsPerformSelector:] + 216
15 AppKit 0x1b40a678c -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1080
16 AppKit 0x1b409aa70 loadNib + 416
17 AppKit 0x1b4099fa0 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 800
18 AppKit 0x1b4099ba4 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 220
19 AppKit 0x1b4099974 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 388
20 AppKit 0x1b408b740 NSApplicationMain + 576
21 dyld 0x1027c508c start + 520
The error found by App Review was indeed an out-of-bounds array access caused by my reading CFBundleVersion as the app version rather than CFBundleShortVersionString. CFBundleVersion is actually the build version. I had set this to the app version (3.1.25) and all users except the App store reviewers read this sucessfully and split the version number into components at the ., but the App Store review environment seems to replace whatever you put in the field with the number of times you've submitted to the App Store. so the value was a single integer, which could not be split at '.'. This is why I could never reproduce the crash. I never succeeded in symbolicating the crash logs from App review in Xcode and have raised a separate query about that. Thanks for your help - maybe it will help avoid more frustration for Mac developers