iOS device crashes in production - nativescript

Last week I deployed our new iOS app (NS 6.4) to the AppStore. Looking at the crash reports I saw a spike since the deploy. Below is the first lines of one of the .crash files: (they were all the same)
Incident Identifier: 7A8E1E30-70BA-482D-A135-E67743F1A4BA
CrashReporter Key: e7ee2942556381a1f0080313b3dc1a75729c6a48
Hardware Model: iPhone12,5
Process: AppName [15439]
Path: /private/var/containers/Bundle/Application/5886549A-F2CB-4FFB-A227-6BBD5C220630/AppName.app/AppName
Identifier: com.company.app
Version: 5.04 (5.00)
AppStoreTools: 11E608a
AppVariant: 1:iPhone12,5:13
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.company.app [4044]
Date/Time: 2020-06-22 05:41:30.6832 -0400
Launch Time: 2020-06-22 05:38:03.9046 -0400
OS Version: iPhone OS 13.5.1 (17F80)
Release Type: User
Baseband Version: 1.06.00
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x18d7fc300 __exceptionPreprocess + 228 (NSException.m:199)
1 libobjc.A.dylib 0x18d510c1c objc_exception_throw + 60 (objc-exception.mm:565)
2 NativeScript 0x1056e6e00 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool) + 1528
3 NativeScript 0x10572102c NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*) + 120
4 NativeScript 0x10628e768 ffi_closure_SYSV_inner + 996
5 NativeScript 0x1062901b4 .Ldo_closure + 20
6 CoreFoundation 0x18d754474 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:787)
7 CoreFoundation 0x18d7544c4 ___CFXRegistrationPost1_block_invoke + 68 (CFNotificationCenter.c:175)
8 CoreFoundation 0x18d7537b4 _CFXRegistrationPost1 + 396 (CFNotificationCenter.c:198)
9 CoreFoundation 0x18d753468 ___CFXNotificationPost_block_invoke + 92 (CFNotificationCenter.c:1371)
10 CoreFoundation 0x18d6cc928 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1420 (CFXNotificationRegistrarOld.m:168)
11 CoreFoundation 0x18d752da8 _CFXNotificationPost + 1260 (CFNotificationCenter.c:1359)
12 Foundation 0x18dab939c -[NSNotificationCenter postNotificationName:object:userInfo:] + 64 (NSNotification.m:576)
13 UIKitCore 0x19194aabc -[UIApplication _terminateWithStatus:] + 304 (UIApplication.m:6719)
14 UIKitCore 0x1910b3718 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 128 (_UISceneLifecycleMultiplexer.m:765)
15 UIKitCore 0x1910b337c -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 220 (_UISceneLifecycleMultiplexer.m:418)
16 UIKitCore 0x191940ac4 -[UIApplication workspaceShouldExit:withTransitionContext:] + 216 (UIApplication.m:3725)
17 FrontBoardServices 0x192a57cf8 -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:] + 88 (FBSUIApplicationWorkspace.m:144)
18 FrontBoardServices 0x192a84d68 __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke_2 + 80 (FBSWorkspaceScenesClient.m:281)
19 FrontBoardServices 0x192a69ebc -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:357)
20 FrontBoardServices 0x192a84cf4 __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke + 140 (FBSWorkspaceScenesClient.m:278)
21 libdispatch.dylib 0x18d49c33c _dispatch_client_callout + 20 (object.m:495)
22 libdispatch.dylib 0x18d49f0d4 _dispatch_block_invoke_direct + 264 (queue.c:466)
23 FrontBoardServices 0x192aab6c4 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:173)
24 FrontBoardServices 0x192aab370 -[FBSSerialQueue _queue_performNextIfPossible] + 432 (FBSSerialQueue.m:216)
25 FrontBoardServices 0x192aab8dc -[FBSSerialQueue _performNextFromRunLoopSource] + 32 (FBSSerialQueue.m:247)
26 CoreFoundation 0x18d777af4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1922)
27 CoreFoundation 0x18d777a48 __CFRunLoopDoSource0 + 84 (CFRunLoop.c:1956)
28 CoreFoundation 0x18d777198 __CFRunLoopDoSources0 + 196 (CFRunLoop.c:1992)
29 CoreFoundation 0x18d771f38 __CFRunLoopRun + 796 (CFRunLoop.c:2882)
30 CoreFoundation 0x18d7718f4 CFRunLoopRunSpecific + 480 (CFRunLoop.c:3192)
31 GraphicsServices 0x197b88604 GSEventRunModal + 164 (GSEvent.c:2246)
32 UIKitCore 0x191945358 UIApplicationMain + 1944 (UIApplication.m:4823)
33 NativeScript 0x106290044 ffi_call_SYSV + 68
34 NativeScript 0x10628de8c ffi_call_int + 1272
35 NativeScript 0x10628d988 ffi_call + 56
36 NativeScript 0x1056a946c NativeScript::FunctionWrapper::call(JSC::ExecState*) + 596
37 NativeScript 0x10625ac60 0x1056a0000 + 12299360
38 NativeScript 0x106258078 0x1056a0000 + 12288120
39 NativeScript 0x106258078 0x1056a0000 + 12288120
40 NativeScript 0x106258078 0x1056a0000 + 12288120
...
What does all this mean? It seems like an internal NS error, but I am not sure where to look for any clues on what it is. How can I fix it?
Thanks.

