Note that there are some explanatory texts on larger screens.

plurals
  1. POUiTabBarController crashes on popToRootViewController
    text
    copied!<p>My application crashes when selecting a tab. Here is the code that crashes. </p> <pre><code>- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { if ([viewController isKindOfClass:[UINavigationController class]]) { [(UINavigationController*)viewController popToRootViewControllerAnimated:NO]; } } </code></pre> <p>This is the code that is the problem. Apparently when I popToRoot controller a message is sent to a dealloced object.</p> <pre><code>DealElementDisplayController *dealElementDisplayController = [[DealElementDisplayController alloc] initWithStores:storeIds :YES]; dealElementDisplayController.title = [NSString stringWithFormat:@"%@ Products", store.companyName]; [self.navigationController pushViewController:dealElementDisplayController animated:YES]; </code></pre> <p>Here is the exception.</p> <pre><code>Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0xe0000008 Crashed Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libobjc.A.dylib 0x3648af78 objc_msgSend + 16 1 UIKit 0x320e809c -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 540 2 UIKit 0x320e717a -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1070 3 UIKit 0x320e6904 -[UITableView layoutSubviews] + 200 4 UIKit 0x3208b0d8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 176 5 CoreFoundation 0x34fc81f4 -[NSObject performSelector:withObject:] + 36 6 QuartzCore 0x36b53a9e -[CALayer layoutSublayers] + 210 7 QuartzCore 0x36b536b6 CA::Layer::layout_if_needed(CA::Transaction*) + 210 8 QuartzCore 0x36b5783c CA::Context::commit_transaction(CA::Transaction*) + 220 9 QuartzCore 0x36b57578 CA::Transaction::commit() + 308 10 QuartzCore 0x36b7f90a CA::Transaction::flush() + 38 11 QuartzCore 0x36b7f8dc +[CATransaction flush] + 28 12 UIKit 0x32096152 _afterCACommitHandler + 46 13 CoreFoundation 0x3503db14 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 12 14 CoreFoundation 0x3503bd50 __CFRunLoopDoObservers + 252 15 CoreFoundation 0x3503c0aa __CFRunLoopRun + 754 16 CoreFoundation 0x34fbf49e CFRunLoopRunSpecific + 294 17 CoreFoundation 0x34fbf366 CFRunLoopRunInMode + 98 18 GraphicsServices 0x362bb432 GSEventRunModal + 130 19 UIKit 0x320b5e76 UIApplicationMain + </code></pre> <p>Here is the stack trace from Zombie Profile. I am using ARC.</p> <pre><code> 0 CoreFoundation ___forwarding___ 1 CoreFoundation _CF_forwarding_prep_0 2 UIKit -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] 3 UIKit -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] 4 UIKit -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] 5 UIKit -[UITableView layoutSubviews] 6 UIKit -[UIView(CALayerDelegate) layoutSublayersOfLayer:] 7 CoreFoundation -[NSObject performSelector:withObject:] 8 QuartzCore -[CALayer layoutSublayers] 9 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*) 10 QuartzCore CA::Context::commit_transaction(CA::Transaction*) 11 QuartzCore CA::Transaction::commit() 12 QuartzCore +[CATransaction flush] 13 UIKit _afterCACommitHandler 14 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 15 CoreFoundation __CFRunLoopDoObservers 16 CoreFoundation __CFRunLoopRun 17 CoreFoundation CFRunLoopRunSpecific 18 CoreFoundation CFRunLoopRunInMode 19 GraphicsServices GSEventRunModal 20 GraphicsServices GSEventRun 21 UIKit UIApplicationMain </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload