Skip to content

iOS Crash DataDog Version 1.2.1 #341

Closed

Description

@masterwok

Describe what happened

After upgrading to version 1.2.1 we're seeing the following crash on iOS while the application is in the background:

Incident Identifier: C8A5F9BD-AA07-4AE0-A35F-2DF5A7F3FD47
Hardware Model:      iPhone13,4
Process:             Runner [594]
Path:                /private/var/containers/Bundle/Application/71687089-D449-4B79-A09D-EB34A6C6C667/Runner.app/Runner
Identifier:          com.XXXXX.XXXXX
Version:             2.0.5 (4411)
AppStoreTools:       14C17
AppVariant:          1:iPhone13,4:15
Code Type:           ARM-64 (Native)
Role:                Background
Parent Process:      launchd [1]
Coalition:           com.XXXXX.XXXXX [627]

Date/Time:           2023-02-12 02:44:00.7301 -0600
Launch Time:         2023-02-11 21:02:13.5850 -0600
OS Version:          iPhone OS 15.6.1 (19G82)
Release Type:        User
Baseband Version:    2.70.01
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  19

Last Exception Backtrace:
0   CoreFoundation                	0x1c82b9288 __exceptionPreprocess + 220 (NSException.m:200)
1   libobjc.A.dylib               	0x1e0fe9744 objc_exception_throw + 60 (objc-exception.mm:565)
2   Foundation                    	0x1c9b4a340 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 204 (NSException.m:242)
3   Flutter                       	0x10749ccf4 0x107488000 + 85236
4   Runner                        	0x103886414 closure #1 in SwiftDatadogSdkPlugin.handle(_:result:) + 88 (SwiftDatadogSdkPlugin.swift:69)
5   Runner                        	0x103886414 partial apply for closure #1 in SwiftDatadogSdkPlugin.handle(_:result:) + 116 (<compiler-generated>:0)
6   Datadog                       	0x104df9d34 InternalLogger.print(message:error:emoji:) + 20 (InternalLogger.swift:54)
7   Datadog                       	0x104df9d34 InternalLogger.log(_:message:error:) + 20 (InternalLogger.swift:42)
8   Datadog                       	0x104df9d34 protocol witness for CoreLogger.log(_:message:error:) in conformance InternalLogger + 20 (<compiler-generated>:37)
9   Datadog                       	0x104df9d34 specialized CoreLogger.warn(_:error:) + 20 (CoreLogger.swift:93)
10  Datadog                       	0x104df9d34 RUMSessionScope.process(command:context:writer:) + 2572 (RUMSessionScope.swift:160)
11  Datadog                       	0x104d7f164 protocol witness for RUMScope.process(command:context:writer:) in conformance RUMSessionScope + 20 (RUMScope.swift:21)
12  Datadog                       	0x104d7f164 specialized RUMScope.scope(byPropagating:context:writer:) + 20 (<compiler-generated>:0)
13  Datadog                       	0x104d7f164 RUMApplicationScope.process(command:context:writer:) + 212
14  Datadog                       	0x104decf68 closure #1 in closure #1 in RUMMonitor.process(command:) + 196 (RUMMonitor.swift:614)
15  Datadog                       	0x104d2356c thunk for @callee_guaranteed () -> () + 20 (<compiler-generated>:0)
16  Datadog                       	0x104d2358c thunk for @escaping @callee_guaranteed () -> () + 20 (<compiler-generated>:0)
17  libdispatch.dylib             	0x1c7f20a30 _dispatch_client_callout + 20 (object.m:560)
18  libdispatch.dylib             	0x1c7f2fc90 _dispatch_lane_barrier_sync_invoke_and_complete + 56 (queue.c:1028)
19  Datadog                       	0x104dece40 closure #1 in RUMMonitor.process(command:) + 420 (RUMMonitor.swift:611)
20  Datadog                       	0x104d1c568 closure #1 in DatadogCoreFeatureScope.eventWriteContext(bypassConsent:_:) + 144 (DatadogCore.swift:407)
21  Datadog                       	0x104d18d00 closure #1 in DatadogContextProvider.read(block:) + 296 (DatadogContextProvider.swift:108)
22  Datadog                       	0x104de86e0 thunk for @escaping @callee_guaranteed () -> () + 20 (<compiler-generated>:0)
23  libdispatch.dylib             	0x1c7f1ee6c _dispatch_call_block_and_release + 32 (init.c:1517)
24  libdispatch.dylib             	0x1c7f20a30 _dispatch_client_callout + 20 (object.m:560)
25  libdispatch.dylib             	0x1c7f28124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
26  libdispatch.dylib             	0x1c7f28c80 _dispatch_lane_invoke + 392 (queue.c:3944)
27  libdispatch.dylib             	0x1c7f33500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
28  libsystem_pthread.dylib       	0x239c1d0bc _pthread_wqthread + 288 (pthread.c:2599)
29  libsystem_pthread.dylib       	0x239c1ce5c start_wqthread + 8 (:-1)

