I'm working on developing an application that requires the use of Mapbox turn-by-turn navigation. I've had to create a custom react native module to help me achieve this, but I think somewhere along my implementation is causing some issues pushing the phone to overheat and eventually crash.
Here's my crash report:
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: FRONTBOARD; [2343432205]
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: application<org.name.appName>:27065 exhausted real (wall clock) time allowance of 10.00 seconds
ProcessVisibility: Foreground
ProcessState: Running
WatchdogEvent: scene-update
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 40.290 (user 19.790, system 20.500), 67% CPU",
"Elapsed application CPU time (seconds): 1.558, 3% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1b7fd9f90 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1f1c9e254 _pthread_cond_wait + 1228
2 libc++.1.dylib 0x199207ddc std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3 libc++.1.dylib 0x199208984 std::__1::__assoc_sub_state::__sub_wait(std::__1::unique_lock<std::__1::mutex>&) + 56
4 libc++.1.dylib 0x1992088d4 std::__1::__assoc_sub_state::copy() + 56
5 libc++.1.dylib 0x199208c18 std::__1::future<void>::get() + 32
6 Mapbox 0x10532a3e0 0x1052e8000 + 271328
7 Mapbox 0x1056ac72c 0x1052e8000 + 3950380
8 CoreFoundation 0x1808aef88 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
9 CoreFoundation 0x18094ac3c ___CFXRegistrationPost_block_invoke + 52
10 CoreFoundation 0x18091dff4 _CFXRegistrationPost + 456
11 CoreFoundation 0x1808c4df4 _CFXNotificationPost + 716
12 Foundation 0x1820c3f58 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96
13 UIKitCore 0x182f93aec __47-[UIApplication _applicationDidEnterBackground]_block_invoke + 316
14 UIKitCore 0x182ef2ecc +[UIViewController _performWithoutDeferringTransitionsAllowingAnimation:actions:] + 164
15 UIKitCore 0x18312bdcc -[UIApplication _applicationDidEnterBackground] + 144
16 UIKitCore 0x182f21278 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 840
17 UIKitCore 0x182edbaf0 _UIScenePerformActionsWithLifecycleActionMask + 104
18 UIKitCore 0x183007438 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 224
19 UIKitCore 0x183128104 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 248
20 UIKitCore 0x1833692f8 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 760
21 UIKitCore 0x1832f4818 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340
22 UIKitCore 0x182edc8f4 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 196
23 UIKitCore 0x182f9d160 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 892
24 UIKitCore 0x182ede804 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 276
25 UIKitCore 0x182fc9448 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 384
26 UIKitCore 0x1834515cc __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.613 + 776
27 UIKitCore 0x182f0d13c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256
28 UIKitCore 0x182f50a50 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 288
29 UIKitCore 0x182eda834 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 492
30 FrontBoardServices 0x192567b30 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 528
31 FrontBoardServices 0x19258077c __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 152
32 FrontBoardServices 0x19256506c -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240
33 FrontBoardServices 0x19256b540 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 396
34 libdispatch.dylib 0x18058f670 _dispatch_client_callout + 20
35 libdispatch.dylib 0x180593128 _dispatch_block_invoke_direct + 264
36 FrontBoardServices 0x1925669c4 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48
37 FrontBoardServices 0x192565d8c -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220
38 FrontBoardServices 0x19256a414 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
39 CoreFoundation 0x18093f0d0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
40 CoreFoundation 0x18094fd90 __CFRunLoopDoSource0 + 208
41 CoreFoundation 0x18088a104 __CFRunLoopDoSources0 + 376
42 CoreFoundation 0x18088f8a4 __CFRunLoopRun + 820
43 CoreFoundation 0x1808a3468 CFRunLoopRunSpecific + 600
44 GraphicsServices 0x19c44738c GSEventRunModal + 164
45 UIKitCore 0x1832465d0 -[UIApplication _run] + 1100
46 UIKitCore 0x182fc4f74 UIApplicationMain + 364
47 appName 0x104368880 0x104364000 + 18560
48 dyld 0x104f19aa4 start + 520
And here's my code:
#objc func tappedButton(sender: UIButton) {
guard let routeResponse = routeResponse, let navigationRouteOptions = routeOptions else { return }
let parentVC = self.parentViewController
let navigationOptions = NavigationOptions(simulationMode: .never)
let navigationViewController = NavigationViewController(for: routeResponse, routeIndex: 0,
routeOptions: navigationRouteOptions, navigationOptions: navigationOptions)
navigationViewController.delegate = self
parentVC!.addChild(navigationViewController)
self.addSubview(navigationViewController.view)
navigationViewController.view.frame = self.bounds
navigationViewController.didMove(toParent: parentVC)
self.navigationViewController = navigationViewController
}
I needed to add the child this way with to get it to work with react native since I can't create the native module as a UIViewController with the main app being a UIViewController.
I added this to create a parentVC:
extension UIView {
var parentViewController: UIViewController? {
var parentResponder: UIResponder? = self
while parentResponder != nil {
parentResponder = parentResponder!.next
if let viewController = parentResponder as? UIViewController {
return viewController
}
}
return nil
}
}
Any help would be greatly appreciated!
Related
I was rejected to review the app, but there is no problem when I tested it with a practical device.
So I don't know where the problem occurs.
Crash Log:
Last Exception Backtrace:
0 CoreFoundation 0x1c6349e48 \__exceptionPreprocess + 164
1 libobjc.A.dylib 0x1bf6938d8 objc_exception_throw + 60
2 UIKitCore 0x1c8924838 -\[UIStoryboard initWithBundle:storyboardFileName:identifierToN
3 UIKitCore 0x1c8924394 -\[UISceneConfiguration initWithName:sessionRole:\] + 1572
4 UIKitCore 0x1c898167c +\[UISceneConfiguration configurationWithName:sessionRole:\] + 64
5 UIKitCore 0x1c898f5c8 -\[UISceneSession \_initWithPersistentIdentifier:sessionRole:configurationName:\] + 168
6 UIKitCore 0x1c8723230 -\[UIApplication \_connectUISceneFromFBSScene:transitionContext:\] + 408
7 UIKitCore 0x1c8722ee8 -\[UIApplication workspace:didCreateScene:withTransitionContext:completion:\] + 372
8 UIKitCore 0x1c8722d08 -\[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:\] + 288
9 FrontBoardServices 0x1dc064e90 -\[FBSScene \_callOutQueue_agent_didCreateWithTransitionContext:completion:\] + 344
10 FrontBoardServices 0x1dc0a48f8 \__92-\[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:\]\_block_invoke.78 + 120
11 FrontBoardServices 0x1dc068c24 -\[FBSWorkspace \_calloutQueue_executeCalloutFromSource:withBlock:\] + 168
12 FrontBoardServices 0x1dc0a4530 \__92-\[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:\]\_block_invoke + 360
13 libdispatch.dylib 0x1cd958fdc \_dispatch_client_callout + 20
14 libdispatch.dylib 0x1cd95ca5c \_dispatch_block_invoke_direct + 264
15 FrontBoardServices 0x1dc072d40 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52
16 FrontBoardServices 0x1dc0728dc -\[FBSSerialQueue targetQueue_performNextIfPossible\] + 220
17 FrontBoardServices 0x1dc075184 -\[FBSSerialQueue performNextFromRunLoopSource\] + 28
18 CoreFoundation 0x1c6415f34 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
19 CoreFoundation 0x1c642230c \__CFRunLoopDoSource0 + 176
20 CoreFoundation 0x1c63a6230 \__CFRunLoopDoSources0 + 340
21 CoreFoundation 0x1c63bbb8c \__CFRunLoopRun + 836
22 oreFoundation 0x1c63c0ec0 CFRunLoopRunSpecific + 612
23 GraphicsServices 0x1ffb6b368 GSEventRunModal + 164
24 UIKitCore 0x1c88b686c -\[UIApplication run\] + 888
25 UIKitCore 0x1c88b64d0 UIApplicationMain + 340
26 libswiftUIKit.dylib 0x1ceeda308 UIApplicationMain(_::::) + 104
27 MyApp 0x102b7ee8c static UIApplicationDelegate.main() + 104
28 MyApp 0x102b82880 main + 28
30 dyld 0x1e4bd2960 start + 2528
I looked for a place where Nil could float in init, but there was no place.
Thank you for your reading
I am building an app with React Native. With React Native Firebase, I am adding push notification functionality. When I open a push notification from quit state, the app opens and hangs at the splash screen for a while, and then crashes.
Here is the crash report from the device, symbolicated. Honestly, I am new to programming and so I am having trouble in interpreting below report. I assume that there is a problem with RNSplashScreen module or AppDelegate.m, but can't be sure.
Can anyone help me out in interpreting this and point me to what might be a root cause/where to look at?
Thanks!
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, <RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-create watchdog transgression: application<myapp.myapp>:2661 exhausted real (wall clock) time allowance of 59.91 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Background | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 16.580 (user 16.580, system 0.000), 5% CPU", | "Elapsed application CPU time (seconds): 0.918, 0% CPU" | ) reportType:CrashLog maxTerminationResistance:Interactive>
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001daebe2d0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001daebd660 mach_msg + 76
2 CoreFoundation 0x00000001acf08c30 __CFRunLoopServiceMachPort + 380
3 CoreFoundation 0x00000001acf02c14 __CFRunLoopRun + 1216
4 CoreFoundation 0x00000001acf0221c CFRunLoopRunSpecific + 600
5 Foundation 0x00000001ae1b1df0 -[NSRunLoop+ 36336 (NSRunLoop) runMode:beforeDate:] + 232
6 Foundation 0x00000001ae1b1cbc -[NSRunLoop+ 36028 (NSRunLoop) runUntilDate:] + 92
7 myapp 0x00000001005d15f0 +[RNSplashScreen show] (in myapp) (RNSplashScreen.m:31) + 5641712
8 myapp 0x0000000100075be4 -[AppDelegate application:didFinishLaunchingWithOptions:] (in myapp) (AppDelegate.m:53) + 23524
9 UIKitCore 0x00000001af93f228 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 360
10 UIKitCore 0x00000001af941290 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 5136
11 UIKitCore 0x00000001af946cec -[UIApplication _runWithMainScene:transitionContext:completion:] + 1244
12 UIKitCore 0x00000001aef9cc74 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 152
13 UIKitCore 0x00000001af50af9c _UIScenePerformActionsWithLifecycleActionMask + 112
14 UIKitCore 0x00000001aef9d80c __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 224
15 UIKitCore 0x00000001aef9d2cc -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 484
16 UIKitCore 0x00000001aef9d61c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 768
17 UIKitCore 0x00000001aef9ce58 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340
18 UIKitCore 0x00000001aefa53a4 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 196
19 UIKitCore 0x00000001af41760c +[BSAnimationSettings+ 6936076 (UIKit) tryAnimatingWithSettings:actions:completion:] + 892
20 UIKitCore 0x00000001af5236c4 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 272
21 UIKitCore 0x00000001aefa509c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 384
22 UIKitCore 0x00000001aedcc5a0 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 776
23 UIKitCore 0x00000001aedcaf14 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256
24 UIKitCore 0x00000001aedcc1c8 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 248
25 UIKitCore 0x00000001af944e8c -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 572
26 UIKitCore 0x00000001af440e38 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 388
27 FrontBoardServices 0x00000001bccf83bc -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 432
28 FrontBoardServices 0x00000001bcd23d04 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.200 + 128
29 FrontBoardServices 0x00000001bcd074a0 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240
30 FrontBoardServices 0x00000001bcd239c8 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 372
31 libdispatch.dylib 0x00000001acb81db0 _dispatch_client_callout + 20
32 libdispatch.dylib 0x00000001acb85738 _dispatch_block_invoke_direct + 268
33 FrontBoardServices 0x00000001bcd4c250 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48
34 FrontBoardServices 0x00000001bcd4bee0 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 448
35 FrontBoardServices 0x00000001bcd4c434 -[FBSSerialQueue _performNextFromRunLoopSource] + 32
36 CoreFoundation 0x00000001acf0976c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
37 CoreFoundation 0x00000001acf09668 __CFRunLoopDoSource0 + 208
38 CoreFoundation 0x00000001acf08960 __CFRunLoopDoSources0 + 268
39 CoreFoundation 0x00000001acf02a8c __CFRunLoopRun + 824
40 CoreFoundation 0x00000001acf0221c CFRunLoopRunSpecific + 600
41 GraphicsServices 0x00000001c4ace784 GSEventRunModal + 164
42 UIKitCore 0x00000001af942ee8 -[UIApplication _run] + 1072
43 UIKitCore 0x00000001af94875c UIApplicationMain + 168
44 myapp 0x0000000100075db4 main (in myapp) (main.m:7) + 23988
45 libdyld.dylib 0x00000001acbc26b0 start + 4
I had the same issue after adding React Native Firebase to my project and found the answer in this issue: https://github.com/crazycodeboy/react-native-splash-screen/issues/397
The real cause is in the react-native-splash-screen. Firebase requires to change "Background modes" in your App's Capabilities, this causes react-native-splash-screen to go into loop in RNSplashScreen.m:
while (waiting) {
NSDate* later = [NSDate dateWithTimeIntervalSinceNow:0.1];
[[NSRunLoop mainRunLoop] runUntilDate:later];
}
You can find it in this part of the backtrace:
5 Foundation 0x00000001ae1b1df0 -[NSRunLoop+ 36336 (NSRunLoop) runMode:beforeDate:] + 232
6 Foundation 0x00000001ae1b1cbc -[NSRunLoop+ 36028 (NSRunLoop) runUntilDate:] + 92
7 myapp 0x00000001005d15f0 +[RNSplashScreen show] (in myapp) (RNSplashScreen.m:31) + 5641712
To solve the problem you need to modify your AppDelegate.m, replace
[RNSplashScreen show]
with
[RNSplashScreen showSplash:#"LaunchScreen" inRootView:rootView];
But be careful, if your project uses LaunchScreen.storyboard instead of LaunchScreen.xib, you can catch this error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </private/var/containers/Bundle/Application/D22A78C5-5733-4511-85BF-217A3BAEB6AB/myapp.app> (loaded)' with name 'LaunchScreen''
In this case you need to create the new View named "LaunchScreen" and copy-paste here your launch view from the LaunchScreen.storyboard.
Deployed a react native app on iphone but whenever I try to open the app it shows the name of the app and after few seconds app closes by itself.
While when I run the same app on my ios emulator it works like charm.
What could be the problem?
Thanks in advance
log :
Date/Time: 2018-09-27 17:01:44.8982 +0530
Launch Time: 2018-09-27 17:01:24.8192 +0530
OS Version: iPhone OS 12.0 (16A366)
Baseband Version: 5.10.00
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, scene-create watchdog transgression: com.ccmtTweets.Tweets1234 exhausted real (wall clock) time allowance of 19.95 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 2.520 (user 2.520, system 0.000), 6% CPU", | "Elapsed application CPU time (seconds): 0.085, 0% CPU" | )
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000224515f0c semaphore_wait_trap + 8
1 libdispatch.dylib 0x0000000224364fc4 _dispatch_sema4_wait$VARIANT$mp + 24
2 libdispatch.dylib 0x0000000224365a48 _dispatch_semaphore_wait_slow + 136
3 CFNetwork 0x0000000224fdace8 CFURLConnectionSendSynchronousRequest + 292
4 CFNetwork 0x0000000224f3788c +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 116
5 ccmtTweetApp 0x0000000104dbec44 -[RCTBundleURLProvider isPackagerRunning:] + 1223748 (RCTBundleURLProvider.m:74)
6 ccmtTweetApp 0x0000000104dbeef4 -[RCTBundleURLProvider guessPackagerHost] + 1224436 (RCTBundleURLProvider.m:90)
7 ccmtTweetApp 0x0000000104dbf104 -[RCTBundleURLProvider packagerServerHost] + 1224964 (RCTBundleURLProvider.m:104)
8 ccmtTweetApp 0x0000000104dbf1f8 -[RCTBundleURLProvider jsBundleURLForBundleRoot:fallbackResource:fallbackExtension:] + 1225208 (RCTBundleURLProvider.m:114)
9 ccmtTweetApp 0x0000000104dbf398 -[RCTBundleURLProvider jsBundleURLForBundleRoot:fallbackResource:] + 1225624 (RCTBundleURLProvider.m:127)
10 ccmtTweetApp 0x0000000104c9a0ac -[AppDelegate application:didFinishLaunchingWithOptions:] + 24748 (AppDelegate.m:19)
11 UIKitCore 0x00000002512065f8 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 412
12 UIKitCore 0x0000000251207d60 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3340
13 UIKitCore 0x000000025120d7ac -[UIApplication _runWithMainScene:transitionContext:completion:] + 1552
14 UIKitCore 0x0000000251a34db8 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 784
15 UIKitCore 0x0000000251a31364 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 160
16 UIKitCore 0x0000000251a34a34 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 240
17 UIKitCore 0x0000000251a353d4 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1076
18 UIKitCore 0x00000002519f45fc __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 772
19 UIKitCore 0x00000002519f42a8 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 432
20 UIKitCore 0x0000000251a37844 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220
21 UIKitCore 0x0000000251a38334 _performActionsWithDelayForTransitionContext + 112
22 UIKitCore 0x0000000251a376fc -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 248
23 UIKitCore 0x0000000251a30a10 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 368
24 UIKitCore 0x000000025120bca4 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540
25 UIKitCore 0x000000025123d45c -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 364
26 FrontBoardServices 0x00000002273bb890 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 444
27 FrontBoardServices 0x00000002273c6658 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 260
28 FrontBoardServices 0x00000002273c5d50 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 64
29 libdispatch.dylib 0x00000002243c4484 _dispatch_client_callout + 16
30 libdispatch.dylib 0x0000000224367e58 _dispatch_block_invoke_direct$VARIANT$mp + 224
31 FrontBoardServices 0x00000002273fa640 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40
32 FrontBoardServices 0x00000002273fa2cc -[FBSSerialQueue _performNext] + 416
33 FrontBoardServices 0x00000002273fa8e8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
34 CoreFoundation 0x000000022491a5b8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
35 CoreFoundation 0x000000022491a538 __CFRunLoopDoSource0 + 88
36 CoreFoundation 0x0000000224919e1c __CFRunLoopDoSources0 + 176
37 CoreFoundation 0x0000000224914ce8 __CFRunLoopRun + 1040
38 CoreFoundation 0x00000002249145b8 CFRunLoopRunSpecific + 436
39 GraphicsServices 0x0000000226b88584 GSEventRunModal + 100
40 UIKitCore 0x000000025120f558 UIApplicationMain + 212
41 ccmtTweetApp 0x0000000104c9a4ec main + 25836 (main.m:14)
42 libdyld.dylib 0x00000002243d4b94 start + 4
EDIT:
Xcode 10 beta 6 fix the problem
I'm updating my app for ios 12 with the new xcode 10, but the Fabric framework makes the app crash at start.
I only run the code and the app crash on the launch screen.
In my AppDelegate:
#import <Fabric/Fabric.h>
#import <Answers/Answers.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Fabric with:#[[Answers class]]];
return YES;
}
And this is the log that appear:
+[NSRecursiveLock dictionary]: unrecognized selector sent to class 0x233a30580
(lldb)
I also added this writing as mentioned in the guide:
And this is in the AppDelegate.m
And this is the crash log
Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0
Crashed: 0 libsystem_kernel.dylib 0x00000001fa545104
pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001fa5c4a00 pthread_kill$VARIANT$armv81 + 296 2
libsystem_c.dylib 0x00000001fa49cd78 abort + 140 3
libc++abi.dylib 0x00000001f9b64f78 __cxa_bad_cast + 0 4
libc++abi.dylib 0x00000001f9b65120
default_unexpected_handler+ 8480 () + 0 5 libobjc.A.dylib
0x00000001f9b7de48 _objc_terminate+ 28232 () + 124 6
libc++abi.dylib 0x00000001f9b710fc
std::__terminate(void (*)+ 57596 ()) + 16 7 libc++abi.dylib
0x00000001f9b71188 std::terminate+ 57736 () + 84 8
libdispatch.dylib 0x00000001fa3e8498
_dispatch_client_callout + 36 9 libdispatch.dylib 0x00000001fa3b8260 _dispatch_once_callout + 28 10 Reflex
0x0000000100b5280c +[Fabric sharedSDK] + 112 11 Reflex
0x0000000100b52984 __15+[Fabric with:]_block_invoke + 76 12
libdispatch.dylib 0x00000001fa3e8484
_dispatch_client_callout + 16 13 libdispatch.dylib 0x00000001fa3b8260 _dispatch_once_callout + 28 14 Reflex
0x0000000100b52934 +[Fabric with:] + 224 15 Reflex
0x00000001009f3600 -[AppDelegate
application:didFinishLaunchingWithOptions:] + 1439232
(AppDelegate.m:64) 16 UIKitCore
0x0000000226f51564 -[UIApplication
_handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 412 17 UIKitCore 0x0000000226f52ccc -[UIApplication
_callInitializationDelegatesForMainScene:transitionContext:] + 3340 18 UIKitCore 0x0000000226f58718 -[UIApplication
_runWithMainScene:transitionContext:completion:] + 1552 19 UIKitCore 0x000000022777f6dc __111-[__UICanvasLifecycleMonitor_Compatability
_scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke
+ 784 20 UIKitCore 0x000000022777bc88 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 160 21 UIKitCore 0x000000022777f358
-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 240 22 UIKitCore 0x000000022777fcf8
-[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1076 23 UIKitCore
0x000000022773ef20 __82-[_UIApplicationCanvas
_transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
+ 772 24 UIKitCore 0x000000022773ebcc -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 432 25 UIKitCore 0x0000000227782168
__125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
+ 220 26 UIKitCore 0x0000000227782c58 _performActionsWithDelayForTransitionContext + 112 27 UIKitCore 0x0000000227782020 -[_UICanvasLifecycleSettingsDiffAction
performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
+ 248 28 UIKitCore 0x000000022777b334 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 368 29 UIKitCore 0x0000000226f56c10
-[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540 30
UIKitCore 0x0000000226f883c8
-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 364 31 FrontBoardServices
0x00000001fd3db890 -[FBSSceneImpl
_didCreateWithTransitionContext:completion:] + 444 32 FrontBoardServices 0x00000001fd3e6658 __56-[FBSWorkspace
client:handleCreateScene:withCompletion:]_block_invoke_2 + 260 33
FrontBoardServices 0x00000001fd3e5d50 __40-[FBSWorkspace
_performDelegateCallOut:]_block_invoke + 64 34 libdispatch.dylib 0x00000001fa3e8484 _dispatch_client_callout + 16 35
libdispatch.dylib 0x00000001fa3bf3f0
_dispatch_block_invoke_direct$VARIANT$armv81 + 216 36 FrontBoardServices 0x00000001fd41a640
__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 40 37 FrontBoardServices 0x00000001fd41a2cc -[FBSSerialQueue
_performNext] + 416 38 FrontBoardServices 0x00000001fd41a8e8 -[FBSSerialQueue _performNextFromRunLoopSource] +
56 39 CoreFoundation 0x00000001fa93e5b8
CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24 40 CoreFoundation 0x00000001fa93e538 __CFRunLoopDoSource0
+ 88 41 CoreFoundation 0x00000001fa93de1c __CFRunLoopDoSources0 + 176 42 CoreFoundation 0x00000001fa938ce8 __CFRunLoopRun + 1040 43 CoreFoundation
0x00000001fa9385b8 CFRunLoopRunSpecific + 436 44 GraphicsServices
0x00000001fcba8584 GSEventRunModal + 100 45 UIKitCore
0x0000000226f5a4c4 UIApplicationMain + 212 46 Reflex
0x0000000100a663d0 main + 1909712 (main.m:14) 47 libdyld.dylib
0x00000001fa3f8c0c start + 4
Can anyone help me?
Thanks in advance
There is a bug with Fabric and Xcode 10 beta 5 that prevents build on real device but you can build on simulator, Upgrade to Xcode 10 beta 6 and this bug should be fixed
I've got crash logs for my app from App Store. I'm not able to reproduce the crash and having a hard time deciphering it.
Following is the log -
Incident Identifier: AEF0FFDD-77E4-460F-97E4-B97A32EAE36D
CrashReporter Key: 78177aeeda1175c67f4467d02c023a2a165d1a01
Hardware Model: iPhone7,1
Process: Visits [4558]
Path: /private/var/containers/Bundle/Application/81AC75BC-433C-43E7-887D-8FC6BF5B5703/Visits.app/Visits
Identifier: com.x.y
Version: 1.1.1 (1.1.1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.x.y [1143]
Date/Time: 2018-07-20 22:30:36.6608 +0530
Launch Time: 2018-07-20 22:30:35.9017 +0530
OS Version: iPhone OS 11.4.1 (15G77)
Baseband Version: 6.80.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 0x184136d8c __exceptionPreprocess + 228 (NSException.m:166)
1 libobjc.A.dylib 0x1832f05ec objc_exception_throw + 56 (objc-exception.mm:521)
2 CoreFoundation 0x1840cfd80 -[__NSSingleObjectArrayI objectAtIndex:] + 128 (NSSingleObjectArray.m:16)
3 UIKit 0x18e6b0aa8 -[UITableViewDataSource tableView:cellForRowAtIndexPath:] + 172 (UITableViewDataSource.m:170)
4 UIKit 0x18e3c90f4 -[UITableViewController tableView:cellForRowAtIndexPath:] + 68 (UITableViewController.m:441)
5 UIKit 0x18de130cc -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 668 (UITableView.m:13463)
6 UIKit 0x18de12d84 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 80 (UITableView.m:13514)
7 UIKit 0x18de11aa0 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2280 (UITableView.m:2599)
8 UIKit 0x18de0d5ec -[UITableView layoutSubviews] + 140 (UITableView.m:8565)
9 UIKit 0x18dd4a6f4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1420 (UIView.m:15239)
10 QuartzCore 0x1882bfe54 -[CALayer layoutSublayers] + 184 (CALayer.mm:9357)
11 QuartzCore 0x1882c3fe4 CA::Layer::layout_if_needed(CA::Transaction*) + 324 (CALayer.mm:9237)
12 UIKit 0x18dd62bf4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 548 (UIView.m:10438)
13 Visits 0x1007a8300 MainViewController.initialSetupForScreen() + 804 (MainViewController.swift:217)
14 Visits 0x1007a7ea4 MainViewController.viewDidLoad() + 924 (MainViewController.swift:175)
15 Visits 0x1007a8838 #objc MainViewController.viewDidLoad() + 28
16 UIKit 0x18dd51e64 -[UIViewController loadViewIfRequired] + 1020 (UIViewController.m:3192)
17 UIKit 0x18dd51a50 -[UIViewController view] + 28 (UIViewController.m:3214)
18 UIKit 0x18dd42ce4 -[UIWindow addRootViewControllerViewIfPossible] + 136 (UIWindow.m:1358)
19 UIKit 0x18dd41b18 -[UIWindow _setHidden:forced:] + 272 (UIWindow.m:1455)
20 UIKit 0x18ddcf62c -[UIWindow makeKeyAndVisible] + 48 (UIWindow.m:4883)
21 UIKit 0x18dd45274 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3660 (UIApplication.m:2210)
22 UIKit 0x18dd125e0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1680 (UIApplication.m:3491)
23 UIKit 0x18e342b1c __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 784 (_UICanvasLifecycleMonitor.m:175)
24 UIKit 0x18dd11dd0 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 160 (_UICanvas.m:591)
25 UIKit 0x18dd11c6c -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 240 (_UICanvasLifecycleMonitor.m:153)
26 UIKit 0x18dd10afc -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 724 (_UICanvasLifecycleMonitor.m:229)
27 UIKit 0x18e9a684c __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 296 (_UIApplicationCanvas.m:0)
28 UIKit 0x18dd101ec -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 432 (_UIApplicationCanvas.m:156)
29 UIKit 0x18e78bac8 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220 (_UICanvasLifecycleSettingsDiffAction.m:211)
30 UIKit 0x18e8d9bf8 _performActionsWithDelayForTransitionContext + 112 (_UICanvasSettingsDiffAction.m:34)
31 UIKit 0x18dd0fc0c -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 248 (_UICanvasLifecycleSettingsDiffAction.m:182)
32 UIKit 0x18dd0f5a8 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 368 (_UICanvas.m:517)
33 UIKit 0x18dd0c5e0 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540 (UIApplication.m:3109)
34 UIKit 0x18dd0c330 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 364 (UIApplicationSceneClientAgent.m:41)
35 FrontBoardServices 0x186938470 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 364 (FBSSceneImpl.m:460)
36 FrontBoardServices 0x186940d6c __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 224 (FBSWorkspace.m:606)
37 libdispatch.dylib 0x183a28a60 _dispatch_client_callout + 16 (object.m:507)
38 libdispatch.dylib 0x183a30170 _dispatch_block_invoke_direct$VARIANT$mp + 224 (queue.c:3018)
39 FrontBoardServices 0x18696c878 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36 (FBSSerialQueue.m:164)
40 FrontBoardServices 0x18696c51c -[FBSSerialQueue _performNext] + 404 (FBSSerialQueue.m:196)
41 FrontBoardServices 0x18696cab8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56 (FBSSerialQueue.m:232)
42 CoreFoundation 0x1840df404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1982)
43 CoreFoundation 0x1840dec2c __CFRunLoopDoSources0 + 276 (CFRunLoop.c:2017)
44 CoreFoundation 0x1840dc79c __CFRunLoopRun + 1204 (CFRunLoop.c:2920)
45 CoreFoundation 0x183ffcda8 CFRunLoopRunSpecific + 552 (CFRunLoop.c:3245)
46 GraphicsServices 0x185fe2020 GSEventRunModal + 100 (GSEvent.c:2245)
47 UIKit 0x18e01c758 UIApplicationMain + 236 (UIApplication.m:3965)
48 Visits 0x1007a589c main + 56 (Location+CoreDataClass.swift:15)
49 libdyld.dylib 0x183a8dfc0 start + 4
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000183bbd2e0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000183d5e288 pthread_kill$VARIANT$mp + 376 (pthread.c:1484)
2 libsystem_c.dylib 0x0000000183b2bd0c abort + 140 (abort.c:91)
3 libc++abi.dylib 0x00000001832c72c8 abort_message + 132 (abort_message.cpp:75)
4 libc++abi.dylib 0x00000001832c7470 default_terminate_handler() + 304 (cxa_default_handlers.cpp:68)
5 libobjc.A.dylib 0x00000001832f08d4 _objc_terminate() + 124 (objc-exception.mm:657)
6 libc++abi.dylib 0x00000001832e137c std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:66)
7 libc++abi.dylib 0x00000001832e1400 std::terminate() + 84 (cxa_handlers.cpp:97)
8 libdispatch.dylib 0x0000000183a28a74 _dispatch_client_callout + 36 (object.m:510)
9 libdispatch.dylib 0x0000000183a30170 _dispatch_block_invoke_direct$VARIANT$mp + 224 (queue.c:3018)
10 FrontBoardServices 0x000000018696c878 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36 (FBSSerialQueue.m:164)
11 FrontBoardServices 0x000000018696c51c -[FBSSerialQueue _performNext] + 404 (FBSSerialQueue.m:196)
12 FrontBoardServices 0x000000018696cab8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56 (FBSSerialQueue.m:232)
13 CoreFoundation 0x00000001840df404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1982)
14 CoreFoundation 0x00000001840dec2c __CFRunLoopDoSources0 + 276 (CFRunLoop.c:2017)
15 CoreFoundation 0x00000001840dc79c __CFRunLoopRun + 1204 (CFRunLoop.c:2920)
16 CoreFoundation 0x0000000183ffcda8 CFRunLoopRunSpecific + 552 (CFRunLoop.c:3245)
17 GraphicsServices 0x0000000185fe2020 GSEventRunModal + 100 (GSEvent.c:2245)
18 UIKit 0x000000018e01c758 UIApplicationMain + 236 (UIApplication.m:3965)
19 Visits 0x00000001007a589c main + 56 (Location+CoreDataClass.swift:15)
20 libdyld.dylib 0x0000000183a8dfc0 start + 4
Following is the code snippet where the program crashes. The crash happens at the self.view.layoutIfNeeded().
func initialSetupForScreen(){
let screenHeight = UIScreen.main.bounds.height
let statusBarHeight = UIApplication.shared.statusBarFrame.height
fullyOpenSheetTop = -(screenHeight - (statusBarHeight * 2))
partiallyOpenSheetTop = -((screenHeight * 0.50) - titleBarHeight)
closedSheetTop = -titleBarHeight
notVisibleSheetTop = 40 //(+40 for iphone X)
fullyOrPartiallyThreshold = (fullyOpenSheetTop + partiallyOpenSheetTop)/2
partiallyOrClosedThreshold = (partiallyOpenSheetTop + closedSheetTop)/2
// set primary & secondary sheet height //(+40 for iphone X) (-40 fixed for iphone X)
primarySheetViewHeightConstraint.constant = -fullyOpenSheetTop
secondarySheetViewHeightConstraint.constant = -fullyOpenSheetTop
// primary sheet is set to fully open state
primarySheetViewTopConstraint.constant = fullyOpenSheetTop
primarySheetCurrentState = .fullyOpen
// secondary sheet is set to not visible state
secondarySheetViewTopConstraint.constant = notVisibleSheetTop
secondarySheetCurrentState = .notVisible
// settings View move it out of screen
settingsViewTopConstraint.constant = notVisibleSheetTop
primarySheetController.configurePrimarySheetContentView()
self.view.layoutIfNeeded()
}
Earlier, I was calling this function inside my viewDidLoad. I thought it was too early to call layoutIfNeeded inside viewDidLoad. So I moved the function to viewWillAppear. However, the crashes still seem to be happening . What am I missing/overseeing?
The crash is happening across very few devices and I'm not able to reproduce it.