CTTelephonyNetworkInfo.init() is crashing the app: App Hang: The app was terminated while unresponsive
#2138
Closed
Description
Stack trace
0 libobjc.A.dylib +0x6368 getMethodNoSuper_nolock(objc_class*, objc_selector*)
1 libobjc.A.dylib +0x5eec _lookUpImpOrForward
2 libobjc.A.dylib +0x5eec _lookUpImpOrForward
3 libobjc.A.dylib +0x40e0 __objc_msgSend_uncached
4 Foundation +0x1306c -[NSXPCDecoder _validateAllowedClass:forKey:allowingInvocations:]
5 Foundation +0x12848 __decodeObject
6 Foundation +0x5010c -[NSXPCDecoder _decodeObjectOfClasses:atObject:]
7 Foundation +0x4f884 __NSXPCSerializationDecodeTypedObjCValuesFromArray
8 Foundation +0x4f28c __NSXPCSerializationDecodeInvocationArgumentArray
9 Foundation +0x4d9c4 -[NSXPCDecoder __decodeXPCObject:allowingSimpleMessageSend:outInvocation:outArguments:outArgumentsMaxCount:outMethodSignature:outSelector:isReply:replySelector:]
10 Foundation +0xb77d0 -[NSXPCDecoder _decodeReplyFromXPCObject:forSelector:]
11 Foundation +0xb5e7c -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:]
12 Foundation +0xb8fbc ___88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_5
13 Foundation +0xb8274 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]
14 Foundation +0x93d20 -[NSXPCConnection _sendSelector:withProxy:arg1:arg2:]
15 Foundation +0x93adc __NSXPCDistantObjectSimpleMessageSend2
16 CoreTelephony +0xc01dc -[CoreTelephonyClient(Registration) getPublicSignalStrength:error:]
17 CoreTelephony +0x9a084 -[CTTelephonyNetworkInfo querySignalStrengthForDescriptor:]
18 CoreTelephony +0x99fb4 -[CTTelephonyNetworkInfo queryCTSignalStrength]
19 CoreTelephony +0x983e4 -[CTTelephonyNetworkInfo initWithClient:]
20 CoreTelephony +0x98110 -[CTTelephonyNetworkInfo init]
21 OurApp +0x1255284 @nonobjc CTTelephonyNetworkInfo.init()
22 OurApp +0x124cdbc CTTelephonyNetworkInfo.__allocating_init()
23 OurApp +0x124cd90 default argument 0 of CarrierInfoPublisher.init(networkInfo:)
24 OurApp +0x124e098 DatadogContextProvider.__allocating_init(site:clientToken:service:env:version:buildNumber:buildId:variant:source:nativeSourceOverride:sdkVersion:ciAppOrigin:applicationName:applicationBundleIdentifier:applicationBundleType:applicationVersion:sdkInitDate:device:processInfo:dateProvider:serverDateProvider:notificationCenter:appStateProvider:)
25 OurApp +0x1247b80 DatadogCore.__allocating_init(configuration:trackingConsent:instanceName:)
26 OurApp +0x1243c1c static Datadog.initializeOrThrow(with:trackingConsent:instanceName:)
27 OurApp +0x1243870 static Datadog.initialize(with:trackingConsent:instanceName:)
...
37 OurApp +0x20304 AppDelegate.application(_:didFinishLaunchingWithOptions:) (AppDelegate.swift:xx:yy)
38 OurApp +0x20630 @objc AppDelegate.application(_:didFinishLaunchingWithOptions:) (<compiler-generated>)
39 UIKitCore +0x47ba9c -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:]
40 UIKitCore +0x478d60 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:]
41 UIKitCore +0x29a648 -[UIApplication _runWithMainScene:transitionContext:completion:]
42 UIKitCore +0x44c1a4 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:]
43 UIKitCore +0x24f67c __UIScenePerformActionsWithLifecycleActionMask
44 UIKitCore +0x3ef110 ___101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke
45 UIKitCore +0x3eee20 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:]
46 UIKitCore +0x1b5870 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]
47 UIKitCore +0x1b5590 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:]
48 UIKitCore +0x1b5048 ___186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke
49 UIKitCore +0x1b41f0 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:]
50 UIKitCore +0x1b3828 __UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion
51 UIKitCore +0x1b34d8 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]
52 UIKitCore +0x24f42c ___64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.229
53 UIKitCore +0x24ed7c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:]
54 UIKitCore +0x2467a0 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:]
55 UIKitCore +0x22ea90 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:]
56 UIKitCore +0x22cf9c -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:]
57 FrontBoardServices +0xc008 ___95-[FBSScene _callOutQueue_didCreateWithTransitionContext:alternativeCreationCallout:completion:]_block_invoke
58 FrontBoardServices +0x9830 -[FBSScene _callOutQueue_coalesceClientSettingsUpdates:]
59 FrontBoardServices +0xb790 -[FBSScene _callOutQueue_didCreateWithTransitionContext:alternativeCreationCallout:completion:]
60 FrontBoardServices +0x1fc90 ___93-[FBSWorkspaceScenesClient _callOutQueue_sendDidCreateForScene:transitionContext:completion:]_block_invoke.197
61 FrontBoardServices +0x1f4c4 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
62 FrontBoardServices +0x2eb8c -[FBSWorkspaceScenesClient _callOutQueue_sendDidCreateForScene:transitionContext:completion:]
63 libdispatch.dylib +0x3fa4 __dispatch_client_callout
64 libdispatch.dylib +0x79ec __dispatch_block_invoke_direct
65 FrontBoardServices +0x18374 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
66 FrontBoardServices +0x182f4 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible]
67 FrontBoardServices +0x181cc -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource]
68 CoreFoundation +0x73f38 ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
69 CoreFoundation +0x73ecc ___CFRunLoopDoSource0
70 CoreFoundation +0x76b2c ___CFRunLoopDoSources0
71 CoreFoundation +0x75d28 ___CFRunLoopRun
72 CoreFoundation +0xc8270 _CFRunLoopRunSpecific
73 GraphicsServices +0x14bc _GSEventRunModal
74 UIKitCore +0x3ee778 -[UIApplication _run]
75 UIKitCore +0x14e60 _UIApplicationMain
76 OurApp +0x263d4 main (AppDelegate.swift:70:7)
77 dyld +0x2fde4 start
Reproduction steps
Unfortunately we do not have clear steps to reproduce. This crash is happening on app launch. We're currently using version 2.20.0 from the SDK.
Volume
0.01%
Affected SDK versions
2.17.0...2.20.0
Latest working SDK version
Unknown
Does the crash manifest in the latest SDK version?
Yes
Deployment Target
15.0, iPhone
Device Information
Nothing in common, we have multiple builds, OS versions, iPhone models, locales, etc.
Other relevant information
No response