App crashes after upgrading to Xcode 11

Date/Time: 2019-09-26 14:56:57.9689 +1200

Launch Time: 2019-09-26 14:56:57.5844 +1200

OS Version: iPhone OS 12.4.1 (16G102)

Baseband Version: 5.70.01

Report Version: 104



Exception Type: EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000

Exception Note: EXC_CORPSE_NOTIFY

Triggered by Thread: 0



Application Specific Information:

abort() called



Last Exception Backtrace:

0 CoreFoundation 0x1a132a98c __exceptionPreprocess + 228

1 libobjc.A.dylib 0x1a05039f8 objc_exception_throw + 55

2 CoreFoundation 0x1a1234bc0 +[NSException raise:format:] + 115

3 UIFoundation 0x1ab9c9de8 UINibDecoderDecodeObjectForValue + 423

4 UIFoundation 0x1ab969304 -[UINibDecoder decodeObjectForKey:] + 315

5 UIKitCore 0x1cda78508 -[UIRuntimeConnection initWithCoder:] + 187

6 UIFoundation 0x1ab9c9f28 UINibDecoderDecodeObjectForValue + 743

7 UIFoundation 0x1ab9ca16c UINibDecoderDecodeObjectForValue + 1323

8 UIFoundation 0x1ab969304 -[UINibDecoder decodeObjectForKey:] + 315

9 UIKitCore 0x1cda75df0 -[UINib instantiateWithOwner:options:] + 1119

10 UIKitCore 0x1cd81126c -[UIViewController _loadViewFromNibNamed:bundle:] + 371

11 UIKitCore 0x1cd811c14 -[UIViewController loadView] + 175

12 UIKitCore 0x1cd811ed8 -[UIViewController loadViewIfRequired] + 167

13 UIKitCore 0x1cd812628 -[UIViewController view] + 27

14 UIKitCore 0x1cddf0e64 -[UIWindow addRootViewControllerViewIfPossible] + 135

15 UIKitCore 0x1cddf140c -[UIWindow _setHidden:forced:] + 271

16 UIKitCore 0x1cde01ce8 -[UIWindow makeKeyAndVisible] + 47

17 UIKitCore 0x1cddb4908 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3531

18 UIKitCore 0x1cddb9fe0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1539

19 UIKitCore 0x1cd67d2a4 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 775

20 UIKitCore 0x1cd68583c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 159

21 UIKitCore 0x1cd67cf28 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 235

22 UIKitCore 0x1cd67d818 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1063

23 UIKitCore 0x1cd67bb64 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 743

24 UIKitCore 0x1cd67b82c -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 427

25 UIKitCore 0x1cd68036c __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 219

26 UIKitCore 0x1cd681150 _performActionsWithDelayForTransitionContext + 111

27 UIKitCore 0x1cd680224 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 243

28 UIKitCore 0x1cd684f24 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 359

29 UIKitCore 0x1cddb85e8 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 539

30 UIKitCore 0x1cd9b4e04 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 359

31 FrontBoardServices 0x1a3ca69fc -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 439

32 FrontBoardServices 0x1a3cb040c __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 255

33 FrontBoardServices 0x1a3cafc14 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 63

34 libdispatch.dylib 0x1a0d697d4 _dispatch_client_callout + 15

35 libdispatch.dylib 0x1a0d0e5dc _dispatch_block_invoke_direct$VARIANT$mp + 223

36 FrontBoardServices 0x1a3ce1040 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 39

37 FrontBoardServices 0x1a3ce0cdc -[FBSSerialQueue _performNext] + 407

38 FrontBoardServices 0x1a3ce1294 -[FBSSerialQueue _performNextFromRunLoopSource] + 51

39 CoreFoundation 0x1a12bc728 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 23

40 CoreFoundation 0x1a12bc6a8 __CFRunLoopDoSource0 + 87

41 CoreFoundation 0x1a12bbf90 __CFRunLoopDoSources0 + 175

42 CoreFoundation 0x1a12b6ecc __CFRunLoopRun + 1003

43 CoreFoundation 0x1a12b67c0 CFRunLoopRunSpecific + 435

44 GraphicsServices 0x1a34b779c GSEventRunModal + 103

45 UIKitCore 0x1cddbbc38 UIApplicationMain + 211

46 sphere-identity 0x1044fe8e8 0x1044f0000 + 59624

47 libdyld.dylib 0x1a0d7a8e0 start + 3

Accepted Reply

It's [weird] that the app can run well without any issues when debugging from Xcode but it crashes if I lunch the app by clicking the icon from my phone.

Agreed, but that doesn’t fundamentally change my advice. Earlier I wrote:

Such crashes are usually accompanied by a log message that gives you hints as to the actual problem.

If you run the app from the Home screen than these log messages end up in the system log, which you can monitor using the Console app on macOS.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Replies

This crash indicates that there was a problem instantiating the objects in your nib. Such crashes are usually accompanied by a log message that gives you hints as to the actual problem. I recommend that you go looking for that. If you run your app from Xcode, the message should show up in the Console area.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi Eskimo,


Thx for your reply. It's wired that the app can run well without any issues when debugging from Xcode but it crashes if I lunch the app by clicking the icon from my phone.

I have exactly the same problem.

Have you found a way to walkaround?

It's [weird] that the app can run well without any issues when debugging from Xcode but it crashes if I lunch the app by clicking the icon from my phone.

Agreed, but that doesn’t fundamentally change my advice. Earlier I wrote:

Such crashes are usually accompanied by a log message that gives you hints as to the actual problem.

If you run the app from the Home screen than these log messages end up in the system log, which you can monitor using the Console app on macOS.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

hi eskimo,


Thx for your suggestion. Yes, I found the reason using the console. Fixed.