Related

I can't run the HelloWorld.xcworkspace file

This is the error log I get from Xcode. So far I've been using the xcworkspace but now since I've added pods to my project I can't do this anymore as far as I read :)
So the build succeeds but:
2019-08-16 18:41:29.967914+0300 HelloWorld[5103:5848737] 6.6.0 - [Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
2019-08-16 18:41:29.987801+0300 HelloWorld[5103:5848024] *** Terminating app due to uncaught exception 'com.firebase.core', reason: '`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000107afc6fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x0000000105b14ac5 objc_exception_throw + 48
2 CoreFoundation 0x0000000107afc555 +[NSException raise:format:] + 197
3 HelloWorld 0x0000000102f70f2a +[FIRApp configure] + 138
4 HelloWorld 0x0000000102f70510 -[AppDelegate application:didFinishLaunchingWithOptions:] + 96
5 UIKitCore 0x00000001124c5311 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 280
6 UIKitCore 0x00000001124c6cad -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3932
7 UIKitCore 0x00000001124cc0c6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1617
8 UIKitCore 0x0000000111d116d6 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 904
9 UIKitCore 0x0000000111d19fce +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
10 UIKitCore 0x0000000111d112ec -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
11 UIKitCore 0x0000000111d11c48 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1091
12 UIKitCore 0x0000000111d0ffba __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 782
13 UIKitCore 0x0000000111d0fc71 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
14 UIKitCore 0x0000000111d149b6 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 576
15 UIKitCore 0x0000000111d15610 _performActionsWithDelayForTransitionContext + 100
16 UIKitCore 0x0000000111d1471d -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
17 UIKitCore 0x0000000111d196d0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
18 UIKitCore 0x00000001124ca9a8 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 514
19 UIKitCore 0x0000000112081dfa -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
20 FrontBoardServices 0x0000000110fd3125 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
21 FrontBoardServices 0x0000000110fdced6 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 283
22 FrontBoardServices 0x0000000110fdc700 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
23 libdispatch.dylib 0x0000000109f97db5 _dispatch_client_callout + 8
24 libdispatch.dylib 0x0000000109f9b2ba _dispatch_block_invoke_direct + 300
25 FrontBoardServices 0x000000011100e146 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
26 FrontBoardServices 0x000000011100ddfe -[FBSSerialQueue _performNext] + 451
27 FrontBoardServices 0x000000011100e393 -[FBSSerialQueue _performNextFromRunLoopSource] + 42
28 CoreFoundation 0x0000000107a63be1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
29 CoreFoundation 0x0000000107a63463 __CFRunLoopDoSources0 + 243
30 CoreFoundation 0x0000000107a5db1f __CFRunLoopRun + 1231
31 CoreFoundation 0x0000000107a5d302 CFRunLoopRunSpecific + 626
32 GraphicsServices 0x000000010d7362fe GSEventRunModal + 65
33 UIKitCore 0x00000001124cdba2 UIApplicationMain + 140
34 HelloWorld 0x0000000102f70a00 main + 112
35 libdyld.dylib 0x000000010715e541 start + 1
36 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Add GoogleService-Info.plist to the project file. Seems it cannot be found

Main Thread Checker Warnings coming from Sinch Video Library

I'm using SinchRTC 3.11.1 in my IOS App. When I enter a video chat the following warnings are being produced because of the Sinch library. A few UI API calls are being done from a background thread instead of the main UI thread. Can these be fixed within the library?
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 96751, TID: 7066961, Thread name: Sinch Worker Thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 XXXXXX 0x0000000105d7eb41 -[SINClientImpl onPubSubSubscriptionConnectionEvent] + 66
5 XXXXXX 0x0000000105d7ec84 -[SINClientImpl onPubSubSubscriptionSuccess:] + 197
6 CoreFoundation 0x0000000108740a3c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
7 CoreFoundation 0x000000010874093a _CFXRegistrationPost + 442
8 CoreFoundation 0x0000000108740682 ___CFXNotificationPost_block_invoke + 50
9 CoreFoundation 0x0000000108702a02 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
10 CoreFoundation 0x0000000108701b7c _CFXNotificationPost + 652
11 Foundation 0x0000000109ec0172 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
12 XXXXXX 0x0000000105d9b8c7 -[SINPubSubscriber notify:userInfo:] + 336
13 XXXXXX 0x0000000105d9ba46 -[SINPubSubscriber subscribeDidSucceedOnChannel:sequence:withRequestedTimetoken:] + 220
14 XXXXXX 0x0000000105d92515 -[PubnubSubscriber request:withInitialTimeToken:didSucceedWithResponse:] + 435
15 XXXXXX 0x0000000105d920d5 __43-[PubnubSubscriber subscribeWithTimeToken:]_block_invoke + 111
16 XXXXXX 0x0000000105d909ce __52-[PubnubService performRequest:onSuccess:onFailure:]_block_invoke.42 + 143
17 XXXXXX 0x0000000105d8ffc9 -[PubnubRequestOperation operationWillFinish] + 284
18 XXXXXX 0x0000000105d6902d -[SINQRunLoopOperation finishWithError:] + 70
19 XXXXXX 0x0000000105d68536 -[SINQHTTPOperation finishWithError:] + 41
20 CFNetwork 0x0000000107f7e0e5 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 53
21 CFNetwork 0x0000000107f7e00a -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 198
22 CFNetwork 0x0000000107f7df32 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48
23 CFNetwork 0x0000000107f823b3 ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 100
24 CFNetwork 0x00000001081283cb ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 100
25 libdispatch.dylib 0x0000000110e8a658 _dispatch_client_callout + 8
26 libdispatch.dylib 0x0000000110e8fe6b _dispatch_block_invoke_direct + 589
27 CFNetwork 0x0000000107f7de04 _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 24
28 CoreFoundation 0x00000001086f35d8 CFArrayApplyFunction + 72
29 CFNetwork 0x0000000107f7dcda _ZN19RunloopBlockContext7performEv + 132
30 CFNetwork 0x0000000107f7db78 _ZN17MultiplexerSource7performEv + 282
31 CFNetwork 0x0000000107f7d9ab _ZN17MultiplexerSource8_performEPv + 65
32 CoreFoundation 0x0000000108747e71 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
33 CoreFoundation 0x000000010872c56f __CFRunLoopDoSources0 + 271
34 CoreFoundation 0x000000010872bb1f __CFRunLoopRun + 1039
35 CoreFoundation 0x000000010872b499 CFRunLoopRunSpecific + 409
36 Foundation 0x0000000109eda22e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 274
37 XXXXXX 0x0000000105cf8bd8 _ZN4base20MessagePumpNSRunLoop2017-07-12 12:20:51.360149-0700 XXXXXX[96751:7066961] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 96751, TID: 7066961, Thread name: Sinch Worker Thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 XXXXXX 0x0000000105d7eb41 -[SINClientImpl onPubSubSubscriptionConnectionEvent] + 66
5 XXXXXX 0x0000000105d7ec84 -[SINClientImpl onPubSubSubscriptionSuccess:] + 197
6 CoreFoundation 0x0000000108740a3c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
7 CoreFoundation 0x000000010874093a _CFXRegistrationPost + 442
8 CoreFoundation 0x0000000108740682 ___CFXNotificationPost_block_invoke + 50
9 CoreFoundation 0x0000000108702a02 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
10 CoreFoundation 0x0000000108701b7c _CFXNotificationPost + 652
11 Foundation 0x0000000109ec0172 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
12 XXXXXX 0x0000000105d9b8c7 -[SINPubSubscriber notify:userInfo:] + 336
13 XXXXXX 0x0000000105d9ba46 -[SINPubSubscriber subscribeDidSucceedOnChannel:sequence:withRequestedTimetoken:] + 220
14 XXXXXX 0x0000000105d92515 -[PubnubSubscriber request:withInitialTimeToken:didSucceedWithResponse:] + 435
15 XXXXXX 0x0000000105d920d5 __43-[PubnubSubscriber subscribeWithTimeToken:]_block_invoke + 111
16 XXXXXX 0x0000000105d909ce __52-[PubnubService performRequest:onSuccess:onFailure:]_block_invoke.42 + 143
17 XXXXXX 0x0000000105d8ffc9 -[PubnubRequestOperation operationWillFinish] + 284
18 XXXXXX 0x0000000105d6902d -[SINQRunLoopOperation finishWithError:] + 70
19 XXXXXX 0x0000000105d68536 -[SINQHTTPOperation finishWithError:] + 41
20 CFNetwork 0x0000000107f7e0e5 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 53
21 CFNetwork 0x0000000107f7e00a -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 198
22 CFNetwork 0x0000000107f7df32 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48
23 CFNetwork 0x0000000107f823b3 ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 100
24 CFNetwork 0x00000001081283cb ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 100
25 libdispatch.dylib 0x0000000110e8a658 _dispatch_client_callout + 8
26 libdispatch.dylib 0x0000000110e8fe6b _dispatch_block_invoke_direct + 589
27 CFNetwork 0x0000000107f7de04 _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 24
28 CoreFoundation 0x00000001086f35d8 CFArrayApplyFunction + 72
29 CFNetwork 0x0000000107f7dcda _ZN19RunloopBlockContext7performEv + 132
30 CFNetwork 0x0000000107f7db78 _ZN17MultiplexerSource7performEv + 282
31 CFNetwork 0x0000000107f7d9ab _ZN17MultiplexerSource8_performEPv + 65
32 CoreFoundation 0x0000000108747e71 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
33 CoreFoundation 0x000000010872c56f __CFRunLoopDoSources0 + 271
34 CoreFoundation 0x000000010872bb1f __CFRunLoopRun + 1039
35 CoreFoundation 0x000000010872b499 CFRunLoopRunSpecific + 409
36 Foundation 0x0000000109eda22e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 274
37 XXXXXX 0x0000000105cf8bd8 _ZN4base20MessagePumpNSRunLoop
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 96751, TID: 7066464, Thread name: (none), Queue name: com.sinch.SINVideoCapturer.session, QoS: 25
Backtrace:
4 XXXXXX 0x0000000105d66f4f -[SINVideoCapturer startWithPreset_sq:frameRate:] + 505
5 libdispatch.dylib 0x0000000110e8966d _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x0000000110e8a658 _dispatch_client_callout + 8
7 libdispatch.dylib 0x0000000110e9308c _dispatch_queue_serial_drain + 1173
8 libdispatch.dylib 0x0000000110e93aa5 _dispatch_queue_invoke + 342
9 libdispatch.dylib 0x0000000110e96d3b _dispatch_root_queue_drain + 785
10 libdispatch.dylib 0x0000000110e969c7 _dispatch_worker_thread4 + 54
11 libsystem_pthread.dylib 0x00000001112ed616 _pthread_wqthread + 1299
12 libsystem_pthread.dylib 0x00000001112ed0f1 start_wqthread + 13
2017-07-12 12:20:52.112965-0700 XXXXXX[96751:7066464] [reports] Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 96751, TID: 7066464, Thread name: (none), Queue name: com.sinch.SINVideoCapturer.session, QoS: 25
Backtrace:
4 XXXXXX 0x0000000105d66f4f -[SINVideoCapturer startWithPreset_sq:frameRate:] + 505
5 libdispatch.dylib 0x0000000110e8966d _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x0000000110e8a658 _dispatch_client_callout + 8
7 libdispatch.dylib 0x0000000110e9308c _dispatch_queue_serial_drain + 1173
8 libdispatch.dylib 0x0000000110e93aa5 _dispatch_queue_invoke + 342
9 libdispatch.dylib 0x0000000110e96d3b _dispatch_root_queue_drain + 785
10 libdispatch.dylib 0x0000000110e969c7 _dispatch_worker_thread4 + 54
11 libsystem_pthread.dylib 0x00000001112ed616 _pthread_wqthread + 1299
12 libsystem_pthread.dylib 0x00000001112ed0f1 start_wqthread + 13
That is because Xcode 9 features a new main thread checker that checks whether UI API's are executed in Main thread. UI operations are bound to cause problems in a non-main thread. You have to update your SinchRTC to fix this runtime issue. The developers of SinchRTC should patch this and release an update. Hope this helps. For more info., refer this link.
The library should fix theses errors but if you want to disable it you can do it in the scheme, in the Diagnostics option.

SIGSEGV Crash with NSKeyValuePushPendingNotificationPerThread

I have an app on the Mac App Store, and I get these crash reports from my users which I cannot reproduce or figure out how to debug. It seem like something crashes due to NSManagedObjectContext reset, but it's not obvious, and users don't have a reproducible case. The main thread can have a different stack trace, but the non-main thread always has the same stack trace.
Exception Type: SIGSEGV
Exception Codes: SEGV_MAPERR at 0x41bfc026bec0
Crashed Thread: 8
Application Specific Information:
Selector name found in current argument registers: retain
Thread 0:
0 libFontParser.dylib 0x00007fff8efa7921 _ZNK20TTrueTypeFontHandler11RenderGlyphEtR27TTrueTypeQuadOutlineContextj + 89
1 libFontParser.dylib 0x00007fff8efa789e _ZNK20TTrueTypeFontHandler14GetOutlinePathEtRK18TGlyphOutlineBatch + 60
2 libFontParser.dylib 0x00007fff8efa744a FPFontCopyGlyphPath + 394
3 CoreGraphics 0x00007fff8767e913 CGFontCreateGlyphPath + 44
4 CoreGraphics 0x00007fff8767e85d CGFontCreateGlyphBitmap + 437
5 CoreGraphics 0x00007fff8767e607 _ZN14CGGlyphBuilder22create_missing_bitmapsEPK17CGGlyphIdentifiermPPK13CGGlyphBitmap + 109
6 libRIP.A.dylib 0x00007fff8b7bec2d render_glyphs + 204
7 libRIP.A.dylib 0x00007fff8b7bdf6f draw_glyph_bitmaps + 1585
8 libRIP.A.dylib 0x00007fff8b7bd8cd ripc_DrawGlyphs + 2785
9 CoreGraphics 0x00007fff87738077 draw_glyphs + 1034
10 CoreText 0x00007fff8ac50426 _ZL25DrawSbixGlyphsAtPositionsPK5TFontP6CGFontRK6TCFRefIPK8__CFDataEPKtPK7CGPointmP9CGContext17CGAffineTransformSI_ + 2990
11 CoreText 0x00007fff8abfdb73 CTFontDrawGlyphsWithAdvances + 789
12 UIFoundation 0x00007fff966f212e -[NSLineFragmentRenderingContext drawAtPoint:inContext:] + 5398
13 UIFoundation 0x00007fff96616728 __NSStringDrawingEngine + 16941
14 UIFoundation 0x00007fff966108ff _NSStringDrawingCore + 150
15 AppKit 0x00007fff93ce6d50 _NSDrawTextCell + 6954
16 AppKit 0x00007fff9421cdf8 __47-[NSTextFieldCell drawLayer:inGraphicsContext:]_block_invoke + 576
17 AppKit 0x00007fff944aa538 +[NSAppearance _performWithCurrentAppearance:usingBlock:] + 79
18 AppKit 0x00007fff93cf6739 -[NSTextFieldCell drawLayer:inGraphicsContext:] + 225
19 AppKit 0x00007fff93cf6470 +[NSGraphicsContext configureGraphicsContextForCALayer:withCGContext:andRenderWithHandler:] + 97
20 QuartzCore 0x00007fff939f1e93 CABackingStoreUpdate_ + 3306
21 QuartzCore 0x00007fff939f11a3 ___ZN2CA5Layer8display_Ev_block_invoke + 59
22 QuartzCore 0x00007fff939f115f x_blame_allocations + 81
23 QuartzCore 0x00007fff939f0c5c _ZN2CA5Layer8display_Ev + 1546
24 AppKit 0x00007fff93ce039f _NSBackingLayerDisplay + 617
25 QuartzCore 0x00007fff939f0381 _ZN2CA5Layer17display_if_neededEPNS_11TransactionE + 603
26 QuartzCore 0x00007fff939efabd _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 35
27 QuartzCore 0x00007fff939ef24e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
28 QuartzCore 0x00007fff939eeea4 _ZN2CA11Transaction6commitEv + 390
29 QuartzCore 0x00007fff939ffcad _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 71
30 CoreFoundation 0x00007fff8bbd0da7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
31 CoreFoundation 0x00007fff8bbd0d00 __CFRunLoopDoObservers + 368
32 CoreFoundation 0x00007fff8bbc2878 CFRunLoopRunSpecific + 328
33 HIToolbox 0x00007fff918f1aef RunCurrentEventLoopInMode + 235
34 HIToolbox 0x00007fff918f176e ReceiveNextEventCommon + 179
35 HIToolbox 0x00007fff918f16ab _BlockUntilNextEventMatchingListInModeWithFilter + 71
36 AppKit 0x00007fff93bb0f81 _DPSNextEvent + 964
37 AppKit 0x00007fff93bb0730 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
38 AppKit 0x00007fff93ba4593 -[NSApplication run] + 594
39 AppKit 0x00007fff93b8fa14 NSApplicationMain + 1832
40 libdyld.dylib 0x00007fff88d605c9 start + 1
...
Thread 7:
0 libsystem_kernel.dylib 0x00007fff94d1b94a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff9508740d start_wqthread + 13
Thread 8 Crashed:
0 libobjc.A.dylib 0x00007fff90c740dd objc_msgSend + 29
1 Foundation 0x00007fff92461d24 NSKeyValuePushPendingNotificationPerThread + 446
2 Foundation 0x00007fff9240968f NSKeyValueWillChange + 465
3 Foundation 0x00007fff924bc33e -[NSObject(NSKeyValueObservingPrivate) _willChangeValuesForKeys:] + 234
4 CoreData 0x00007fff8d9fdd6d -[NSFaultHandler turnObject:intoFaultWithContext:] + 221
5 CoreData 0x00007fff8da28641 -[NSManagedObjectContext(_NSInternalAdditions) _disposeObjects:count:notifyParent:] + 353
6 CoreData 0x00007fff8da27c78 -[NSManagedObjectContext(_NSInternalAdditions) _dispose:] + 392
7 CoreData 0x00007fff8da27821 -[NSManagedObjectContext _dealloc__] + 337
8 CoreData 0x00007fff8da563ab __internalBlockToDeallocNSManagedObjectContext_block_invoke + 75
9 CoreData 0x00007fff8da1c246 developerSubmittedBlockToNSManagedObjectContextPerform + 182
10 libdispatch.dylib 0x00007fff8f122c13 _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff8f126365 _dispatch_queue_drain + 1100
12 libdispatch.dylib 0x00007fff8f127ecc _dispatch_queue_invoke + 202
13 libdispatch.dylib 0x00007fff8f1256b7 _dispatch_root_queue_drain + 463
14 libdispatch.dylib 0x00007fff8f133fe4 _dispatch_worker_thread3 + 91
15 libsystem_pthread.dylib 0x00007fff95089637 _pthread_wqthread + 729
16 libsystem_pthread.dylib 0x00007fff9508740d start_wqthread + 13
Any idea how to find out what's causing the issue and possibly fix it? I've tried enabling zombies, setting NSBindingDebugLogLevel to 1, and running Zombies instrument, but no luck.

Strange crash when bringing up a window on Sandboxed cocoa app only on OSX 10.8.3

This one is quite weird. I recently upgraded to Mountain Lion on my dev machine and now every time I bring up the main project window of my app it crashes. The strange thing is that it only happens on 10.8.3 and it only happen if I sandbox the app. I have another test machine running 10.8.2 (also Mountain Lion) and the crash does not happen. Also, if I recreate the app without sandboxing it does not crash. This app is actually created with an implementation of common lisp the uses a cocoa bridge called CCL.
Here are some of the reports I get in the console when my app crashes:
4/19/13 11:30:15.605 AM AgentCubes[56676]: kCGErrorIllegalArgument: _getWindowRegion: Invalid window
4/19/13 11:30:15.606 AM AgentCubes[56676]: CGSSetWindowLevel: Invalid window 0x137c
4/19/13 11:30:15.607 AM AgentCubes[56676]: PSsetwindowlevel, error setting window level (1000)
4/19/13 11:30:15.607 AM AgentCubes[56676]: CGSClearWindowTags: Invalid window 0x137c
4/19/13 11:30:15.607 AM AgentCubes[56676]: CGSSetIgnoresCycle: error 1000 setting or clearing window tags
4/19/13 11:30:15.623 AM AgentCubes[56676]: *** Assertion failure in -[NativeScrollView scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:], /SourceCache/AppKit/AppKit-1187.37/AppKit.subproj/NSScrollView.m:5402
4/19/13 11:30:15.623 AM AgentCubes[56676]: An uncaught exception was raised
4/19/13 11:30:15.624 AM AgentCubes[56676]: Invalid parameter not satisfying: scrollerImpPair == SCROLLER_IMP_PAIR
and the big trace:
4/19/13 11:30:15.626 AM AgentCubes[56676]: (
0 CoreFoundation 0x99cbee9b __raiseError + 219
1 libobjc.A.dylib 0x90a6552e objc_exception_throw + 230
2 CoreFoundation 0x99c1e6a8 +[NSException raise:format:arguments:] + 136
3 Foundation 0x93dfb814 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
4 AppKit 0x977cd7ab -[NSScrollView(NSPrivate) scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:] + 150
5 AppKit 0x977cd6a5 +[NSScrollerImpPair _updateAllScrollerImpPairsForNewRecommendedScrollerStyle:] + 406
6 AppKit 0x977cd4ff +[NSScrollerImpPair _scrollerStyleRecommendationChanged:] + 159
7 Foundation 0x93e52152 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 49
8 CoreFoundation 0x99c80861 ___CFXNotificationPost_block_invoke_0 + 257
9 CoreFoundation 0x99bcbe9a _CFXNotificationPost + 2794
10 Foundation 0x93e3ac88 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
11 AppKit 0x977cd3f5 -[_NSScrollerStyleRecommender setRecommendedScrollerStyleAndNotify:] + 248
12 AppKit 0x977cd2e3 __75-[_NSScrollerStyleRecommender scrollerStyleRecommendationUpdateTimerFired:]_block_invoke_0 + 43
13 AppKit 0x97eff42f __block_global_0 + 32
14 libdispatch.dylib 0x98f10f8f _dispatch_call_block_and_release + 15
15 libdispatch.dylib 0x98f0cc82 _dispatch_client_callout + 46
16 libdispatch.dylib 0x98f122e3 _dispatch_main_queue_callback_4CF + 223
17 CoreFoundation 0x99bbac39 __CFRunLoopRun + 1961
18 CoreFoundation 0x99bba02a CFRunLoopRunSpecific + 378
19 CoreFoundation 0x99bb9e9b CFRunLoopRunInMode + 123
20 HIToolbox 0x91e16f5a RunCurrentEventLoopInMode + 242
21 HIToolbox 0x91e16cc9 ReceiveNextEventCommon + 374
22 HIToolbox 0x91e16b44 BlockUntilNextEventMatchingListInMode + 88
23 AppKit 0x976e99aa _DPSNextEvent + 724
24 AppKit 0x976e91dc -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
25 AppKit 0x976df63c -[NSApplication run] + 855
26 AgentCubes 0x0001991d ffcall_return + 0
27 ??? 0x003cbf9c 0x0 + 3981212
28 ??? 0x003cbf9c 0x0 + 3981212
29 AgentCubes 0x00019f79 func_start + 94
30 AgentCubes 0x0001c52e main + 1310
31 AgentCubes 0x00033fb4 _start + 207
32 AgentCubes 0x00033ee4 start + 40
)
and finally:
4/19/13 11:30:15.627 AM AgentCubes[56676]: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: scrollerImpPair == SCROLLER_IMP_PAIR'
*** Call stack at first throw:
(
0 CoreFoundation 0x99cbee9b __raiseError + 219
1 libobjc.A.dylib 0x90a6552e objc_exception_throw + 230
2 CoreFoundation 0x99c1e6a8 +[NSException raise:format:arguments:] + 136
3 Foundation 0x93dfb814 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
4 AppKit 0x977cd7ab -[NSScrollView(NSPrivate) scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:] + 150
5 AppKit 0x977cd6a5 +[NSScrollerImpPair _updateAllScrollerImpPairsForNewRecommendedScrollerStyle:] + 406
6 AppKit 0x977cd4ff +[NSScrollerImpPair _scrollerStyleRecommendationChanged:] + 159
7 Foundation 0x93e52152 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 49
8 CoreFoundation 0x99c80861 ___CFXNotificationPost_block_invoke_0 + 257
9 CoreFoundation 0x99bcbe9a _CFXNotificationPost + 2794
10 Foundation 0x93e3ac88 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
11 AppKit 0x977cd3f5 -[_NSScrollerStyleRecommender setRecommendedScrollerStyleAndNotify:] + 248
12 AppKit 0x977cd2e3 __75-[_NSScrollerStyleRecommender scrollerStyleRecommendationUpdateTimerFired:]_block_invoke_0 + 43
13 AppKit 0x97eff42f __block_global_0 + 32
14 libdispatch.dylib 0x98f10f8f _dispatch_call_block_and_release + 15
15 libdispatch.dylib 0x98f0cc82 _dispatch_client_callout + 46
16 libdispatch.dylib 0x98f122e3 _dispatch_main_queue_callback_4CF + 223
17 CoreFoundation 0x99bbac39 __CFRunLoopRun + 1961
18 CoreFoundation 0x99bba02a CFRunLoopRunSpecific + 378
19 CoreFoundation 0x99bb9e9b CFRunLoopRunInMode + 123
20 HIToolbox 0x91e16f5a RunCurrentEventLoopInMode + 242
21 HIToolbox 0x91e16cc9 ReceiveNextEventCommon + 374
22 HIToolbox 0x91e16b44 BlockUntilNextEventMatchingListInMode + 88
23 AppKit 0x976e99aa _DPSNextEvent + 724
24 AppKit 0x976e91dc -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
25 AppKit 0x976df63c -[NSApplication run] + 855
26 AgentCubes 0x0001991d ffcall_return + 0
27 ??? 0x003cbf9c 0x0 + 3981212
28 ??? 0x003cbf9c 0x0 + 3981212
29 AgentCubes 0x00019f79 func_start + 94
30 AgentCubes 0x0001c52e main + 1310
31 AgentCubes 0x00033fb4 _start + 207
32 AgentCubes 0x00033ee4 start + 40
)
I am very confused by all this and I am wondering what could have changed in 10.8.3 that interacts badly with the sandboxing?

Random crashes in WaitNextEvent under 10.7.2

Our (legacy) app runs stable on a range of OS versions (10.4 - 10.7) since years and now randomly crashes at ONE customers computers (both of them, though) within WaitNextEvent.
All crashes occur deep inside Apple's code with random locations but always with WaitNextEvent somewhere in the call stack.
Examples are:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 dyld 0x8fe8a33d _ZN4dyldL10loadPhase5EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 716
1 dyld 0x8fe8a501 _ZN4dyldL10loadPhase4EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 179
2 dyld 0x8fe8ae31 _ZN4dyldL10loadPhase3EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 1429
3 dyld 0x8fe8b1f1 _ZN4dyldL10loadPhase1EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 166
4 dyld 0x8fe8b340 _ZN4dyldL10loadPhase0EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 240
5 dyld 0x8fe8b3fd dyld::load(char const*, dyld::LoadContext const&) + 132
6 dyld 0x8fe8e036 dlopen + 428
7 libdyld.dylib 0x977b9a95 dlopen + 70
8 com.apple.CoreServices.CarbonCore 0x90d467cf GetDYLDEntryPointWithImage + 43
9 com.apple.CoreServices.CarbonCore 0x90d50aed GetDYLDEntryPoint + 45
10 com.apple.AppKit 0x9c62cf2c _IsCarbonFullScreenInstanceWorkspace + 57
11 com.apple.AppKit 0x9c03231c -[NSApplication _updateFullScreenPresentationOptions] + 75
12 com.apple.AppKit 0x9bdc97d5 -[NSApplication sendEvent:] + 906
13 com.apple.AppKit 0x9c4d81e1 _appActivationHandler + 547
14 com.apple.AppKit 0x9c4d79b8 carbonAppApplicationHandler + 108
15 com.apple.HIToolbox 0x9bb9f920 _InvokeEventHandlerUPP(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*, long (*)(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)) + 36
16 com.apple.HIToolbox 0x9ba1b803 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1602
17 com.apple.HIToolbox 0x9ba1ac80 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 482
18 com.apple.HIToolbox 0x9ba1aa98 SendEventToEventTargetWithOptions + 75
19 com.apple.HIToolbox 0x9ba306fe _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 3152
20 com.apple.HIToolbox 0x9ba1bcbe _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 2813
21 com.apple.HIToolbox 0x9ba1ac80 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 482
22 com.apple.HIToolbox 0x9ba2faa9 SendEventToEventTarget + 76
23 com.apple.HIToolbox 0x9bb9f76c ToolboxEventDispatcher + 82
24 com.apple.HIToolbox 0x9bbb1e0f GetOrPeekEvent + 482
25 com.apple.HIToolbox 0x9bbb217f GetNextEventMatchingMask + 539
26 com.apple.HIToolbox 0x9bbb24b7 WNEInternal + 434
27 com.apple.HIToolbox 0x9bbb1784 WaitNextEvent + 53
28 com.ourStuff 0x000bebe5 LApplication::ProcessNextEvent() + 69
or
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x9c2dec22 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x9c2de1f6 mach_msg + 70
2 com.apple.CoreFoundation 0x98f370ea __CFRunLoopServiceMachPort + 170
3 com.apple.CoreFoundation 0x98f40214 __CFRunLoopRun + 1428
4 com.apple.CoreFoundation 0x98f3f8ec CFRunLoopRunSpecific + 332
5 com.apple.CoreFoundation 0x98f3f798 CFRunLoopRunInMode + 120
6 com.apple.HIToolbox 0x95b7fa7f RunCurrentEventLoopInMode + 318
7 com.apple.HIToolbox 0x95d1c151 GetNextEventMatchingMask + 493
8 com.apple.HIToolbox 0x95d1c4b7 WNEInternal + 434
9 com.apple.HIToolbox 0x95d1b784 WaitNextEvent + 53
10 com.apple.HIToolbox 0x95cfc136 ModalDialog + 1638
11 com.apple.HIToolbox 0x95d03ff5 RunStandardAlert + 741
12 com.apple.HIToolbox 0x95d028bf StandardAlert + 201
13 com.ourStuff 0x0007fbaa 0x1000 + 519082
Any hints are highly appreciated!
As of now we couldn't reproduce the bug locally.
FWIW - the crashes just disappeared after that particular customer deactivated DefaultFolderX (which kept showing up in every crash dump of our app on the customers system)..

Resources