Hi all
Here's the scenario: On my iPhone app (OS 3.1.2), I've got "view 1" which navigates to "view 2" using a pushViewController call. Then, on "view 2", the user can optionally call "view 3", which is displayed using presentModalViewController and an animation (flip horizontal transition). I can switch view 1 <-> view 2 back and forth without any problem. But if I do view 1 -> view 2 -> view 3, I can get back to view 2 (with the appropriate dismissModalViewControllerAnimated call in view 3) ; once in view 2, getting back to view 1 makes the application crash with the "standard" objc_msgSend error.
Here's how I navigate from view 1 to view 2:
NewsArticleController *articleViewController = [[NewsArticleController alloc] initWithNibName:@"NewsView" bundle:nil news:f1Data];
articleViewController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:articleViewController animated:YES];
[articleViewController release];
Here's how I navigate from view 2 to view 3:
addFeedController = [[AddFeedViewController alloc] initWithNibName:@"AddFeedView" bundle:nil];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:addFeedController];
[addFeedController release];
navigationController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[[self navigationController] presentModalViewController:navigationController animated:YES];
[navigationController release];
Here's how view 3 dismisses to get back to view 2:
- (IBAction)cancel
{
[self dismissModalViewControllerAnimated:YES];
}
And finally, the stack trace:
#0 0x96a8aedb in objc_msgSend
#1 0x04859550 in ??
#2 0x01c26908 in CFRelease
#3 0x01c49869 in __CFDictionaryDeallocate
#4 0x01c26a41 in _CFRelease
#5 0x00043cf5 in NSPopAutoreleasePool
#6 0x035f7858 in run_animation_callbacks
#7 0x035f75f5 in CA::timer_callback
#8 0x01c67ac0 in CFRunLoopRunSpecific
#9 0x01c66c48 in CFRunLoopRunInMode
#10 0x0245378d in GSEventRunModal
#11 0x02453852 in GSEventRun
#12 0x002d3003 in UIApplicationMain
#13 0x000023b0 in main at main.m:5
Maybe I'm blind and don't see the error here, but I'm really stuck. Please help!