App crashing only when submitting it for review (NSInvalidUnarchiveOperationException)

Hello,


has anyone seen a problem similar to this one? Any hint?


The application is built with Catalyst and reviewers say it crashes on start, while it works flawlessly on my Mac. The stacktrace I got from the reviewers seems to point to something wrong with the NIBs compiled from the storyboard?



Application Specific Information:

*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UITextLayoutView because no class named _UITextLayoutView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'

abort() called

terminating with uncaught exception of type NSException


Application Specific Backtrace 1:

0 CoreFoundation 0x000000010b99bf43 __exceptionPreprocess + 250

1 libobjc.A.dylib 0x000000010a0a3835 objc_exception_throw + 48

2 CoreFoundation 0x000000010b99bd99 +[NSException raise:format:] + 189

3 UIFoundation 0x000000011805bc64 UINibDecoderDecodeObjectForValue + 360

4 UIFoundation 0x000000011805bfe4 UINibDecoderDecodeObjectForValue + 1256

5 UIFoundation 0x000000011805baef -[UINibDecoder decodeObjectForKey:] + 251

6 UIKitCore 0x0000000113e120aa -[UIView initWithCoder:] + 1030

7 UIKitCore 0x0000000113e2bf52 -[UIScrollView initWithCoder:] + 65

8 UIKitCore 0x0000000114b4c160 -[UITextView initWithCoder:] + 65

9 UIFoundation 0x000000011805bde7 UINibDecoderDecodeObjectForValue + 747

10 UIFoundation 0x000000011805bfe4 UINibDecoderDecodeObjectForValue + 1256

11 UIFoundation 0x000000011805baef -[UINibDecoder decodeObjectForKey:] + 251

12 UIKitCore 0x0000000113e120aa -[UIView initWithCoder:] + 1030

13 UIFoundation 0x000000011805bde7 UINibDecoderDecodeObjectForValue + 747

14 UIFoundation 0x000000011805bfe4 UINibDecoderDecodeObjectForValue + 1256

15 UIFoundation 0x000000011805baef -[UINibDecoder decodeObjectForKey:] + 251

16 UIKitCore 0x0000000113e120aa -[UIView initWithCoder:] + 1030

17 UIKitCore 0x0000000113e0f212 -[UIClassSwapper initWithCoder:] + 2511

18 UIFoundation 0x000000011805bde7 UINibDecoderDecodeObjectForValue + 747

19 UIFoundation 0x000000011805bfe4 UINibDecoderDecodeObjectForValue + 1256

20 UIFoundation 0x000000011805baef -[UINibDecoder decodeObjectForKey:] + 251

21 UIKitCore 0x0000000113e120aa -[UIView initWithCoder:] + 1030

22 UIFoundation 0x000000011805bde7 UINibDecoderDecodeObjectForValue + 747

23 UIFoundation 0x000000011805bfe4 UINibDecoderDecodeObjectForValue + 1256

24 UIFoundation 0x000000011805baef -[UINibDecoder decodeObjectForKey:] + 251

25 UIKitCore 0x0000000113e120aa -[UIView initWithCoder:] + 1030

26 UIFoundation 0x000000011805bde7 UINibDecoderDecodeObjectForValue + 747

27 UIFoundation 0x000000011805baef -[UINibDecoder decodeObjectForKey:] + 251

28 UIKitCore 0x0000000114c059b7 -[UILayoutGuide initWithCoder:] + 120

29 UIFoundation 0x000000011805bde7 UINibDecoderDecodeObjectForValue + 747

30 UIFoundation 0x000000011805baef -[UINibDecoder decodeObjectForKey:] + 251

31 Foundation 0x0000000106880e81 -[NSLayoutConstraint initWithCoder:] + 145

32 UIFoundation 0x000000011805bde7 UINibDecoderDecodeObjectForValue + 747

33 UIFoundation 0x000000011805baef -[UINibDecoder decodeObjectForKey:] + 251

34 UIKitCore 0x0000000113e0e626 -[UIRuntimeConnection initWithCoder:] + 160

35 UIFoundation 0x000000011805bde7 UINibDecoderDecodeObjectForValue + 747

36 UIFoundation 0x000000011805bfe4 UINibDecoderDecodeObjectForValue + 1256

37 UIFoundation 0x000000011805baef -[UINibDecoder decodeObjectForKey:] + 251