Thread 0 name:
Thread 0:
0   libsystem_kernel.dylib        	0x00000001ffeb0138 __ulock_wait + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c1fb88 _pthread_join + 444 (pthread_cancelable.c:290)
2   Flutter                       	0x00000001074eaab4 0x107488000 + 404148
3   Flutter                       	0x000000010749f40c 0x107488000 + 95244
4   Flutter                       	0x00000001078710e0 0x107488000 + 4100320
5   Flutter                       	0x0000000107499488 0x107488000 + 70792
6   CoreFoundation                	0x00000001c824a834 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:652)
7   CoreFoundation                	0x00000001c82e6fd4 ___CFXRegistrationPost_block_invoke + 52 (CFNotificationCenter.c:173)
8   CoreFoundation                	0x00000001c82ba1d0 _CFXRegistrationPost + 456 (CFNotificationCenter.c:199)
9   CoreFoundation                	0x00000001c82608ac _CFXNotificationPost + 728 (CFNotificationCenter.c:1147)
10  Foundation                    	0x00000001c9a33734 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96 (NSNotification.m:560)
11  UIKitCore                     	0x00000001cb5f9de4 -[UIApplication _terminateWithStatus:] + 300 (UIApplication.m:6950)
12  UIKitCore                     	0x00000001cacd49d4 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 128 (_UISceneLifecycleMultiplexer.m:806)
13  UIKitCore                     	0x00000001caeca834 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 224 (_UISceneLifecycleMultiplexer.m:480)
14  UIKitCore                     	0x00000001cb5f6128 -[UIApplication workspaceShouldExit:withTransitionContext:] + 224 (UIApplication.m:3846)
15  FrontBoardServices            	0x00000001da50efec __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 80 (FBSWorkspaceScenesClient.m:331)
16  FrontBoardServices            	0x00000001da4ca308 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:352)
17  FrontBoardServices            	0x00000001da50ef84 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 132 (FBSWorkspaceScenesClient.m:328)
18  libdispatch.dylib             	0x00000001c7f20a30 _dispatch_client_callout + 20 (object.m:560)
19  libdispatch.dylib             	0x00000001c7f244e0 _dispatch_block_invoke_direct + 264 (queue.c:501)
20  FrontBoardServices            	0x00000001da4cbc70 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:157)
21  FrontBoardServices            	0x00000001da4cb040 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 (FBSSerialQueue.m:181)
22  FrontBoardServices            	0x00000001da4cf700 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:194)
23  CoreFoundation                	0x00000001c82db414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972)
24  CoreFoundation                	0x00000001c82ec1a0 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016)
25  CoreFoundation                	0x00000001c8225694 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2053)
26  CoreFoundation                	0x00000001c822b05c __CFRunLoopRun + 828 (CFRunLoop.c:2951)
27  CoreFoundation                	0x00000001c823ebc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
28  GraphicsServices              	0x00000001e43aa374 GSEventRunModal + 164 (GSEvent.c:2200)
29  UIKitCore                     	0x00000001cabb2b58 -[UIApplication _run] + 1100 (UIApplication.m:3511)
30  UIKitCore                     	0x00000001ca934090 UIApplicationMain + 364 (UIApplication.m:5064)
31  Runner                        	0x0000000102a9a5e0 main + 68 (AppDelegate.swift:11)
32  dyld                          	0x0000000104535da4 start + 520 (dyldMain.cpp:879)

