title: Calling super in the implementation of an Objective-C block
body: <p>Is calling a method on <strong>super</strong> supported in the implementation of an Objective-C block?</p>
  
  <p>When I was calling a method on <strong>super</strong> an <strong>EXC_BAD_ACCESS</strong> error would be thrown but as soon as I changed those calls from <code>[super methodToCall]</code> to <code>[self methodToCall]</code> and let the message move up the responder chain it worked fine. </p>
  
  <p>There is no implementation of <code>-methodToCall</code> in the instance of the class that the block exists in, but there is one in the superclass (that is, the class that self inherits from).</p>
  
  <p>I'm just curious to learn the details as to why calling a method on super inside the implementation of a block was a problem in the first place (technically) so I can avoid it in the future.  I have a suspicion it is related to how the variables are captured in the block and something about the stack and the heap, but I really have no concrete idea.</p>
  
  <p>Note: the block implementation code is called up to a few seconds after the block is stored in a property, the property uses <strong>copy</strong> so I don't think it's a problem with the block's lifecycle, that all looks to be fine.  Also, this was only crashing on the iPhone device (3G) but was working without crashing in the iPhone Simulator.</p>
  
  <p>Results in <code>EXC_BAD_ACCESS</code>:</p>
  
  <pre><code>[self retrieveItemsForId:idString completionHandler:^(NSError *error) {
   if (!error) {
    [super didRetrieveItems];
   } else {
    [super errorRetrievingItems];
   }
  }];
  </code></pre>
  
  <p>Works perfect, implementations of <code>-didRetrieveItems</code> and <code>-errorRetrievingItems</code> are in the super-class.</p>
  
  <pre><code>[self retrieveItemsForId:idString completionHandler:^(NSError *error) {
  
   if (!error) {
    [self didRetrieveItems];
   } else {
    [self errorRetrievingItems];
   }
  }];
  </code></pre>