dd-sdk-ios
dd-sdk-ios copied to clipboard
Early crash on app start when encoding RUM view event
The crash
Appears in 1-2 sec after app start.
SIGABRT (ABORT)
Crashed: com.datadoghq.rum-monitor
0 libsystem_kernel.dylib 0x21dd0 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x1b924 <redacted> + 100
2 libsystem_kernel.dylib 0x1b8c0 abort_with_reason + 26
3 libobjc.A.dylib 0x5478 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 112
4 libobjc.A.dylib 0x53d0 __objc_error + 38
5 libobjc.A.dylib 0x10960 lookUpImpOrForward + 1200
6 libobjc.A.dylib 0x1d858 _objc_msgSend_uncached + 56
7 libswiftCore.dylib 0x2cf7c8 swift_instantiateObjCClass + 32
8 libswiftCore.dylib 0x293c0c _swift_initClassMetadataImpl(swift::TargetClassMetadata<swift::InProcess>*, swift::ClassLayoutFlags, unsigned long, swift::TypeLayout const* const*, unsigned long*, bool) + 3008
9 libswiftCore.dylib 0x261ae8 type metadata completion function for _KeyedEncodingContainerBox + 76
10 libswiftCore.dylib 0x29a164 swift::MetadataCacheEntryBase<(anonymous namespace)::GenericCacheEntry, void const*>::doInitialization(swift::ConcurrencyControl&, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) + 276
11 libswiftCore.dylib 0x2913f8 swift_getGenericMetadata + 1196
12 libswiftCore.dylib 0x34d38 KeyedEncodingContainer.init<A>(_:) + 56
13 Datadog 0x14ed8 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC9container7keyedBys22KeyedEncodingContainerVyxGxm_ts9CodingKeyRzlF + 440
14 Datadog 0x177c8 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLCs0C0AAsAEP9container7keyedBys22KeyedEncodingContainerVyqd__Gqd__m_ts9CodingKeyRd__lFTW + 20
15 Datadog 0x101078 $s7Datadog7RUMUserV6encode2toys7Encoder_p_tKF + 200
16 Datadog 0x100fa0 $s7Datadog7RUMUserVSEAASE6encode2toys7Encoder_p_tKFTW + 48
17 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
18 Datadog 0x15878 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC20SingleValueContainerV6encodeyyxKSERzlF + 344
19 Datadog 0x156f4 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC14KeyedContainerC6encode_6forKeyyqd___xtKSERd__lF + 88
20 Datadog 0x162b0 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC14KeyedContainerCy_xGs0j8EncodingK8ProtocolAAsAHP6encode_6forKeyyqd___0P0QztKSERd__lFTW + 20
21 libswiftCore.dylib 0x34cc8 KeyedEncodingContainerProtocol.encodeIfPresent<A>(_:forKey:) + 268
22 Datadog 0x1672c $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC14KeyedContainerCy_xGs0j8EncodingK8ProtocolAAsAHP15encodeIfPresent_6forKeyyqd__Sg_0R0QztKSERd__lFTW + 88
23 libswiftCore.dylib 0x3d1c8 _KeyedEncodingContainerBox.encodeIfPresent<A>(_:forKey:) + 36
24 libswiftCore.dylib 0x359d8 KeyedEncodingContainer.encodeIfPresent<A>(_:forKey:) + 76
25 Datadog 0xf6164 $s7Datadog12RUMViewEventV6encode2toys7Encoder_p_tKF + 1812
26 Datadog 0xf6324 $s7Datadog12RUMViewEventVSEAASE6encode2toys7Encoder_p_tKFTW + 60
27 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
28 Datadog 0xcc104 $s7Datadog13_AnyEncodablePAAE6encode2toys7Encoder_p_tKFAA05DDAnyC0V_Tg5Tm + 1772
29 Datadog 0xcb9f4 $s7Datadog13_AnyEncodablePAAE6encode2toys7Encoder_p_tKFAA05DDAnyC0V_Tg5 + 20
30 Datadog 0x169244 $s7Datadog12RUMViewScopeC19sendViewUpdateEvent33_1C1EA23556A973591D952665B4C3C2EFLL2on7context6writeryAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 12848
31 Datadog 0x163220 $s7Datadog12RUMViewScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 2600
32 Datadog 0x153418 $sSa7DatadogAA8RUMScopeRzlE6scopes13byPropagating7context6writerSayxGAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptFSbxXEfU_AA12RUMViewScopeC_TG5TA + 36
33 Datadog 0x1947fc $ss14_ArrayProtocolPsE6filterySay7ElementQzGSbAEKXEKFSay7Datadog12RUMViewScopeCG_Tg5 + 208
34 Datadog 0x150100 $s7Datadog15RUMSessionScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 1576
35 Datadog 0xd3eb4 $s7Datadog19RUMApplicationScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptFAA010RUMSessionC0CSgAMXEfU0_TA + 60
36 Datadog 0x18cf24 $sSTsE10compactMapySayqd__Gqd__Sg7ElementQzKXEKlFSay7Datadog15RUMSessionScopeCG_AHTg5Tm + 316
37 Datadog 0x18cdb4 $sSTsE10compactMapySayqd__Gqd__Sg7ElementQzKXEKlFSay7Datadog15RUMSessionScopeCG_AHTg5 + 36
38 Datadog 0xd3020 $s7Datadog19RUMApplicationScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptFTf4ennn_nAA0B12StartCommandV_Tg5 + 1280
39 Datadog 0xd1994 $s7Datadog19RUMApplicationScopeC16applicationStart33_913485D011E48E6B216AD82800928028LL2on7context6writeryAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 520
40 Datadog 0xd35e0 $s7Datadog19RUMApplicationScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptFTf4ennn_n + 364
41 Datadog 0x141cc0 $s7Datadog10RUMMonitorC7process7commandyAA10RUMCommand_p_tFyAA0A7ContextV_AA6Writer_ptcfU_yyXEfU_ + 184
42 Datadog 0x6d834 $sIg_Ieg_TR + 20
43 Datadog 0x6d854 $sIeg_IyB_TR + 20
44 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16
45 libdispatch.dylib 0xec1c _dispatch_lane_barrier_sync_invoke_and_complete + 56
46 Datadog 0x141ba0 $s7Datadog10RUMMonitorC7process7commandyAA10RUMCommand_p_tFyAA0A7ContextV_AA6Writer_ptcfU_ + 376
47 Datadog 0x145d18 $s7Datadog10RUMMonitorC7process7commandyAA10RUMCommand_p_tFyAA0A7ContextV_AA6Writer_ptcfU_TA + 20
48 Datadog 0x671e0 $s7Datadog0A16CoreFeatureScopeV17eventWriteContext13bypassConsent13forceNewBatch_ySb_SbyAA0aG0V_AA6Writer_ptKctFyAHcfU_ + 204
49 Datadog 0x5f09c $s7Datadog0A15ContextProviderC4read5blockyyAA0aB0Vc_tFyycfU_ + 304
50 Datadog 0x13d728 $sIeg_IeyB_TR + 28
51 libdispatch.dylib 0x5fa38 _dispatch_call_block_and_release + 24
52 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16
53 libdispatch.dylib 0x9324 _dispatch_lane_serial_drain$VARIANT$mp + 592
54 libdispatch.dylib 0x9e40 _dispatch_lane_invoke$VARIANT$mp + 428
55 libdispatch.dylib 0x124ac _dispatch_workloop_worker_thread + 596
56 libsystem_pthread.dylib 0xc114 _pthread_wqthread + 304
57 libsystem_pthread.dylib 0xecd4 start_wqthread + 4
Datadog SDK versions:
At least since 1.19.0 and till 1.20.0 (latest at the moment)
Last stable Datadog SDK version:
Unknown
Volume:
18 events by now, it's less that 1%; but all happened on iOS 12, can't tell how much is it among iOS 12 users
OS version:
iOS 12 only
Deployment Target:
iOS 12 min, iPhone and iPad
Device version:
Different iPhone models; but my users almost don't use iPad
Environment:
Nothing special
Hi @VaryHice ! Thank you for the report 🙏
It looks like it fails to encode the user-info when writing events in RUM. Do you set any user extra-info that it may have issues encoding in old iOS versions?
Hello @maxep! Yes I use this code to set client id:
Datadog.addUserExtraInfo(["client_id" : clientId])
where clientId
is a string value, i e "730547aaf6853e90872ed546cec6a09ff382f36b68870f63181f994f5dcf54db"
.
But I've added this only in recent versions, while crash appears in earlier versions where no extra user info is set 🤷♂️
Also I noticed other classes in crash logs too, which Crashlytics merged into one issue:
RUMOperatingSystem
Crashed: com.datadoghq.rum-monitor
0 libsystem_kernel.dylib 0x21dd0 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x1b924 <redacted> + 100
2 libsystem_kernel.dylib 0x1b8c0 abort_with_reason + 26
3 libobjc.A.dylib 0x5478 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 112
4 libobjc.A.dylib 0x53d0 __objc_error + 38
5 libobjc.A.dylib 0x10960 lookUpImpOrForward + 1200
6 libobjc.A.dylib 0x1d858 _objc_msgSend_uncached + 56
7 libswiftCore.dylib 0x2cf7c8 swift_instantiateObjCClass + 32
8 libswiftCore.dylib 0x293c0c _swift_initClassMetadataImpl(swift::TargetClassMetadata<swift::InProcess>*, swift::ClassLayoutFlags, unsigned long, swift::TypeLayout const* const*, unsigned long*, bool) + 3008
9 libswiftCore.dylib 0x261ae8 type metadata completion function for _KeyedEncodingContainerBox + 76
10 libswiftCore.dylib 0x29a164 swift::MetadataCacheEntryBase<(anonymous namespace)::GenericCacheEntry, void const*>::doInitialization(swift::ConcurrencyControl&, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) + 276
11 libswiftCore.dylib 0x2913f8 swift_getGenericMetadata + 1196
12 libswiftCore.dylib 0x34d38 KeyedEncodingContainer.init<A>(_:) + 56
13 Datadog 0x14ed8 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC9container7keyedBys22KeyedEncodingContainerVyxGxm_ts9CodingKeyRzlF + 440
14 Datadog 0x177c8 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLCs0C0AAsAEP9container7keyedBys22KeyedEncodingContainerVyqd__Gqd__m_ts9CodingKeyRd__lFTW + 20
15 Datadog 0x100964 $s7Datadog18RUMOperatingSystemV6encode2toys7Encoder_p_tKF + 140
16 Datadog 0x100aac $s7Datadog18RUMOperatingSystemVSEAASE6encode2toys7Encoder_p_tKFTW + 40
17 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
18 Datadog 0x15878 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC20SingleValueContainerV6encodeyyxKSERzlF + 344
19 Datadog 0x156f4 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC14KeyedContainerC6encode_6forKeyyqd___xtKSERd__lF + 88
20 Datadog 0x162b0 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC14KeyedContainerCy_xGs0j8EncodingK8ProtocolAAsAHP6encode_6forKeyyqd___0P0QztKSERd__lFTW + 20
21 libswiftCore.dylib 0x34cc8 KeyedEncodingContainerProtocol.encodeIfPresent<A>(_:forKey:) + 268
22 Datadog 0x1672c $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC14KeyedContainerCy_xGs0j8EncodingK8ProtocolAAsAHP15encodeIfPresent_6forKeyyqd__Sg_0R0QztKSERd__lFTW + 88
23 libswiftCore.dylib 0x3d1c8 _KeyedEncodingContainerBox.encodeIfPresent<A>(_:forKey:) + 36
24 libswiftCore.dylib 0x359d8 KeyedEncodingContainer.encodeIfPresent<A>(_:forKey:) + 76
25 Datadog 0xf5f34 $s7Datadog12RUMViewEventV6encode2toys7Encoder_p_tKF + 1252
26 Datadog 0xf6324 $s7Datadog12RUMViewEventVSEAASE6encode2toys7Encoder_p_tKFTW + 60
27 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
28 Datadog 0xcc104 $s7Datadog13_AnyEncodablePAAE6encode2toys7Encoder_p_tKFAA05DDAnyC0V_Tg5Tm + 1772
29 Datadog 0xcb9f4 $s7Datadog13_AnyEncodablePAAE6encode2toys7Encoder_p_tKFAA05DDAnyC0V_Tg5 + 20
30 Datadog 0x169244 $s7Datadog12RUMViewScopeC19sendViewUpdateEvent33_1C1EA23556A973591D952665B4C3C2EFLL2on7context6writeryAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 12848
31 Datadog 0x163220 $s7Datadog12RUMViewScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 2600
32 Datadog 0x153418 $sSa7DatadogAA8RUMScopeRzlE6scopes13byPropagating7context6writerSayxGAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptFSbxXEfU_AA12RUMViewScopeC_TG5TA + 36
33 Datadog 0x1947fc $ss14_ArrayProtocolPsE6filterySay7ElementQzGSbAEKXEKFSay7Datadog12RUMViewScopeCG_Tg5 + 208
34 Datadog 0x150100 $s7Datadog15RUMSessionScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 1576
35 Datadog 0xd3eb4 $s7Datadog19RUMApplicationScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptFAA010RUMSessionC0CSgAMXEfU0_TA + 60
36 Datadog 0x18cf24 $sSTsE10compactMapySayqd__Gqd__Sg7ElementQzKXEKlFSay7Datadog15RUMSessionScopeCG_AHTg5Tm + 316
37 Datadog 0x18cdb4 $sSTsE10compactMapySayqd__Gqd__Sg7ElementQzKXEKlFSay7Datadog15RUMSessionScopeCG_AHTg5 + 36
38 Datadog 0xd3020 $s7Datadog19RUMApplicationScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptFTf4ennn_nAA0B12StartCommandV_Tg5 + 1280
39 Datadog 0xd1994 $s7Datadog19RUMApplicationScopeC16applicationStart33_913485D011E48E6B216AD82800928028LL2on7context6writeryAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 520
40 Datadog 0xd35e0 $s7Datadog19RUMApplicationScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptFTf4ennn_n + 364
41 Datadog 0x141cc0 $s7Datadog10RUMMonitorC7process7commandyAA10RUMCommand_p_tFyAA0A7ContextV_AA6Writer_ptcfU_yyXEfU_ + 184
42 Datadog 0x6d834 $sIg_Ieg_TR + 20
43 Datadog 0x6d854 $sIeg_IyB_TR + 20
44 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16
45 libdispatch.dylib 0xec1c _dispatch_lane_barrier_sync_invoke_and_complete + 56
46 Datadog 0x141ba0 $s7Datadog10RUMMonitorC7process7commandyAA10RUMCommand_p_tFyAA0A7ContextV_AA6Writer_ptcfU_ + 376
47 Datadog 0x145d18 $s7Datadog10RUMMonitorC7process7commandyAA10RUMCommand_p_tFyAA0A7ContextV_AA6Writer_ptcfU_TA + 20
48 Datadog 0x671e0 $s7Datadog0A16CoreFeatureScopeV17eventWriteContext13bypassConsent13forceNewBatch_ySb_SbyAA0aG0V_AA6Writer_ptKctFyAHcfU_ + 204
49 Datadog 0x5f09c $s7Datadog0A15ContextProviderC4read5blockyyAA0aB0Vc_tFyycfU_ + 304
50 Datadog 0x13d728 $sIeg_IeyB_TR + 28
51 libdispatch.dylib 0x5fa38 _dispatch_call_block_and_release + 24
52 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16
53 libdispatch.dylib 0x9324 _dispatch_lane_serial_drain$VARIANT$mp + 592
54 libdispatch.dylib 0x9e40 _dispatch_lane_invoke$VARIANT$mp + 428
55 libdispatch.dylib 0x124ac _dispatch_workloop_worker_thread + 596
56 libsystem_pthread.dylib 0xc114 _pthread_wqthread + 304
57 libsystem_pthread.dylib 0xecd4 start_wqthread + 4
RUMConnectivity
Crashed: com.datadoghq.rum-monitor
0 libsystem_kernel.dylib 0x21dd0 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x1b924 <redacted> + 100
2 libsystem_kernel.dylib 0x1b8c0 abort_with_reason + 26
3 libobjc.A.dylib 0x5478 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 112
4 libobjc.A.dylib 0x53d0 __objc_error + 38
5 libobjc.A.dylib 0x10960 lookUpImpOrForward + 1200
6 libobjc.A.dylib 0x1d858 _objc_msgSend_uncached + 56
7 libswiftCore.dylib 0x2cf7c8 swift_instantiateObjCClass + 32
8 libswiftCore.dylib 0x293c0c _swift_initClassMetadataImpl(swift::TargetClassMetadata<swift::InProcess>*, swift::ClassLayoutFlags, unsigned long, swift::TypeLayout const* const*, unsigned long*, bool) + 3008
9 libswiftCore.dylib 0x261ae8 type metadata completion function for _KeyedEncodingContainerBox + 76
10 libswiftCore.dylib 0x29a164 swift::MetadataCacheEntryBase<(anonymous namespace)::GenericCacheEntry, void const*>::doInitialization(swift::ConcurrencyControl&, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) + 276
11 libswiftCore.dylib 0x2913f8 swift_getGenericMetadata + 1196
12 libswiftCore.dylib 0x34d38 KeyedEncodingContainer.init<A>(_:) + 56
13 Datadog 0x150c0 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC9container7keyedBys22KeyedEncodingContainerVyxGxm_ts9CodingKeyRzlF + 440
14 Datadog 0x179b0 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLCs0C0AAsAEP9container7keyedBys22KeyedEncodingContainerVyqd__Gqd__m_ts9CodingKeyRd__lFTW + 20
15 Datadog 0xff428 $s7Datadog15RUMConnectivityV6encode2toys7Encoder_p_tKF + 140
16 Datadog 0xff60c $s7Datadog15RUMConnectivityVSEAASE6encode2toys7Encoder_p_tKFTW + 40
17 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
18 Datadog 0x15a60 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC20SingleValueContainerV6encodeyyxKSERzlF + 344
19 Datadog 0x158dc $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC14KeyedContainerC6encode_6forKeyyqd___xtKSERd__lF + 88
20 Datadog 0x16498 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC14KeyedContainerCy_xGs0j8EncodingK8ProtocolAAsAHP6encode_6forKeyyqd___0P0QztKSERd__lFTW + 20
21 libswiftCore.dylib 0x34cc8 KeyedEncodingContainerProtocol.encodeIfPresent<A>(_:forKey:) + 268
22 Datadog 0x16914 $s7Datadog11_AnyEncoder33_EC9D12529BF1809641AC633B6CDD601FLLC14KeyedContainerCy_xGs0j8EncodingK8ProtocolAAsAHP15encodeIfPresent_6forKeyyqd__Sg_0R0QztKSERd__lFTW + 88
23 libswiftCore.dylib 0x3d1c8 _KeyedEncodingContainerBox.encodeIfPresent<A>(_:forKey:) + 36
24 libswiftCore.dylib 0x359d8 KeyedEncodingContainer.encodeIfPresent<A>(_:forKey:) + 76
25 Datadog 0xf61f8 $s7Datadog12RUMViewEventV6encode2toys7Encoder_p_tKF + 604
26 Datadog 0xf6870 $s7Datadog12RUMViewEventVSEAASE6encode2toys7Encoder_p_tKFTW + 60
27 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
28 Datadog 0xcc2ec $s7Datadog13_AnyEncodablePAAE6encode2toys7Encoder_p_tKFAA05DDAnyC0V_Tg5Tm + 1772
29 Datadog 0xcbbdc $s7Datadog13_AnyEncodablePAAE6encode2toys7Encoder_p_tKFAA05DDAnyC0V_Tg5 + 20
30 Datadog 0x16949c $s7Datadog12RUMViewScopeC19sendViewUpdateEvent33_1C1EA23556A973591D952665B4C3C2EFLL2on7context6writeryAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 12828
31 Datadog 0x16348c $s7Datadog12RUMViewScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 2600
32 Datadog 0xd440c $sSa7DatadogAA8RUMScopeRzlE6scopes13byPropagating7context6writerSayxGAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptFSbxXEfU_AA12RUMViewScopeC_TG5TA + 36
33 Datadog 0x194ae0 $ss14_ArrayProtocolPsE6filterySay7ElementQzGSbAEKXEKFSay7Datadog12RUMViewScopeCG_Tg5 + 208
34 Datadog 0xd2f70 $s7Datadog15RUMSessionScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptFTf4ennn_nAA26RUMApplicationStartCommandV_Tg5 + 1632
35 Datadog 0xd2298 $s7Datadog19RUMApplicationScopeC19startInitialSession33_913485D011E48E6B216AD82800928028LL2on7context6writeryAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 1184
36 Datadog 0xd145c $s7Datadog19RUMApplicationScopeC7process7command7context6writerSbAA10RUMCommand_p_AA0A7ContextVAA6Writer_ptF + 164
37 Datadog 0x1421f8 $s7Datadog10RUMMonitorC7process7commandyAA10RUMCommand_p_tFyAA0A7ContextV_AA6Writer_ptcfU_yyXEfU_ + 164
38 Datadog 0x6da1c $sIg_Ieg_TR + 20
39 Datadog 0x6da3c $sIeg_IyB_TR + 20
40 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16
41 libdispatch.dylib 0xec1c _dispatch_lane_barrier_sync_invoke_and_complete + 56
42 Datadog 0x1420ec $s7Datadog10RUMMonitorC7process7commandyAA10RUMCommand_p_tFyAA0A7ContextV_AA6Writer_ptcfU_ + 376
43 Datadog 0x145f84 $s7Datadog10RUMMonitorC7process7commandyAA10RUMCommand_p_tFyAA0A7ContextV_AA6Writer_ptcfU_TA + 20
44 Datadog 0x673c8 $s7Datadog0A16CoreFeatureScopeV17eventWriteContext13bypassConsent13forceNewBatch_ySb_SbyAA0aG0V_AA6Writer_ptKctFyAHcfU_ + 204
45 Datadog 0x5f284 $s7Datadog0A15ContextProviderC4read5blockyyAA0aB0Vc_tFyycfU_ + 304
46 Datadog 0x13dc74 $sIeg_IeyB_TR + 28
47 libdispatch.dylib 0x5fa38 _dispatch_call_block_and_release + 24
48 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16
49 libdispatch.dylib 0x9324 _dispatch_lane_serial_drain$VARIANT$mp + 592
50 libdispatch.dylib 0x9e40 _dispatch_lane_invoke$VARIANT$mp + 428
51 libdispatch.dylib 0x124ac _dispatch_workloop_worker_thread + 596
52 libsystem_pthread.dylib 0xc114 _pthread_wqthread + 304
53 libsystem_pthread.dylib 0xecd4 start_wqthread + 4
Hi @VaryHice 👋 Thank you very much for the stacktraces, we are investigating this issue. I will keep you posted.
@maxep Are there any updates on this Crash issue? I am facing similar crashes.
Note: I am using Datadog.setUserInfo(id: String? = nil, name: String? = nil, email: String? = nil, extraInfo: [AttributeKey: AttributeValue] = [:])
function to add custom info.
Attaching the stack traces below.
Crashed: com.datadoghq.rum-monitor
0 libsystem_kernel.dylib 0x21dd0 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x1b924 <redacted> + 100
2 libsystem_kernel.dylib 0x1b8c0 abort_with_reason + 26
3 libobjc.A.dylib 0x5478 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 112
4 libobjc.A.dylib 0x53d0 __objc_error + 38
5 libobjc.A.dylib 0x10960 lookUpImpOrForward + 1200
6 libobjc.A.dylib 0x1d858 _objc_msgSend_uncached + 56
7 libswiftCore.dylib 0x2cf7c8 swift_instantiateObjCClass + 32
8 libswiftCore.dylib 0x293c0c _swift_initClassMetadataImpl(swift::TargetClassMetadata<swift::InProcess>*, swift::ClassLayoutFlags, unsigned long, swift::TypeLayout const* const*, unsigned long*, bool) + 3008
9 libswiftCore.dylib 0x261ae8 type metadata completion function for _KeyedEncodingContainerBox + 76
10 libswiftCore.dylib 0x29a164 swift::MetadataCacheEntryBase<(anonymous namespace)::GenericCacheEntry, void const*>::doInitialization(swift::ConcurrencyControl&, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) + 276
11 libswiftCore.dylib 0x2913f8 swift_getGenericMetadata + 1196
12 libswiftCore.dylib 0x34d38 KeyedEncodingContainer.init<A>(_:) + 56
13 Datadog 0x13814 _AnyEncoder.container<A>(keyedBy:) + 88 (AnyEncoder.swift:88)
14 Datadog 0x16104 protocol witness for Encoder.container<A>(keyedBy:) in conformance _AnyEncoder + 20 (<compiler-generated>:20)
15 IDPalSDK 0x25533c $s8IDPalSDK0A8UserInfoV6encode2toys7Encoder_p_tKF + 192
16 IDPalSDK 0x256648 $s8IDPalSDK0A8UserInfoVSEAASE6encode2toys7Encoder_p_tKFTW + 52
17 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
18 Datadog 0x7f77c specialized _AnyEncodable.encode(to:) + 1772
19 Datadog 0x7f06c specialized _AnyEncodable.encode(to:) + 20
20 Datadog 0x11f14 protocol witness for Encodable.encode(to:) in conformance DDAnyEncodable + 12 (<compiler-generated>:12)
21 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
22 Datadog 0x141b4 _AnyEncoder.SingleValueContainer.encode<A>(_:) + 657 (AnyEncoder.swift:657)
23 Datadog 0x14030 _AnyEncoder.KeyedContainer.encode<A>(_:forKey:) + 278 (AnyEncoder.swift:278)
24 Datadog 0x14bec protocol witness for KeyedEncodingContainerProtocol.encode<A>(_:forKey:) in conformance _AnyEncoder.KeyedContainer<A> + 20 (<compiler-generated>:20)
25 libswiftCore.dylib 0x3ce30 _KeyedEncodingContainerBox.encode<A>(_:forKey:) + 36
26 libswiftCore.dylib 0x35320 KeyedEncodingContainer.encode<A>(_:forKey:) + 76
27 Datadog 0x11f58c RUMUser.encode(to:) + 3108 (RUMDataModels.swift:3108)
28 Datadog 0x11f0d0 protocol witness for Encodable.encode(to:) in conformance RUMUser + 12 (<compiler-generated>:12)
29 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
30 Datadog 0x141b4 _AnyEncoder.SingleValueContainer.encode<A>(_:) + 657 (AnyEncoder.swift:657)
31 Datadog 0x14030 _AnyEncoder.KeyedContainer.encode<A>(_:forKey:) + 278 (AnyEncoder.swift:278)
32 Datadog 0x14bec protocol witness for KeyedEncodingContainerProtocol.encode<A>(_:forKey:) in conformance _AnyEncoder.KeyedContainer<A> + 20 (<compiler-generated>:20)
33 libswiftCore.dylib 0x34cc8 KeyedEncodingContainerProtocol.encodeIfPresent<A>(_:forKey:) + 268
34 Datadog 0x15068 protocol witness for KeyedEncodingContainerProtocol.encodeIfPresent<A>(_:forKey:) in conformance _AnyEncoder.KeyedContainer<A> + 88 (<compiler-generated>:88)
35 libswiftCore.dylib 0x3d1c8 _KeyedEncodingContainerBox.encodeIfPresent<A>(_:forKey:) + 36
36 libswiftCore.dylib 0x359d8 KeyedEncodingContainer.encodeIfPresent<A>(_:forKey:) + 76
37 Datadog 0x10d574 RUMViewEvent.encode(to:) + 3364 (<compiler-generated>:3364)
38 Datadog 0x10f77c protocol witness for Encodable.encode(to:) in conformance RUMViewEvent + 12 (<compiler-generated>:12)
39 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
40 Datadog 0x7f77c specialized _AnyEncodable.encode(to:) + 1772
41 Datadog 0x7f06c specialized _AnyEncodable.encode(to:) + 20
42 Datadog 0x173d50 RUMViewScope.sendViewUpdateEvent(on:context:writer:) + 49 (AnyEncoder.swift:49)
43 Datadog 0x16e0dc RUMViewScope.process(command:context:writer:) + 244 (RUMViewScope.swift:244)
44 Datadog 0x15c714 partial apply for specialized closure #1 in Array<A>.scopes(byPropagating:context:writer:) + 36 (<compiler-generated>:36)
45 Datadog 0x1a11a8 specialized _ArrayProtocol.filter(_:) + 208 (<compiler-generated>:208)
46 Datadog 0x1593d8 RUMSessionScope.process(command:context:writer:) + 31 (RUMScope.swift:31)
47 Datadog 0xd3838 partial apply for closure #2 in RUMApplicationScope.process(command:context:writer:) + 81 (RUMApplicationScope.swift:81)
48 Datadog 0xd3974 closure #2 in RUMApplicationScope.process(command:context:writer:)partial apply + 12
49 Datadog 0x199874 specialized Sequence.compactMap<A>(_:) + 316
50 Datadog 0x199704 specialized Sequence.compactMap<A>(_:) + 36
51 Datadog 0xd32e8 specialized RUMApplicationScope.process(command:context:writer:) + 80 (RUMApplicationScope.swift:80)
52 Datadog 0x14afd8 closure #1 in closure #1 in RUMMonitor.process(command:) + 633 (RUMMonitor.swift:633)
53 Datadog 0x65094 thunk for @callee_guaranteed () -> () + 20 (<compiler-generated>:20)
54 Datadog 0x650b4 thunk for @escaping @callee_guaranteed () -> () + 20 (<compiler-generated>:20)
55 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16
56 libdispatch.dylib 0xec1c _dispatch_lane_barrier_sync_invoke_and_complete + 56
57 Datadog 0x14aeb8 closure #1 in RUMMonitor.process(command:) + 630 (RUMMonitor.swift:630)
58 Datadog 0x14e894 partial apply for closure #1 in RUMMonitor.process(command:) + 20 (<compiler-generated>:20)
59 Datadog 0x5df04 closure #1 in DatadogCoreFeatureScope.eventWriteContext(bypassConsent:forceNewBatch:_:) + 503 (DatadogCore.swift:503)
60 Datadog 0x55efc closure #1 in DatadogContextProvider.read(block:) + 105 (DatadogContextProvider.swift:105)
61 Datadog 0x146368 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:28)
62 libdispatch.dylib 0x5fa38 _dispatch_call_block_and_release + 24
63 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16
64 libdispatch.dylib 0x9324 _dispatch_lane_serial_drain$VARIANT$mp + 592
65 libdispatch.dylib 0x9e40 _dispatch_lane_invoke$VARIANT$mp + 428
66 libdispatch.dylib 0x124ac _dispatch_workloop_worker_thread + 596
67 libsystem_pthread.dylib 0xc114 _pthread_wqthread + 304
68 libsystem_pthread.dylib 0xecd4 start_wqthread + 4
Crashed: com.datadoghq.ios-sdk-read-write
0 libsystem_kernel.dylib 0x21dd0 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x1b924 <redacted> + 100
2 libsystem_kernel.dylib 0x1b8c0 abort_with_reason + 26
3 libobjc.A.dylib 0x5478 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 112
4 libobjc.A.dylib 0x53d0 __objc_error + 38
5 libobjc.A.dylib 0x10960 lookUpImpOrForward + 1200
6 libobjc.A.dylib 0x1d858 _objc_msgSend_uncached + 56
7 libswiftCore.dylib 0x2cf7c8 swift_instantiateObjCClass + 32
8 libswiftCore.dylib 0x293c0c _swift_initClassMetadataImpl(swift::TargetClassMetadata<swift::InProcess>*, swift::ClassLayoutFlags, unsigned long, swift::TypeLayout const* const*, unsigned long*, bool) + 3008
9 libswiftCore.dylib 0x261ae8 type metadata completion function for _KeyedEncodingContainerBox + 76
10 libswiftCore.dylib 0x29a164 swift::MetadataCacheEntryBase<(anonymous namespace)::GenericCacheEntry, void const*>::doInitialization(swift::ConcurrencyControl&, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) + 276
11 libswiftCore.dylib 0x2913f8 swift_getGenericMetadata + 1196
12 libswiftCore.dylib 0x34d38 KeyedEncodingContainer.init<A>(_:) + 56
13 libswiftFoundation.dylib 0x54bdc __JSONEncoder.container<A>(keyedBy:) + 428
14 libswiftFoundation.dylib 0x54fe4 protocol witness for Encoder.container<A>(keyedBy:) in conformance __JSONEncoder + 20
15 Datadog 0x12367c RUMUser.encode(to:) + 3100 (RUMDataModels.swift:3100)
16 Datadog 0x12358c protocol witness for Encodable.encode(to:) in conformance RUMUser + 12 (<compiler-generated>:12)
17 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
18 libswiftFoundation.dylib 0x53658 __JSONEncoder.box_(_:) + 5404
19 libswiftFoundation.dylib 0x5fab4 _JSONKeyedEncodingContainer.encode<A>(_:forKey:) + 3280
20 libswiftFoundation.dylib 0xb81c8 protocol witness for KeyedEncodingContainerProtocol.encode<A>(_:forKey:) in conformance _JSONKeyedEncodingContainer<A> + 28
21 libswiftFoundation.dylib 0x637e4 protocol witness for KeyedEncodingContainerProtocol.encode<A>(_:forKey:) in conformance _JSONKeyedEncodingContainer<A> + 20
22 libswiftCore.dylib 0x34cc8 KeyedEncodingContainerProtocol.encodeIfPresent<A>(_:forKey:) + 268
23 libswiftFoundation.dylib 0x63aa8 protocol witness for KeyedEncodingContainerProtocol.encodeIfPresent<A>(_:forKey:) in conformance _JSONKeyedEncodingContainer<A> + 32
24 libswiftCore.dylib 0x3d1c8 _KeyedEncodingContainerBox.encodeIfPresent<A>(_:forKey:) + 36
25 libswiftCore.dylib 0x359d8 KeyedEncodingContainer.encodeIfPresent<A>(_:forKey:) + 76
26 Datadog 0xeea64 RUMActionEvent.encode(to:) + 3764 (<compiler-generated>:3764)
27 Datadog 0xf1ea4 protocol witness for Encodable.encode(to:) in conformance RUMActionEvent + 12 (<compiler-generated>:12)
28 libswiftCore.dylib 0x25fed4 dispatch thunk of Encodable.encode(to:) + 16
29 libswiftFoundation.dylib 0x53658 __JSONEncoder.box_(_:) + 5404
30 libswiftFoundation.dylib 0x519a8 JSONEncoder.encode<A>(_:) + 520
31 libswiftFoundation.dylib 0x145c40 dispatch thunk of JSONEncoder.encode<A>(_:) + 20
32 Datadog 0xa0a94 FileWriter.encode(encodable:blockType:) + 65 (FileWriter.swift:65)
33 Datadog 0xa0710 FileWriter.write<A, B>(value:metadata:) + 36 (FileWriter.swift:36)
34 Datadog 0x1aecf0 partial apply for closure #1 in AsyncWriter.write<A, B>(value:metadata:) + 38 (Writer.swift:38)
35 Datadog 0x148f78 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:28)
36 libdispatch.dylib 0x5fa38 _dispatch_call_block_and_release + 24
37 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16
38 libdispatch.dylib 0x9324 _dispatch_lane_serial_drain$VARIANT$mp + 592
39 libdispatch.dylib 0x9e74 _dispatch_lane_invoke$VARIANT$mp + 480
40 libdispatch.dylib 0x124ac _dispatch_workloop_worker_thread + 596
41 libsystem_pthread.dylib 0xc114 _pthread_wqthread + 304
42 libsystem_pthread.dylib 0xecd4 start_wqthread + 4
I'm having a similar issue after upgrading to Datadog V2 The issue is inconsistent, I'm not even able to reproduce it on my device, However, a lot of my users are facing this issue.
SIGSEGV (SEGV_ACCERR): Application crash: SIGSEGV (Segmentation fault)
0 DatadogInternal 0x00000001017138b0 0x1016d0000 + 276656
1 libswiftCore.dylib 0x00000001f0141c68 0x1efeb7000 + 2665576
2 DatadogLogs 0x0000000101192134 0x101174000 + 123188
3 libswiftCore.dylib 0x00000001f0141c68 0x1efeb7000 + 2665576
4 libswiftCore.dylib 0x00000001f0138408 0x1efeb7000 + 2626568
5 libswiftCore.dylib 0x00000001eff17960 0x1efeb7000 + 395616
6 libswiftCore.dylib 0x00000001f0141c68 0x1efeb7000 + 2665576
7 libswiftCore.dylib 0x00000001f01439e4 0x1efeb7000 + 2673124
8 libswiftCore.dylib 0x00000001f01553a4 0x1efeb7000 + 2745252
9 libswiftCore.dylib 0x00000001f01199f4 0x1efeb7000 + 2501108
10 - 0x0000000100b93810 0x100a58000 + 1292304
11 - 0x0000000100b8e234 0x100a58000 + 1270324
12 - 0x0000000100b8e2c0 0x100a58000 + 1270464
13 - 0x0000000100ae5830 0x100a58000 + 579632
14 - 0x0000000100ae5f60 0x100a58000 + 581472
15 - 0x0000000100b51f70 0x100a58000 + 1023856
16 - 0x0000000100b52d64 0x100a58000 + 1027428
17 - 0x0000000100b4f794 0x100a58000 + 1013652
18 - 0x0000000100b4dd30 0x100a58000 + 1006896
19 - 0x0000000100b4df94 0x100a58000 + 1007508
20 UIKitCore 0x00000001ee7cd224 0x1ee4ba000 + 3224100
21 UIKitCore 0x00000001ee7cd628 0x1ee4ba000 + 3225128
22 UIKitCore 0x00000001ee72a724 0x1ee4ba000 + 2557732
23 UIKitCore 0x00000001ee73e714 0x1ee4ba000 + 2639636
24 UIKitCore 0x00000001ee73fb3c 0x1ee4ba000 + 2644796
25 UIKitCore 0x00000001ee722d4c 0x1ee4ba000 + 2526540
26 UIKitCore 0x00000001ef20e170 0x1ee4ba000 + 13975920
27 QuartzCore 0x00000001c6e60c60 0x1c6d22000 + 1305696
28 QuartzCore 0x00000001c6e65c08 0x1c6d22000 + 1326088
29 QuartzCore 0x00000001c6dc83e4 0x1c6d22000 + 680932
30 QuartzCore 0x00000001c6df6620 0x1c6d22000 + 869920
31 UIKitCore 0x00000001eed707e0 0x1ee4ba000 + 9136096
32 UIKitCore 0x00000001eee59408 0x1ee4ba000 + 10089480
33 UIKitCore 0x00000001eee52330 0x1ee4ba000 + 10060592
34 CoreFoundation 0x00000001c28b3f1c 0x1c2809000 + 700188
35 CoreFoundation 0x00000001c28b3e9c 0x1c2809000 + 700060
36 CoreFoundation 0x00000001c28b3784 0x1c2809000 + 698244
37 CoreFoundation 0x00000001c28ae6c0 0x1c2809000 + 677568
38 CoreFoundation 0x00000001c28adfb4 0x1c2809000 + 675764
39 GraphicsServices 0x00000001c4ab079c 0x1c4aa6000 + 42908
40 UIKitCore 0x00000001eed76c38 0x1ee4ba000 + 9161784
41 - 0x0000000100ad6360 0x100a58000 + 516960
42 libdyld.dylib 0x00000001c23718e0 0x1c2370000 + 6368
Hey! sorry for the late reply.. we are still investigating this.
@sathriyanIDPal and @victors1681 could you please confirm that you are also experiencing this crash on iOS 12 only? @victors1681 do you have by any chance the symbolicated stack trace?
Thank you for your help 🙏
Hi @maxep, I have checked, and yes, all crashes (Totally 5) occurred only on iOS 12 devices. In our case, it occurred on iOS 12.5.6.
Thanks.
@maxep that's correct! iOS 12.x
SIGSEGV (SEGV_ACCERR): Application crash: SIGSEGV (Segmentation fault)
Thread 0 Crashed:
0 libswiftCore.dylib 0x00000001b6451c5c _swift_release_dealloc + 16
1 libswiftCore.dylib 0x00000001b6448408 swift_arrayDestroy + 68
2 libswiftCore.dylib 0x00000001b631b2b8 _SetStorage.deinit + 164
3 libswiftCore.dylib 0x00000001b631b338 _SetStorage.__deallocating_deinit + 12
4 libswiftCore.dylib 0x00000001b6451c68 _swift_release_dealloc + 28
5 DatadogInternal 0x00000001017ef8c8 ReadWriteLock.__deallocating_deinit + 96
6 libswiftCore.dylib 0x00000001b6451c68 _swift_release_dealloc + 28
7 DatadogLogs 0x000000010199a13c RemoteLogger.__deallocating_deinit + 48
8 libswiftCore.dylib 0x00000001b6451c68 _swift_release_dealloc + 28
9 libswiftCore.dylib 0x00000001b6448408 swift_arrayDestroy + 68
10 libswiftCore.dylib 0x00000001b6227960 _ContiguousArrayStorage.__deallocating_deinit + 44
11 libswiftCore.dylib 0x00000001b6451c68 _swift_release_dealloc + 28
12 libswiftCore.dylib 0x00000001b64539e4 swift::metadataimpl::ValueWitnesses<swift::metadataimpl::BridgeObjectBox>::assignWithTake(swift::OpaqueValue*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*) + 32
13 libswiftCore.dylib 0x00000001b64653a4 swift::metadataimpl::OpaqueExistentialBoxBase::assignWithTake<swift::metadataimpl::OpaqueExistentialBox<(unsigned int)1>::Container, >(swift::metadataimpl::OpaqueExistentialBox<(unsigned int)1>::Container*, swift::metadataimpl::OpaqueExistentialBox<(unsigned int)1>::Container*, ) + 176
14 libswiftCore.dylib 0x00000001b64299f4 assignWithTake for ClosedRange<>.Index + 224
15 Mobile Seller 0x0000000100e47bd8 outlined assign with take of LoggerProtocol? + 52
16 Mobile Seller 0x0000000100e425fc LoggerUtil.init() + 2572
17 Mobile Seller 0x0000000100e42688 @objc LoggerUtil.init() + 20
18 Mobile Seller 0x0000000100d98ef0 -[Clientes FacturasDB:andNombreCliente:andCiudad:andDias:] + 116
19 Mobile Seller 0x0000000100d99620 -[Clientes totalCuentasCobrar:] + 64
20 Mobile Seller 0x0000000100e05a94 DocumentViewController.getClientBalanceInfo() + 268
21 Mobile Seller 0x0000000100e06894 DocumentViewController.showClientSelected() + 364
22 Mobile Seller 0x0000000100e03068 DocumentViewController.handleDocumentEdition() + 1692
23 Mobile Seller 0x0000000100e0123c DocumentViewController.viewDidLoad() + 1512
24 Mobile Seller 0x0000000100e01780 @objc DocumentViewController.viewDidLoad() + 28
25 UIKitCore 0x00000001b4add224 -[UIViewController loadViewIfRequired] + 1012
26 UIKitCore 0x00000001b4add628 -[UIViewController view] + 28
27 UIKitCore 0x00000001b4a3a724 -[UINavigationController _startCustomTransition:] + 1072
28 UIKitCore 0x00000001b4a4e714 -[UINavigationController _startDeferredTransitionIfNeeded:] + 708
29 UIKitCore 0x00000001b4a4fb3c -[UINavigationController __viewWillLayoutSubviews] + 164
30 UIKitCore 0x00000001b4a32d4c -[UILayoutContainerView layoutSubviews] + 224
31 UIKitCore 0x00000001b551e170 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1292
32 QuartzCore 0x000000018cf48c60 -[CALayer layoutSublayers] + 184
33 QuartzCore 0x000000018cf4dc08 CA::Layer::layout_if_needed(CA::Transaction*) + 332
34 QuartzCore 0x000000018ceb03e4 CA::Context::commit_transaction(CA::Transaction*) + 348
35 QuartzCore 0x000000018cede620 CA::Transaction::commit() + 640
36 QuartzCore 0x000000018cedf15c CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
37 CoreFoundation 0x000000018899b4fc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
38 CoreFoundation 0x0000000188996224 __CFRunLoopDoObservers + 412
39 CoreFoundation 0x00000001889967a0 __CFRunLoopRun + 1228
40 CoreFoundation 0x0000000188995fb4 CFRunLoopRunSpecific + 436
41 GraphicsServices 0x000000018ab9879c GSEventRunModal + 104
42 UIKitCore 0x00000001b5086c38 UIApplicationMain + 212
43 Mobile Seller 0x0000000100d89a20 main + 80
44 libdyld.dylib 0x00000001884598e0 start + 4
please let me know if you need more inputs
@maxep I got another crash from iOS 15.7.8
SIGABRT (#0): Application crash: SIGABRT (Abort trap)
Thread 17 Crashed:
0 libsystem_kernel.dylib 0x00000001babb2bbc __pthread_kill + 8
1 libsystem_c.dylib 0x000000018b6f56ac abort + 124
2 libsystem_malloc.dylib 0x00000001922299d8 _malloc_put + 0
3 libsystem_malloc.dylib 0x0000000192229c40 malloc_zone_error + 96
4 libsystem_malloc.dylib 0x0000000192216040 szone_free + 460
5 DatadogInternal 0x000000010175b8dc ReadWriteLock.__deallocating_deinit + 116
6 libswiftCore.dylib 0x0000000185a25c20 _swift_release_dealloc + 28
7 DatadogLogs 0x00000001010ba134 RemoteLogger.__deallocating_deinit + 40
8 libswiftCore.dylib 0x0000000185a25c20 _swift_release_dealloc + 28
9 libswiftCore.dylib 0x0000000185a1aa60 swift_arrayDestroy + 68
10 libswiftCore.dylib 0x00000001857b2f3c _ContiguousArrayStorage.__deallocating_deinit + 44
11 libswiftCore.dylib 0x0000000185a25c20 _swift_release_dealloc + 28
12 libswiftCore.dylib 0x0000000185a2837c swift::metadataimpl::ValueWitnesses<swift::metadataimpl::BridgeObjectBox>::assignWithTake(swift::OpaqueValue*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*) + 32
13 libswiftCore.dylib 0x0000000185a41924 swift::metadataimpl::OpaqueExistentialBoxBase::assignWithTake<swift::metadataimpl::OpaqueExistentialBox<(unsigned int)1>::Container, >(swift::metadataimpl::OpaqueExistentialBox<(unsigned int)1>::Container*, swift::metadataimpl::OpaqueExistentialBox<(unsigned int)1>::Container*, ) + 176
14 libswiftCore.dylib 0x00000001859fa398 assignWithTake for ClosedRange<>.Index + 220
15 Mobile Seller 0x0000000100773bd8 outlined assign with take of LoggerProtocol? + 52
16 Mobile Seller 0x000000010076e5fc LoggerUtil.init() + 2572
17 Mobile Seller 0x000000010076e688 @objc LoggerUtil.init() + 20
Hey @VaryHice, @sathriyanIDPal
We are not able to reproduce the crash on our end. The crash appears in the Swift runtime and there is not much we can do other than a workaround for iOS12, but it will be hard to find without steps to reproduce... We had a similar issue #790 and a fix was applied to Swift, it looks like a similar case here.
Could you share which Xcode version was used to built the faulty app version?
@victors1681 👋
You are experiencing a different crash than the one described in this issue, it seems that your LoggerUtil.init()
is not retaining the Logger
instance. Could you please open another issue and describe how you initialise Datadog
, Logs
, and the Logger.create
Hi @maxep We used Xcode 14.1 if I remember correctly
@maxep Sure.. it could be. I had to create an util initialize the logger using a global variable and check if the class is already initialized the reason is after initializing the logger using the Datadog.setUserInfo
method I started experiencing the crashing (same implementation before 2.x),
I'm going to revert my changes to report the issue without using the global LoggerProtocol
variable.
var loggerInstance: LoggerProtocol?
@objc class LoggerUtil: NSObject {
....
//my constructor
override init() {
if Datadog.isInitialized(instanceName: "myapp") && loggerInstance != nil {
if let instance = loggerInstance {
self.logger = instance
return
}
}
//
let logger = Logger.create(with: Logger.Configuration(
name: "myapp",
networkInfoEnabled: true,
remoteLogThreshold: .info,
consoleLogFormat: .shortWith(prefix: "[iOS App] ")
))
...
Datadog.setUserInfo(id: user?.userId ?? "", name: user?.fullName ?? "", email: user?.email ?? "",extraInfo: ["UUID": vendorIdentifier, "device_name": deviceName, "ios_version": iosVersion, "device_model": deviceModel])
....
Hello @maxep,
We have used Xcode 14.3.1
Hey @sathriyanIDPal and @VaryHice 👋
Are you still not able to reproduce on your side? we don't have any clue on what could cause this, other than an issue in Swift runtime. Additionally to Xcode, what dependency manager do you use? Also, are you seeing any warnings when building your application that could relate to the issue?
Thank you for your help 🙏
@maxep 👋 No didn't face the issue by ourselves, can't test on iOS 12 right now. We use CocoaPods as dependency manager. Didn't notice any warning related to Datadog or crash data. We also concluded that it's probably iOS runtime bug and so far we decide to just drop iOS 12 support at some moment in near future.
Hello, @maxep.
Are you still not able to reproduce on your side? Not yet. Will try to replicate this weekend and let you know here.
What dependency manager do you use? We use CocoaPods as a dependency manager.
Are you seeing any warnings when building your application that could relate to the issue? Nope, nothing related to this issue.
Thanks.
We are also experiencing this for iOS versions 12.5.x for our Flutter application that runs on iOS.
This is the most recent stack trace:
SIGABRT (#0): Application crash: SIGABRT (Abort trap)
Thread 19 Crashed:
0 libsystem_kernel.dylib 0x000000019a319dd0 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x000000019a3138c0 abort_with_payload_wrapper_internal + 0
2 libobjc.A.dylib 0x0000000199957478 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 112
3 libobjc.A.dylib 0x00000001999573d0 __objc_error + 0
4 libobjc.A.dylib 0x0000000199962960 lookUpImpOrForward + 1200
5 libobjc.A.dylib 0x000000019996f858 _objc_msgSend_uncached + 56
6 libswiftCore.dylib 0x00000001c85677c8 swift_instantiateObjCClass + 32
7 libswiftCore.dylib 0x00000001c852bc0c _swift_initClassMetadataImpl(swift::TargetClassMetadata<swift::InProcess>*, swift::ClassLayoutFlags, unsigned long, swift::TypeLayout const* const*, unsigned long*, bool) + 3008
8 libswiftCore.dylib 0x00000001c84f9ae8 type metadata completion function for _KeyedEncodingContainerBox + 76
9 libswiftCore.dylib 0x00000001c8532164 swift::MetadataCacheEntryBase<(anonymous namespace)::GenericCacheEntry, void const*>::doInitialization(swift::ConcurrencyControl&, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) + 276
10 libswiftCore.dylib 0x00000001c85293f8 swift_getGenericMetadata + 1196
11 libswiftCore.dylib 0x00000001c82ccd38 KeyedEncodingContainer.init<A>(A1) + 56
12 Datadog 0x0000000101f00dc0 _AnyEncoder.container<A>(keyedBy: A.Type) + 404
13 Datadog 0x0000000101f04020 protocol witness for Encoder.container<A>(keyedBy: A1.Type) in conformance _AnyEncoder + 20
14 Datadog 0x0000000101ff4df4 RUMOperatingSystem.encode(to: Encoder) + 140
15 Datadog 0x0000000101ff4f64 protocol witness for Encodable.encode(to: Encoder) in conformance RUMOperatingSystem + 40
16 libswiftCore.dylib 0x00000001c84f7ed4 dispatch thunk of Encodable.encode(to: Encoder) + 16
17 Datadog 0x0000000101f017ec _AnyEncoder.SingleValueContainer.encode<A>(A) + 344
18 Datadog 0x0000000101f01668 _AnyEncoder.KeyedContainer.encode<A>(_: A1, forKey: A) + 88
19 Datadog 0x0000000101f02224 protocol witness for KeyedEncodingContainerProtocol.encode<A>(_: A1, forKey: A.Key) in conformance _AnyEncoder.KeyedContainer<A> + 20
20 libswiftCore.dylib 0x00000001c82cccc8 KeyedEncodingContainerProtocol.encodeIfPresent<A>(_: A1?, forKey: A.Key) + 268
21 Datadog 0x0000000101f026a0 protocol witness for KeyedEncodingContainerProtocol.encodeIfPresent<A>(_: A1?, forKey: A.Key) in conformance _AnyEncoder.KeyedContainer<A> + 88
22 libswiftCore.dylib 0x00000001c82d51c8 _KeyedEncodingContainerBox.encodeIfPresent<A>(_: A1?, forKey: A.Key) + 36
23 libswiftCore.dylib 0x00000001c82cd9d8 KeyedEncodingContainer.encodeIfPresent<A>(_: A1?, forKey: A) + 76
24 Datadog 0x0000000101fea9d8 RUMViewEvent.encode(to: Encoder) + 1264
25 Datadog 0x0000000101feae2c protocol witness for Encodable.encode(to: Encoder) in conformance RUMViewEvent + 60
26 libswiftCore.dylib 0x00000001c84f7ed4 dispatch thunk of Encodable.encode(to: Encoder) + 16
27 Datadog 0x0000000101fbc208 specialized _AnyEncodable.encode(to: Encoder) + 1760
28 Datadog 0x0000000101fbbb04 specialized _AnyEncodable.encode(to: Encoder) + 20
29 Datadog 0x00000001020663e0 protocol witness for Encodable.encode(to: Encoder) in conformance DDAnyEncodable + 12
30 Datadog 0x00000001020663e0 specialized AnyEncoder.encode<A>(A) + 132
31 Datadog 0x00000001020663e0 closure #1 (inout [String : Any], (String, Any?)) in FeatureBaggage.init(dictionaryLiteral: (String, Any?)...) + 476
32 Datadog 0x00000001020663e0 specialized Sequence.reduce<A>(into: __owned A1, _: (inout A1, A.Element)) + 1708
33 Datadog 0x00000001020663e0 FeatureBaggage.init(dictionaryLiteral: (String, Any?)...) + 1728
34 Datadog 0x00000001020663e0 RUMViewScope.sendViewUpdateEvent(on: RUMCommand, context: DatadogContext, writer: Writer) + 11820
35 Datadog 0x000000010206064c RUMViewScope.process(command: RUMCommand, context: DatadogContext, writer: Writer) + 2464
36 Datadog 0x000000010204afec partial apply for specialized closure #1 (A) in Array<A>.scopes(byPropagating: RUMCommand, context: DatadogContext, writer: Writer) + 36
37 Datadog 0x0000000102092fac specialized Array.formIndex(after: inout Int) + 24
38 Datadog 0x0000000102092fac specialized protocol witness for Collection.formIndex(after: inout A.Index) in conformance [A] + 24
39 Datadog 0x0000000102092fac specialized protocol witness for IteratorProtocol.next() in conformance IndexingIterator<A> + 152
40 Datadog 0x0000000102092fac specialized _ArrayProtocol.filter((A.Element)) + 200
41 Datadog 0x00000001020488c0 specialized Array<A>.scopes(byPropagating: RUMCommand, context: DatadogContext, writer: Writer) + 64
42 Datadog 0x00000001020488c0 RUMSessionScope.process(command: RUMCommand, context: DatadogContext, writer: Writer) + 1828
43 Datadog 0x0000000101fc1da8 closure #2 (RUMSessionScope) in RUMApplicationScope.process(command: RUMCommand, context: DatadogContext, writer: Writer) + 68
44 Datadog 0x0000000101fc4acc partial apply for closure #2 (RUMSessionScope) in RUMApplicationScope.process(command: RUMCommand, context: DatadogContext, writer: Writer) + 20
45 Datadog 0x0000000101fc49d8 partial apply for closure #2 (RUMSessionScope) in RUMApplicationScope.process(command: RUMCommand, context: DatadogContext, writer: Writer) + 12
46 Datadog 0x000000010208b62c specialized Sequence.compactMap<A>((A.Element)) + 296
47 Datadog 0x000000010208b4d8 specialized Sequence.compactMap<A>((A.Element)) + 28
48 Datadog 0x0000000101fc2f98 specialized RUMApplicationScope.process(command: RUMCommand, context: DatadogContext, writer: Writer) + 1268
49 Datadog 0x0000000101fc24cc RUMApplicationScope.applicationStart(on: RUMCommand, context: DatadogContext, writer: Writer) + 520
50 Datadog 0x0000000101fc3540 RUMApplicationScope.activeSession.getter + 0
51 Datadog 0x0000000101fc3540 specialized RUMApplicationScope.process(command: RUMCommand, context: DatadogContext, writer: Writer) + 368
52 Datadog 0x000000010203a628 closure #1 () in closure #1 (DatadogContext, Writer) in RUMMonitor.process(command: RUMCommand) + 184
53 Datadog 0x0000000101f5b990 thunk for @callee_guaranteed () -> () + 20
54 Datadog 0x0000000101f5b9b0 thunk for @escaping @callee_guaranteed () -> () + 20
55 libdispatch.dylib 0x000000019a1bd7d4 _dispatch_client_callout + 16
56 libdispatch.dylib 0x000000019a16bc1c _dispatch_lane_barrier_sync_invoke_and_complete + 56
57 Datadog 0x000000010203a508 closure #1 (DatadogContext, Writer) in RUMMonitor.process(command: RUMCommand) + 376
58 Datadog 0x000000010203e4f4 partial apply for closure #1 (DatadogContext, Writer) in RUMMonitor.process(command: RUMCommand) + 20
59 Datadog 0x000000010203ef3c closure #1 (DatadogContext, Writer) in RUMMonitor.process(command: RUMCommand)partial apply + 12
60 Datadog 0x0000000101f5551c closure #1 (DatadogContext) in DatadogCoreFeatureScope.eventWriteContext(bypassConsent: Bool, forceNewBatch: Bool, _: (DatadogContext, Writer)) + 204
61 Datadog 0x0000000101f4d2cc closure #1 () in DatadogContextProvider.read(block: (DatadogContext)) + 280
62 Datadog 0x0000000102035ff0 thunk for @escaping @callee_guaranteed () -> () + 28
63 libdispatch.dylib 0x000000019a1bca38 _dispatch_call_block_and_release + 24
64 libdispatch.dylib 0x000000019a1bd7d4 _dispatch_client_callout + 16
65 libdispatch.dylib 0x000000019a166324 _dispatch_lane_serial_drain$VARIANT$mp + 592
66 libdispatch.dylib 0x000000019a166e40 _dispatch_lane_invoke$VARIANT$mp + 428
67 libdispatch.dylib 0x000000019a16f4ac _dispatch_workloop_worker_thread + 596
68 libsystem_pthread.dylib 0x000000019a39e114 _pthread_wqthread + 304
69 libsystem_pthread.dylib 0x000000019a3a0cd4 start_wqthread + 4
Any solution?