Thread 1:
0   libsystem_pthread.dylib       	0x0000000239c1ce54 start_wqthread + 0 (:-1)

Thread 2:
0   libsystem_pthread.dylib       	0x0000000239c1ce54 start_wqthread + 0 (:-1)

Thread 3 name:
Thread 3:
0   libsystem_kernel.dylib        	0x00000001ffeaf4a0 mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001ffeafae4 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                	0x00000001c8226d30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                	0x00000001c822b1bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                	0x00000001c823ebc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Foundation                    	0x00000001c9a31444 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236 (NSRunLoop.m:373)
6   Foundation                    	0x00000001c9a72e0c -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:420)
7   UIKitCore                     	0x00000001cab2ccc4 -[UIEventFetcher threadMain] + 524 (UIEventFetcher.m:1167)
8   Foundation                    	0x00000001c9a8141c __NSThread__start__ + 808 (NSThread.m:972)
9   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
10  libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 4:
0   libsystem_pthread.dylib       	0x0000000239c1ce54 start_wqthread + 0 (:-1)

Thread 5 name:
Thread 5:
0   libsystem_kernel.dylib        	0x00000001ffeaf4a0 mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001ffeafae4 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                	0x00000001c8226d30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                	0x00000001c822b1bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                	0x00000001c823ebc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Flutter                       	0x0000000107761f2c 0x107488000 + 2989868
6   Flutter                       	0x0000000107761a1c 0x107488000 + 2988572
7   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 6 name:
Thread 6:
0   libsystem_kernel.dylib        	0x00000001ffeaf4a0 mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001ffeafae4 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                	0x00000001c8226d30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                	0x00000001c822b1bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                	0x00000001c823ebc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Flutter                       	0x0000000107761f2c 0x107488000 + 2989868
6   Flutter                       	0x0000000107761a1c 0x107488000 + 2988572
7   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 7 name:
Thread 7:
0   libsystem_kernel.dylib        	0x00000001ffeaf4a0 mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001ffeafae4 mach_msg + 76 (mach_msg.c:119)
2   IOKit                         	0x00000001d5575248 io_connect_method + 512 (:-1)
3   IOKit                         	0x00000001d55745b4 IOConnectCallMethod + 176 (IOKitLib.c:2270)
4   IOGPU                         	0x00000002292fab20 ioGPUResourceFinalize + 136 (IOGPUResourceRef.c:58)
5   CoreFoundation                	0x00000001c823402c _CFRelease + 232 (CFRuntime.c:2134)
6   IOGPU                         	0x00000002292fa7a0 -[IOGPUMetalResource dealloc] + 212 (IOGPUMetalResource.m:497)
7   IOGPU                         	0x00000002293011f0 -[IOGPUMetalResourcePool purgeWithLock] + 112 (IOGPUMetalResourcePool.m:105)
8   IOGPU                         	0x0000000229301290 -[IOGPUMetalResourcePool purge] + 48 (IOGPUMetalResourcePool.m:123)
9   IOGPU                         	0x00000002292fe0d8 -[IOGPUMetalDevice _purgeDevice] + 192 (IOGPUMetalDevice.m:476)
10  AGXMetalA14                   	0x000000023b4ee8b4 -[AGXA14FamilyDevice _purgeDevice] + 496 (agxa_device_objc.mm:665)
11  AGXMetalA14                   	0x000000023b4ee918 -[AGXA14FamilyDevice _decrementCommandQueueCount] + 52 (agxa_device_objc.mm:653)
12  Metal                         	0x00000001e2cd2734 -[_MTLCommandQueue dealloc] + 228 (MTLCommandQueue.m:320)
13  IOGPU                         	0x00000002292fe150 -[IOGPUMetalCommandQueue dealloc] + 84 (IOGPUMetalCommandQueue.m:80)
14  AGXMetalA14                   	0x000000023b215440 -[AGXA14FamilyCommandQueue dealloc] + 100 (agxa_command_queue_objc.mm:210)
15  Flutter                       	0x00000001076ec864 0x107488000 + 2508900
16  Flutter                       	0x00000001076ec8b0 0x107488000 + 2508976
17  Flutter                       	0x00000001076e634c 0x107488000 + 2483020
18  Flutter                       	0x0000000107641e40 0x107488000 + 1809984
19  Flutter                       	0x00000001076409c0 0x107488000 + 1804736
20  Flutter                       	0x000000010784b158 0x107488000 + 3944792
21  Flutter                       	0x000000010790c034 0x107488000 + 4735028
22  Flutter                       	0x00000001077609ec 0x107488000 + 2984428
23  Flutter                       	0x0000000107760aa0 0x107488000 + 2984608
24  Flutter                       	0x0000000107760890 0x107488000 + 2984080
25  Flutter                       	0x0000000107761a54 0x107488000 + 2988628
26  libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
27  libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib        	0x00000001ffeaff24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c24298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   Flutter                       	0x00000001074d0534 0x107488000 + 296244
3   Flutter                       	0x000000010775c134 0x107488000 + 2965812
4   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 9 name:
Thread 9:
0   libsystem_kernel.dylib        	0x00000001ffeaff24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c24298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   Flutter                       	0x00000001074d0534 0x107488000 + 296244
3   Flutter                       	0x000000010775c134 0x107488000 + 2965812
4   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 10 name:
Thread 10:
0   libsystem_kernel.dylib        	0x00000001ffeaff24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c24298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   Flutter                       	0x00000001074d0534 0x107488000 + 296244
3   Flutter                       	0x000000010775c134 0x107488000 + 2965812
4   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 11 name:
Thread 11:
0   libsystem_kernel.dylib        	0x00000001ffeaff24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c24298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   Flutter                       	0x00000001074d0534 0x107488000 + 296244
3   Flutter                       	0x000000010775c134 0x107488000 + 2965812
4   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 12 name:
Thread 12:
0   libsystem_kernel.dylib        	0x00000001ffeaff24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c24298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   Flutter                       	0x00000001074d0534 0x107488000 + 296244
3   Flutter                       	0x000000010775c134 0x107488000 + 2965812
4   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 13 name:
Thread 13:
0   libsystem_kernel.dylib        	0x00000001ffeaff24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c24298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   Flutter                       	0x00000001074d0534 0x107488000 + 296244
3   Flutter                       	0x000000010775c134 0x107488000 + 2965812
4   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 14 name:
Thread 14:
0   libsystem_kernel.dylib        	0x00000001ffeb0e18 kevent + 8 (:-1)
1   Flutter                       	0x000000010794bde8 0x107488000 + 4996584
2   Flutter                       	0x000000010797c0a0 0x107488000 + 5193888
3   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
4   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 15:
0   libsystem_pthread.dylib       	0x0000000239c1ce54 start_wqthread + 0 (:-1)

