facebook/three20 — Issue #759: EXC_BAD_ACCESS after memory warning trying to dismissing modal view
Author: twmobius
Created: 2012-01-23 06:43:08+00:00
State: open

My application is based on a tabbar which I set by having a controller with a viewDidLoad:

```- (void)viewDidLoad {
[self setTabURLs:[NSArray arrayWithObjects:
@"app://tab1",
@"app://tab2",
nil]];
}```

I also have a modal view controller which I have defined in my AppDelegate.m as such:

```[map from:@"app://modal" toModalViewController:[MyModalViewController class] transition:UIModalTransitionStyleFlipHorizontal];```

which I later on in my application I call it as:

```_urlAction = [[TTURLAction alloc] initWithURLPath:@"app://modal"];
_urlAction.query = dictionary;
_urlAction.animated = YES;
[[TTNavigator navigator] openURLAction:_urlAction];```

In order to dismiss it I will do: ``` [self dismissModalViewControllerAnimated:YES];```

If the application receives a memory warning before I attempt to dismiss the I get an EXC_BAD_ACCESS which from what I've traced it so far is at ```- (UIViewController*)rootControllerForController:(UIViewController*)controller``` when it attempts to push the controller to the navController.

Has anyone experienced this before? Could anyone help?