pushViewController crashed but I don't know why

can anyone plz here to start with this crash log I can't find useful pieces of information?

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                	0x180c8904c __exceptionPreprocess + 220 (NSException.m:200)
1   libobjc.A.dylib               	0x1992fdf54 objc_exception_throw + 60 (objc-exception.mm:565)
2   UIKitCore                     	0x1833d3f50 -[UINavigationController pushViewController:transition:forceImmediate:] + 3088 (UINavigationController.m:8163)
3   UIKitCore                     	0x18337c248 -[UINavigationController pushViewController:animated:] + 784 (UINavigationController.m:8084)
4   UIKitCore                     	0x183305c28 -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 276 (UIViewControllerTransitioning.m:1148)
5   UIKitCore                     	0x18353b1f8 -[_UIViewControllerTransitionContext _runAlongsideCompletions] + 160 (UIViewControllerTransitioning.m:380)
6   UIKitCore                     	0x1832d7928 -[_UIViewControllerTransitionContext completeTransition:] + 140 (UIViewControllerTransitioning.m:292)
7   UIKitCore                     	0x183a554dc __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke.160 + 784 (_UINavigationParallaxTransition.m:512)
8   UIKitCore                     	0x18335b584 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 724 (UIView.m:14897)
9   UIKitCore                     	0x183226d4c -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 248 (UIView.m:0)
10  UIKitCore                     	0x18323b598 -[UIViewAnimationState animationDidStop:finished:] + 244 (UIView.m:2280)
11  UIKitCore                     	0x18323b700 -[UIViewAnimationState animationDidStop:finished:] + 604 (UIView.m:2299)
12  QuartzCore                    	0x184a0901c CA::Layer::run_animation_callbacks(void*) + 280 (CALayer.mm:7203)
13  libdispatch.dylib             	0x1808fb660 _dispatch_client_callout + 20 (object.m:560)
14  libdispatch.dylib             	0x180909b60 _dispatch_main_queue_callback_4CF + 944 (inline_internal.h:2601)
15  CoreFoundation                	0x180c41cd4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1795)
16  CoreFoundation                	0x180bfbeac __CFRunLoopRun + 2540 (CFRunLoop.c:3144)
17  CoreFoundation                	0x180c0f3b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
18  GraphicsServices              	0x19c59f38c GSEventRunModal + 164 (GSEvent.c:2200)
19  UIKitCore                     	0x1835af6a8 -[UIApplication _run] + 1100 (UIApplication.m:3493)
20  UIKitCore                     	0x18332e7f4 UIApplicationMain + 2092 (UIApplication.m:5046)
21  discussios                    	0x100a46200 main + 68 (AppDelegate.swift:37)
22  dyld                          	0x101401a24 start + 520 (dyldMain.cpp:876)

Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001b7c2e964 __pthread_kill + 8
1   libsystem_pthread.dylib       	0x00000001f1818378 pthread_kill + 268 (pthread.c:1610)
2   libsystem_c.dylib             	0x000000018bac6f50 abort + 164 (abort.c:118)
3   libc++abi.dylib               	0x0000000199405bc4 abort_message + 132 (abort_message.cpp:78)
4   libc++abi.dylib               	0x00000001993f6fd8 demangling_terminate_handler() + 332 (cxa_default_handlers.cpp:71)
5   libobjc.A.dylib               	0x0000000199304064 _objc_terminate() + 144 (objc-exception.mm:701)
6   KSCrash                       	0x0000000101afa684 CPPExceptionTerminate() + 132 (KSCrashMonitor_CPPException.cpp:191)
7   libc++abi.dylib               	0x0000000199404f58 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
8   libc++abi.dylib               	0x0000000199404ef4 std::terminate() + 64 (cxa_handlers.cpp:88)
9   libdispatch.dylib             	0x00000001808fb674 _dispatch_client_callout + 40 (object.m:563)
10  libdispatch.dylib             	0x0000000180909b60 _dispatch_main_queue_callback_4CF + 944 (inline_internal.h:2601)
11  CoreFoundation                	0x0000000180c41cd4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1795)
12  CoreFoundation                	0x0000000180bfbeac __CFRunLoopRun + 2540 (CFRunLoop.c:3144)
13  CoreFoundation                	0x0000000180c0f3b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
14  GraphicsServices              	0x000000019c59f38c GSEventRunModal + 164 (GSEvent.c:2200)
15  UIKitCore                     	0x00000001835af6a8 -[UIApplication _run] + 1100 (UIApplication.m:3493)
16  UIKitCore                     	0x000000018332e7f4 UIApplicationMain + 2092 (UIApplication.m:5046)
17  discussios                    	0x0000000100a46200 main + 68 (AppDelegate.swift:37)
18  dyld                          	0x0000000101401a24 start + 520 (dyldMain.cpp:876)

Thread 1 name:
Thread 1:
0   libsystem_kernel.dylib        	0x00000001b7c28504 mach_msg_trap + 8
1   libsystem_kernel.dylib        	0x00000001b7c28b9c mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                	0x0000000180bf7688 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                	0x0000000180bfb97c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4   CoreFoundation                	0x0000000180c0f3b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Foundation                    	0x000000018242a354 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236 (NSRunLoop.m:373)
6   Foundation                    	0x000000018246bc28 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:420)
7   UIKitCore                     	0x00000001835288a4 -[UIEventFetcher threadMain] + 524 (UIEventFetcher.m:1167)
8   Foundation                    	0x000000018247a36c __NSThread__start__ + 808 (NSThread.m:972)
9   libsystem_pthread.dylib       	0x00000001f18129a4 _pthread_start + 148 (pthread.c:891)
10  libsystem_pthread.dylib       	0x00000001f1811ea0 thread_start + 8

Thread 2 name:
Thread 2:
0   libsystem_kernel.dylib        	0x00000001b7c28504 mach_msg_trap + 8
1   libsystem_kernel.dylib        	0x00000001b7c28b9c mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                	0x0000000180bf7688 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                	0x0000000180bfb97c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4   CoreFoundation                	0x0000000180c0f3b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   AudioSession                  	0x0000000189fa3308 CADeprecated::GenericRunLoopThread::Entry(void*) + 164 (GenericRunLoopThread.h:95)
6   AudioSession                  	0x0000000189facd64 CADeprecated::CAPThread::Entry(CADeprecated::CAPThread*) + 92 (CAPThread.cpp:324)
7   libsystem_pthread.dylib       	0x00000001f18129a4 _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib       	0x00000001f1811ea0 thread_start + 8




EOF
Answered by Frameworks Engineer in 693660022

Unfortunately exception reasons are usually elided from crash reports (for privacy reasons) but there are 4 possible messages here:

  1. Application tried to push a nil view controller on target navController
  2. Split View Controllers cannot be pushed to a Navigation Controller navController
  3. navController is pushing the same view controller instance (pushedVC) more than once which is not supported and is most likely an error in the application bundleID
  4. Pushing a navigation controller is not supported

Please, show the code where it crashes and tell exactly where in code.

Explain also the set up, maybe with a screen capture of the storyboard with the navigation controller and its children.

Accepted Answer

Unfortunately exception reasons are usually elided from crash reports (for privacy reasons) but there are 4 possible messages here:

  1. Application tried to push a nil view controller on target navController
  2. Split View Controllers cannot be pushed to a Navigation Controller navController
  3. navController is pushing the same view controller instance (pushedVC) more than once which is not supported and is most likely an error in the application bundleID
  4. Pushing a navigation controller is not supported
pushViewController crashed but I don't know why
 
 
Q