Thread 16 name:
Thread 16:
0   libsystem_kernel.dylib        	0x00000001ffeaff24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c242c4 _pthread_cond_wait + 1280 (pthread_cond.c:640)
2   Flutter                       	0x0000000107ac12ac 0x107488000 + 6525612
3   Flutter                       	0x0000000107afedc8 0x107488000 + 6778312
4   Flutter                       	0x0000000107ac0c78 0x107488000 + 6524024
5   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
6   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 17 name:
Thread 17:
0   libsystem_kernel.dylib        	0x00000001ffeaf4a0 mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001ffeafae4 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                	0x00000001c8226d30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                	0x00000001c822b1bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                	0x00000001c823ebc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   CFNetwork                     	0x00000001c8cbb1dc +[__CFN_CoreSchedulingSetRunnable _run:] + 472 (CoreSchedulingSet.mm:1372)
6   Foundation                    	0x00000001c9a8141c __NSThread__start__ + 808 (NSThread.m:972)
7   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 18:
0   libsystem_kernel.dylib        	0x00000001ffeaf4a0 mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001ffeafae4 mach_msg + 76 (mach_msg.c:119)
2   Instabug                      	0x0000000105eea89c exception_server_thread + 188
3   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
4   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 19 name:
Thread 19 Crashed:
0   libsystem_kernel.dylib        	0x00000001ffeb5b38 __pthread_kill + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c233bc pthread_kill + 268 (pthread.c:1668)
2   libsystem_c.dylib             	0x00000001d33cb524 abort + 168 (abort.c:118)
3   Runner                        	0x00000001038aaf80 uncaught_exception_handler.cold.1 + 28 (PLCrashReporter.m:369)
4   Runner                        	0x0000000102ae9b90 uncaught_exception_handler + 44 (PLCrashReporter.m:366)
5   CoreFoundation                	0x00000001c833a570 __handleUncaughtException + 712 (NSException.m:271)
6   libobjc.A.dylib               	0x00000001e0fefc5c _objc_terminate() + 132 (objc-exception.mm:700)
7   libc++abi.dylib               	0x00000001e10f3f18 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
8   libc++abi.dylib               	0x00000001e10f3eb4 std::terminate() + 64 (cxa_handlers.cpp:88)
9   libdispatch.dylib             	0x00000001c7f20a44 _dispatch_client_callout + 40 (object.m:563)
10  libdispatch.dylib             	0x00000001c7f2fc90 _dispatch_lane_barrier_sync_invoke_and_complete + 56 (queue.c:1028)
11  Datadog                       	0x0000000104dece40 closure #1 in RUMMonitor.process(command:) + 420 (RUMMonitor.swift:611)
12  Datadog                       	0x0000000104d1c568 closure #1 in DatadogCoreFeatureScope.eventWriteContext(bypassConsent:_:) + 144 (DatadogCore.swift:407)
13  Datadog                       	0x0000000104d18d00 closure #1 in DatadogContextProvider.read(block:) + 296 (DatadogContextProvider.swift:108)
14  Datadog                       	0x0000000104de86e0 thunk for @escaping @callee_guaranteed () -> () + 20 (<compiler-generated>:0)
15  libdispatch.dylib             	0x00000001c7f1ee6c _dispatch_call_block_and_release + 32 (init.c:1517)
16  libdispatch.dylib             	0x00000001c7f20a30 _dispatch_client_callout + 20 (object.m:560)
17  libdispatch.dylib             	0x00000001c7f28124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
18  libdispatch.dylib             	0x00000001c7f28c80 _dispatch_lane_invoke + 392 (queue.c:3944)
19  libdispatch.dylib             	0x00000001c7f33500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
20  libsystem_pthread.dylib       	0x0000000239c1d0bc _pthread_wqthread + 288 (pthread.c:2599)
21  libsystem_pthread.dylib       	0x0000000239c1ce5c start_wqthread + 8 (:-1)