38 UIKitCore 0x00000001145eba2c -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 450

39 UIKitCore 0x0000000113e0cc63 -[UINib instantiateWithOwner:options:] + 1146

40 UIKitCore 0x0000000113e2b8fe -[UIViewController _loadViewFromNibNamed:bundle:] + 395

41 UIKitCore 0x0000000113e2b64a -[UIViewController loadView] + 177

42 UIKitCore 0x0000000113e2a1b5 -[UIViewController loadViewIfRequired] + 172

43 UIKitCore 0x0000000113e3e99a -[UIViewController view] + 27

44 UIKitCore 0x0000000113e93fa3 -[UIWindow addRootViewControllerViewIfPossible] + 156

45 UIKitCore 0x0000000114918ebb -[UIWindow _updateLayerOrderingAndSetLayerHidden:actionBlock:] + 210

46 UIKitCore 0x0000000113e93116 -[UIWindow _setHidden:forced:] + 361

47 UIKit 0x0000000132277ade -[UIWindowAccessibility _orderFrontWithoutMakingKey] + 86

48 UIKitCore 0x0000000114922c97 -[UIWindow _mainQueue_makeKeyAndVisible] + 42

49 UIKitCore 0x0000000114a9b6d2 -[UIWindowScene _makeKeyAndVisibleIfNeeded] + 202

50 UIKitCore 0x000000011404f7d7 +[UIScene _sceneForFBSScene:create:withSession:connectionOptions:] + 1435

51 UIKitCore 0x00000001148f263d -[UIApplication _connectUISceneFromFBSScene:transitionContext:] + 1043

52 UIKitCore 0x0000000113df8810 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 327

53 UIKitCore 0x0000000113df8642 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361

54 FrontBoardServices 0x00000001266e2085 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 453

55 FrontBoardServices 0x00000001266ffbfa __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.156 + 102

56 FrontBoardServices 0x00000001266eacbd -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220

57 FrontBoardServices 0x00000001266ff88d __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 354

58 libdispatch.dylib 0x000000010c0d350e _dispatch_client_callout + 8

59 libdispatch.dylib 0x000000010c0d5c21 _dispatch_block_invoke_direct + 245

60 FrontBoardServices 0x00000001266d21c5 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30

61 FrontBoardServices 0x00000001267187e9 -[FBSSerialQueue _queue_performNextIfPossible] + 441

62 FrontBoardServices 0x00000001266d215f -[FBSSerialQueue _performNextFromRunLoopSource] + 22

63 CoreFoundation 0x000000010b907b71 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

64 CoreFoundation 0x000000010b907b10 __CFRunLoopDoSource0 + 103

65 CoreFoundation 0x000000010b8eb104 __CFRunLoopDoSources0 + 209

66 CoreFoundation 0x000000010b8ea710 __CFRunLoopRun + 1272

67 CoreFoundation 0x000000010b8e9f93 CFRunLoopRunSpecific + 499

68 HIToolbox 0x0000000116922a0d RunCurrentEventLoopInMode + 292

69 HIToolbox 0x0000000116922659 ReceiveNextEventCommon + 356

70 HIToolbox 0x00000001169224d7 _BlockUntilNextEventMatchingListInModeWithFilter + 64

71 AppKit 0x000000010a0fdd24 _DPSNextEvent + 990

72 AppKit 0x000000010a0fca94 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352

73 AppKit 0x000000010a0f7234 -[NSApplication run] + 658

74 AppKit 0x000000010a0e90dd NSApplicationMain + 777

75 AppKit 0x000000010a5688a4 _NSApplicationMainWithInfoDictionary + 16

76 UIKitMacHelper 0x000000011613d2b1 UINSApplicationMain + 322

77 UIKitCore 0x0000000113de2004 UIApplicationMain + 2206

7

Accepted Reply

This is an issue we are aware of. Please see this other thread for more discussion, including things you can do to avoid this.

Replies

I'm running Mojave 10.14.6 and was experiencing the crash. I have converted two UITextViews in two apps from Storyboard to programatically generated and am not seeing any crashes.

That should not be the case on Xcode 11.1. If you delete the app from the device, do a clean build of your app, and run it, do you still see this crash? If so, please post the full Apple crash report.

I did file a feedback report (FB7420659) with all the details.


