title: NSDictionary of Blocks as argument cause overflow
body: <p>I understand blocks are objective c objects and can be put in NSDictionary directly without Block_copy when using ARC.  <strong>But I got EXC_BAD_ACCESS error with this code:</strong></p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      [self method1:^(BOOL result){
          NSLog(@"method1WithBlock finished %d", result);
      }];
  }
  
  - (void) method1:(void (^)(BOOL))finish{
  
      NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:^(NSData *rcb){
          finish(YES);
      }, @"success",
                            ^(NSError *error){
                                finish(NO);
                           }, @"failure",  nil];
  
      [self method2:dict];
  }
  
  
  - (void) method2:(NSDictionary *)dict{
      void (^success)(NSData *rcb) = [dict objectForKey:@"success"];
      success(nil);
  }
  </code></pre>
  
  <p><strong>If I change method1: to this, no error raised.</strong></p>
  
  <pre><code>- (void) method1:(void (^)(BOOL))finish{
      void (^success)(NSData *)  = ^(NSData *rcb){
          finish(YES);
      };
  
      void (^failure)(NSError *error) = ^(NSError *error){
          finish(NO);
      };
      NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:success, @"success",
                            failure, @"failure",  nil];
      [self method2:dict];
  }
  </code></pre>
  
  <p>Can anybody explain why I have to use automatic variables to store the blocks before putting them to dictionary ? </p>
  
  <p>I am using iOS SDK 6.1.</p>