Thread 20:
0   libsystem_pthread.dylib       	0x0000000239c1ce54 start_wqthread + 0 (:-1)

Thread 21:
0   libsystem_pthread.dylib       	0x0000000239c1ce54 start_wqthread + 0 (:-1)

Thread 22 name:
Thread 22:
0   libsystem_malloc.dylib        	0x00000001da570274 tiny_malloc_from_free_list + 328 (magazine_tiny.c:2075)
1   libsystem_malloc.dylib        	0x00000001da570c84 tiny_malloc_should_clear + 220 (magazine_tiny.c:2260)
2   libsystem_malloc.dylib        	0x00000001da573e24 szone_malloc_should_clear + 80 (magazine_malloc.c:244)
3   libsystem_malloc.dylib        	0x00000001da573024 _malloc_zone_malloc + 156 (malloc.c:1608)
4   libboringssl.dylib            	0x00000001e28b83bc OPENSSL_malloc + 52 (mem.c:157)
5   libboringssl.dylib            	0x00000001e2846250 bssl::SSL3_STATE* bssl::New<bssl::SSL3_STATE>() + 20 (internal.h:195)
6   libboringssl.dylib            	0x00000001e2845fa4 bssl::tls_new(ssl_st*) + 28 (internal.h:227)
7   libboringssl.dylib            	0x00000001e2884b34 SSL_new + 968 (ssl_lib.cc:679)
8   libboringssl.dylib            	0x00000001e2837cf8 boringssl_session_create + 88 (boringssl_session.m:471)
9   libboringssl.dylib            	0x00000001e28424dc nw_protocol_boringssl_connected + 592 (protocol_boringssl.m:411)
10  libusrtcp.dylib               	0x00000001cc3c58b8 nw_protocol_tcp_wake_connected + 432 (protocol_tcp.c:364)
11  libusrtcp.dylib               	0x00000001cc3fa958 tcp_input_available + 804 (user_north.c:40)
12  libusrtcp.dylib               	0x00000001cc3c7374 nw_protocol_tcp_input_available + 288 (protocol_tcp.c:1898)
13  libnetwork.dylib              	0x00000001c9419698 nw_channel_add_input_frames + 9236 (channel.c:1362)
14  libnetwork.dylib              	0x00000001c9417198 nw_channel_update_input_source + 328 (channel.c:1462)
15  libnetwork.dylib              	0x00000001c94163a4 __nw_channel_create_block_invoke.29 + 72 (channel.c:2387)
16  libdispatch.dylib             	0x00000001c7f20a30 _dispatch_client_callout + 20 (object.m:560)
17  libdispatch.dylib             	0x00000001c7f23eec _dispatch_continuation_pop + 500 (inline_internal.h:2622)
18  libdispatch.dylib             	0x00000001c7f3713c _dispatch_source_invoke + 1596 (source.c:596)
19  libdispatch.dylib             	0x00000001c7f29f80 _dispatch_workloop_invoke + 1784 (inline_internal.h:0)
20  libdispatch.dylib             	0x00000001c7f33500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
21  libsystem_pthread.dylib       	0x0000000239c1d0bc _pthread_wqthread + 288 (pthread.c:2599)
22  libsystem_pthread.dylib       	0x0000000239c1ce5c start_wqthread + 8 (:-1)