I think there's a slight misunderstanding anyway: as I wrote in the first post, I'm talking about a Mac Catalyst app, not an iOS one. On my Mac with 10.15.1 (build 19B88) it works, on the reviewers system (with 10.15.1, but different build number: 19B68d) it crashes.


I submitted the app for review Oct 30th (SDK build 19A547, platform build 11A1027). Xcode 11.2 has been released the day after.

XCode 11.2.1 did not fix my particular variation of this problem.


In XCode 11.2.1, I was able to avoid this crash by deleting each text field in interface builder then "undoing" it with control-Z. I deleted them, compiled and ran the app, then the undo's of the deletes. Next run with the deleted and undone text fields did not crash.

My catalyst app gets rejected twice now because it crashed on reviewer's test. It ran perfectly in mine. At first I submitted with XCode 11.2 and yesterday tried again with 11.1, as I saw that 11.2.1 still have it under Known Issue. So this cannot be reproduced and I can only "test" with submitting for review, hopefully I won't get banned or something for this for keep submitting crashing apps?



Process: Claritist Basic [2453]

Path: /Applications/Claritist Basic.app/Contents/MacOS/Claritist Basic

Identifier: maccatalyst.com.kiwlm.ClaritistFree

Version: 6.0 (31)

App Item ID: 0

App External ID: 0

Code Type: X86-64 (Native)

Parent Process: ??? [1]

Responsible: Claritist Basic [2453]

User ID: 502



Date/Time: 2019-11-08 15:37:32.733 -0800

OS Version: Mac OS X 10.15 (19A583)

Report Version: 12

Anonymous UUID: C965A11A-DB57-8640-EE9B-BD679BB03748



Sleep/Wake UUID: 8C850B53-2060-4658-9C35-0B7AFD480E1F



Time Awake Since Boot: 91000 seconds

Time Since Wake: 1800 seconds



System Integrity Protection: enabled



Crashed Thread: 0 Dispatch queue: com.apple.main-thread



Exception Type: EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000

Exception Note: EXC_CORPSE_NOTIFY



Application Specific Information:

*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UITextLayoutView because no class named _UITextLayoutView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'

terminating with uncaught exception of type NSException

abort() called



Application Specific Backtrace 1:

0 CoreFoundation 0x00007fff3c31dd63 __exceptionPreprocess + 250

1 libobjc.A.dylib 0x00007fff72073bd4 objc_exception_throw + 48

2 CoreFoundation 0x00007fff3c31dbb9 +[NSException raise:format:] + 189

3 UIFoundation 0x00007fff6cc78c74 UINibDecoderDecodeObjectForValue + 360

4 UIFoundation 0x00007fff6cc78ff4 UINibDecoderDecodeObjectForValue + 1256

5 UIFoundation 0x00007fff6cc78aff -[UINibDecoder decodeObjectForKey:] + 251

6 UIKitCore 0x00007fff7967a249 -[UIView initWithCoder:] + 1030

7 UIKitCore 0x00007fff7969417f -[UIScrollView initWithCoder:] + 65

8 UIKitCore 0x00007fff7a3952ec -[UITextView initWithCoder:] + 65

9 UIFoundation 0x00007fff6cc78df7 UINibDecoderDecodeObjectForValue + 747

10 UIFoundation 0x00007fff6cc78ff4 UINibDecoderDecodeObjectForValue + 1256

11 UIFoundation 0x00007fff6cc78aff -[UINibDecoder decodeObjectForKey:] + 251

12 UIKitCore 0x00007fff7967a249 -[UIView initWithCoder:] + 1030

13 Claritist Basic 0x000000010b816e69 Claritist Basic + 192105

14 UIKitCore 0x00007fff796773b2 -[UIClassSwapper initWithCoder:] + 2511

15 UIFoundation 0x00007fff6cc78df7 UINibDecoderDecodeObjectForValue + 747

16 UIFoundation 0x00007fff6cc78aff -[UINibDecoder decodeObjectForKey:] + 251

17 UIKitCore 0x00007fff796767c6 -[UIRuntimeConnection initWithCoder:] + 160

18 UIKitCore 0x00007fff79e415a3 -[UIRuntimeEventConnection initWithCoder:] + 59

19 UIFoundation 0x00007fff6cc78df7 UINibDecoderDecodeObjectForValue + 747