UIImagePickerController causes crash on ios5
<pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.

UINavigationController *HomeNav = [[UINavigationController alloc] initWithRootViewController:[[HomeController alloc] init]];

[HomeNav.navigationBar setTintColor:[UIColor clearColor]];

CustomTabBar *tabBar = [[CustomTabBar alloc] init];
tabBar.buttonImages = [NSArray arrayWithObjects:@"t1.png" , nil];
tabBar.hightLightButtonImages = [NSArray arrayWithObjects:@"th1.png",  nil];
tabBar.viewControllers = [NSArray arrayWithObjects:HomeNav , nil];
self.tabBarController = tabBar;
[tabBar release];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];

return YES;
}
</code></pre>

<p>in <code>HomeController</code> view, there is one button
if tap the button I call `AViewController.</p>

<pre><code>-(IBAction)tapButtonA:(id)sender;
{
    [self.navigationController pushViewController:AViewController animated:YES];
}
</code></pre>

<p>there is also a button on the view of <code>AViewController</code>.</p>

<p>if I tap the button, I call <code>UIImagePickercontroller</code></p>

<pre><code>-(IBAction)tapButtonB:(id)sender;
{
 UIImagePickerController *picker=[[UIImagePickerController alloc]init];
picker.delegate=self;
picker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;
picker.allowsImageEditing = YES;

[self presentModalViewController: picker animated:NO]; 
}
</code></pre>

<p>If I tap the cancel button of the <code>UIImagePickerController</code></p>

<pre><code>-(void)imagePickerControllerDidCancel:(UIImagePickerController*)picker{
[self.presentingViewController dismissModalViewControllerAnimated:YES];
}
</code></pre>

<p>the <code>UIImagePicker</code> will dismiss, but after 1,2 seconds the app crashes and displays</p>

<p><img src="http://i.stack.imgur.com/SKkxq.png" alt="enter image description here"></p>

<p>Welcome any comment</p>