Thread 23:
0   libsystem_pthread.dylib       	0x0000000239c1ce54 start_wqthread + 0 (:-1)

Thread 24 name:
Thread 24:
0   libsystem_kernel.dylib        	0x00000001ffeb0164 select$DARWIN_EXTSN + 8 (:-1)
1   CoreFoundation                	0x00000001c82cab68 __CFSocketManager + 644 (CFSocket.c:1343)
2   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
3   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 25 name:
Thread 25:
0   libsystem_kernel.dylib        	0x00000001ffeaff24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c242c4 _pthread_cond_wait + 1280 (pthread_cond.c:640)
2   Flutter                       	0x0000000107ac12ac 0x107488000 + 6525612
3   Flutter                       	0x0000000107afedc8 0x107488000 + 6778312
4   Flutter                       	0x0000000107ac0c78 0x107488000 + 6524024
5   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
6   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 26 name:
Thread 26:
0   libsystem_kernel.dylib        	0x00000001ffeaf4a0 mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001ffeafae4 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                	0x00000001c8226d30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                	0x00000001c822b1bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                	0x00000001c823ebc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   CFNetwork                     	0x00000001c8cbb1dc +[__CFN_CoreSchedulingSetRunnable _run:] + 472 (CoreSchedulingSet.mm:1372)
6   Foundation                    	0x00000001c9a8141c __NSThread__start__ + 808 (NSThread.m:972)
7   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 27 name:
Thread 27:
0   libsystem_kernel.dylib        	0x00000001ffeaff24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x0000000239c242c4 _pthread_cond_wait + 1280 (pthread_cond.c:640)
2   Flutter                       	0x0000000107ac12ac 0x107488000 + 6525612
3   Flutter                       	0x0000000107afedc8 0x107488000 + 6778312
4   Flutter                       	0x0000000107ac0c78 0x107488000 + 6524024
5   libsystem_pthread.dylib       	0x0000000239c1d9ac _pthread_start + 148 (pthread.c:891)
6   libsystem_pthread.dylib       	0x0000000239c1ce68 thread_start + 8 (:-1)

Thread 28:
0   libsystem_pthread.dylib       	0x0000000239c1ce54 start_wqthread + 0 (:-1)


