user1097298
user1097298

Reputation: 1

EXC_BAD_ACCESS error on dismissing modal UIViewController

This is my first post here.

I'm a newbie to the iPhone SDK. Please answer my question even if it is simple. I've created a navigation based application. The hierarchy as follows:

NavigationController - RootViewController - ATableViewController (pushed over RootViewController)

On RootViewController first I've pushed ATableViewController. Then, I'm presenting a view controller with TabBarController (which has four tabs each having its own navigation controller).

Now I want to keep two buttons on each navigation controller. On clicking one it should dismiss the modal view controller and on clicking the other it should return to RootViewController.

So, I've kept button on the UINavigationBar to dismiss the modal view controller. However on dismissing it I'm receiving an error:

*** -[CALayer superlayer]: message sent to deallocated instance 0xb157840

the backtrace is:

#0  0x011bb657 in ___forwarding___ ()
#1  0x011bb522 in __forwarding_prep_0___ ()
#2  0x004c54e5 in _UIConvertDisplayPointToWindow ()
#3  0x004c5695 in +[UIWindow _hitTestToPoint:pathIndex:forEvent:] ()
#4  0x004a5709 in _UIApplicationHandleEvent ()
#5  0x01cf8992 in PurpleEventCallback ()
#6  0x0122b944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#7  0x0118bcf7 in __CFRunLoopDoSource1 ()
#8  0x01188f83 in __CFRunLoopRun ()
#9  0x01188840 in CFRunLoopRunSpecific ()
#10 0x01188761 in CFRunLoopRunInMode ()
#11 0x01cf71c4 in GSEventRunModal ()
#12 0x01cf7289 in GSEventRun ()
#13 0x004aac93 in UIApplicationMain ()
#14 0x00001cd9 in main (argc=1, argv=0xbffff678) at main.m:14

Anyone please please help me out. I'm struggling with this problem from two weeks. I've spent many hours googling it.

Any help is greatly appreciated.

Thanks for reading.

Upvotes: 0

Views: 418

Answers (1)

Niko
Niko

Reputation: 2543

Check on this post how to set NSZombieEnabled. That will show more details on crashes that should help you debug your issue :

App crash only on iPhone Device and not in Simulator

Upvotes: 1

Related Questions