title: Dismissing a MFMailComposeViewController causes EXC_BAD_ACCESS
body: <p>I'm displaying a MFMailComposeViewController like so:</p>
  
  <pre><code>- (IBAction) contactUs: (id) sender {
      [Tracker trackContactUsPressed: [MFMailComposeViewController canSendMail]];
  
      if ([MFMailComposeViewController canSendMail] == NO) {
          UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"Email Error"
                                                          message: @"Email has not been configured on this device.  Please send us an email at\nFOO@BAR.com"
                                                         delegate: self
                                                cancelButtonTitle: @"OK"
                                                otherButtonTitles: nil];
          [alert show];
          [alert release];
      } else {
  
          MFMailComposeViewController *controller = [[[MFMailComposeViewController alloc] init] autorelease];
  
          [controller setSubject:@"Comments about FOO"];            
  
          [controller setToRecipients: [NSArray arrayWithObject: @"FOO@BAR.com"]];
          [controller setMailComposeDelegate: self];
  
          [[self parentViewController] presentModalViewController:controller animated:YES];
      }
  }
  </code></pre>
  
  <p>Then my delegate looks like this:</p>
  
  <pre><code>- (void) mailComposeController: (MFMailComposeViewController *) controller didFinishWithResult: (MFMailComposeResult) result error: (NSError *) error {
      [[self parentViewController] dismissModalViewControllerAnimated: YES];
  }
  </code></pre>
  
  <p>However as soon as the delegate is called, and the view disappears, I get a EXC_BAD_ACCESS.  The backtrace says this:</p>
  
  <pre><code>#0  0x00000000 in ?? ()
  #1  0x0065a2d9 in -[UIWindowController transitionViewDidComplete:fromView:toView:] ()
  #2  0x0044a905 in -[UITransitionView notifyDidCompleteTransition:] ()
  #3  0x003f1499 in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] ()
  #4  0x003f132b in -[UIViewAnimationState animationDidStop:finished:] ()
  #5  0x02631db0 in run_animation_callbacks ()
  #6  0x02631c6f in CA::timer_callback ()
  #7  0x0284bf73 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
  #8  0x0284d5b4 in __CFRunLoopDoTimer ()
  #9  0x027a9dd9 in __CFRunLoopRun ()
  #10 0x027a9350 in CFRunLoopRunSpecific ()
  #11 0x027a9271 in CFRunLoopRunInMode ()
  #12 0x0305500c in GSEventRunModal ()
  #13 0x030550d1 in GSEventRun ()
  #14 0x003cfaf2 in UIApplicationMain ()
  #15 0x000023c5 in main (argc=1, argv=0xbfffefcc) at main.m:14
  </code></pre>
  
  <p>I can't seem to figure out what's wrong.  As far as I know, this worked previously with the 3.x SDK we were using (we released it and everything!).  Now with the new SDK (4.1) it seems to fail.  I'm not sure if that's related.</p>
  
  <p>Does anyone know what's wrong?</p>