Thread 19 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000010   x5: 0x000000016152fc20   x6: 0x0000000000000000   x7: 0x0000000000000900
    x8: 0xc1ada3234d6cdb1c   x9: 0xc1ada3222365ab1c  x10: 0x0300000221a70ea1  x11: 0x0400000221a70ea1
   x12: 0x000000000000005d  x13: 0x00000001628215c0  x14: 0x0000000000000004  x15: 0x0000000221a7bb10
   x16: 0x0000000000000148  x17: 0x000000016e097000  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x000000000000bf03  x21: 0x000000016e0970e0  x22: 0x00000001615280e0  x23: 0x0000000222a901b8
   x24: 0x0000000000000017  x25: 0x00000002126f59b0  x26: 0x0000000213006948  x27: 0x00000001c85da4b3
   x28: 0x000000021ec619f8   fp: 0x000000016e0960d0   lr: 0x0000000239c233bc
    sp: 0x000000016e0960b0   pc: 0x00000001ffeb5b38 cpsr: 0x40001000
   esr: 0x56000080  Address size fault


Binary Images:
0x102a6c000 - 0x103cc7fff Runner arm64  <25f135e2754637f28e1f6f3baaf3b871> /private/var/containers/Bundle/Application/71687089-D449-4B79-A09D-EB34A6C6C667/Runner.app/Runner
0x10451c000 - 0x104573fff dyld arm64e  <66e1fb2668f8379ba052eb8b8291b5e1> /usr/lib/dyld
0x104cbc000 - 0x104ea7fff Datadog arm64  <fb55f315fb943a37b0fa6ffc471229ce> /private/var/containers/Bundle/Application/71687089-D449-4B79-A09D-EB34A6C6C667/Runner.app/Frameworks/Datadog.framework/Datadog
0x105bb4000 - 0x105fdbfff Instabug arm64  <599d764ae5e93c53a9f69b270e206e82> /private/var/containers/Bundle/Application/71687089-D449-4B79-A09D-EB34A6C6C667/Runner.app/Frameworks/Instabug.framework/Instabug
0x107488000 - 0x107c9bfff Flutter arm64  <4c4c44ce55553144a17ad3d6a31a0c5c> /private/var/containers/Bundle/Application/71687089-D449-4B79-A09D-EB34A6C6C667/Runner.app/Frameworks/Flutter.framework/Flutter
0x1c7f1d000 - 0x1c7f62fff libdispatch.dylib arm64e  <e3ea4f635d11342aaf199f58dbc8e259> /usr/lib/system/libdispatch.dylib
0x1c8220000 - 0x1c8675fff CoreFoundation arm64e  <6b22dd8135853be6bc77ba19810ec0f2> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x1c8a43000 - 0x1c8f04fff CFNetwork arm64e  <106410ffdd4f3527ad531980fe8b0ddd> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x1c8f05000 - 0x1c9999fff libnetwork.dylib arm64e  <0dbe8d5848823c66b0310239c020ee4c> /usr/lib/libnetwork.dylib
0x1c9a18000 - 0x1c9d22fff Foundation arm64e  <ee1abaf23d7137fb906715aa79528619> /System/Library/Frameworks/Foundation.framework/Foundation
0x1ca69e000 - 0x1cbf3bfff UIKitCore arm64e  <137a95aada6d332cbc01e13bb9b6e317> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x1cc3a9000 - 0x1cc411fff libusrtcp.dylib arm64e  <4968ed2b776c312b874f80fc60378bb7> /usr/lib/libusrtcp.dylib
0x1d33ab000 - 0x1d342afff libsystem_c.dylib arm64e  <86a1a24ace353769ba6960f28353281e> /usr/lib/system/libsystem_c.dylib
0x1d5571000 - 0x1d5628fff IOKit arm64e  <7987edd1e89e34b6aeb426baba611255> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x1da4c0000 - 0x1da56cfff FrontBoardServices arm64e  <a314664d1369370ab222a180669b4f11> /System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices
0x1da56d000 - 0x1da58efff libsystem_malloc.dylib arm64e  <2a5621a9337e32c3a42966d35f417b14> /usr/lib/system/libsystem_malloc.dylib
0x1e0fd3000 - 0x1e100ffff libobjc.A.dylib arm64e  <f6368be9109b3405b282624040529afd> /usr/lib/libobjc.A.dylib
0x1e10e3000 - 0x1e10fafff libc++abi.dylib arm64e  <d00067b20a7a3cb9b4d407b160da261b> /usr/lib/libc++abi.dylib
0x1e2832000 - 0x1e28f3fff libboringssl.dylib arm64e  <d912c7bbbb13308cab0130c67ab254c9> /usr/lib/libboringssl.dylib
0x1e2cb5000 - 0x1e2de9fff Metal arm64e  <9c456c50c0d8333ab79d5209a3bd3326> /System/Library/Frameworks/Metal.framework/Metal
0x1e43a9000 - 0x1e43b1fff GraphicsServices arm64e  <a094e7b51d4037c5902756d86988ec4b> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1ffeae000 - 0x1ffee3fff libsystem_kernel.dylib arm64e  <1fb39303587b320eaeb8e51a54c8a4a9> /usr/lib/system/libsystem_kernel.dylib
0x2292f5000 - 0x22931ffff IOGPU arm64e  <3a2b6547415035f985e9c1a76427f7e5> /System/Library/PrivateFrameworks/IOGPU.framework/IOGPU
0x239c1c000 - 0x239c27fff libsystem_pthread.dylib arm64e  <adc41700002e3a2bb4a1eb5fbf575770> /usr/lib/system/libsystem_pthread.dylib
0x23b022000 - 0x23b552fff AGXMetalA14 arm64e  <dfd25946ebf73369b23f994222bce8c4> /System/Library/Extensions/AGXMetalA14.bundle/AGXMetalA14

EOF

Steps to reproduce the issue:

n/a

Describe what you expected:

Additional context

  • Dart/Flutter version: 3.7.3
  • Android/iOS OS version: Multiple
  • Device Model: iOS
  • Datadog SDK version: 1.2.1
  • Versions of any other relevant dependencies: datadog_tracking_http_client ^1.2.0

Activity

  1. added
    bug
    on Feb 13, 2023
  2. changed the title [-]Crash on 1.2.1[/-] [+]iOS Crash DataDog Version 1.2.1[/+] on Feb 13, 2023
  3. self-assigned this
    on Feb 13, 2023
  4. fuzzybinary commented on Feb 13, 2023

    @fuzzybinary
    Member

    Hi @masterwok, thanks for reporting. I'm taking a look.

  5. fuzzybinary commented on Feb 13, 2023

    @fuzzybinary
    Member

    Hi @masterwok,

    I couldn't duplicate with a simple case. Are you seeing this a lot, and are all the crashes similar?

    I symbolicated the Flutter crash line and it came up as this line in the Engine, asserting that the shell is initialized. Looking at what the main thread is doing, it does appear that the application is actually terminating from the background:

    14  UIKitCore                     	0x00000001cb5f6128 -[UIApplication workspaceShouldExit:withTransitionContext:] + 224 (UIApplication.m:3846)
    

    If it's fairly rare, that's probably the culprit and I can track down why we're not shutting down properly during application termination. However, if you're seeing it regularly (or with other stack traces that don't have _terminateWithStatus or similar) I'll go back to seeing if I'm missing something that can be caused by simple backgrounding.

  6. added
    awaiting response
    on Feb 15, 2023
  7. fuzzybinary commented on Feb 21, 2023

    @fuzzybinary
    Member

    Hi @masterwok From what I can tell this is indeed the app trying to send RUM data while its shutting down.

    We have some cleanup code to prevent this, but I'll need to look into why it's not being called prior to Flutter de-initializing the engine.

  8. masterwok commented on Feb 21, 2023

    @masterwok
    Author

    Hi @fuzzybinary, thank you for the update and for taking the time to resolve the issue.

  9. removed
    awaiting response
    on Feb 22, 2023
  10. added a commit that references this issue on Feb 22, 2023
    ee64171
  11. added a commit that references this issue on Feb 23, 2023
    f78a18c
  12. masterwok commented on Feb 23, 2023

    @masterwok
    Author

    Thank you for making those changes @fuzzybinary . Is there any way you could publish this change in a new version?

  13. fuzzybinary commented on Feb 24, 2023

    @fuzzybinary
    Member

    Yes, I'm looking at a point release today.

  14. fuzzybinary commented on Feb 24, 2023

    @fuzzybinary
    Member

    @masterwok Now available as 1.2.2.

    Please let me know if you continue to see this crash after updating.

  15. masterwok commented on Feb 24, 2023

    @masterwok
    Author

    You rock so much! We have a production release going out next Monday so we should know soon. I'll post back to this ticket once I have a large enough sample set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions