title: crash removing keyValue observer (using Apple SquareCam example code)
body: <p>I am using the viewController class from Apple's SquareCam demo. I haven't changed the code except to create a UIView which in the example was being set through the storyboard/IB. Also specify in build settings to exclude from ARC.</p>
  
  <p>The code uses KVO to do some animation I'm getting a crash on the <code>removeObserver</code> line below. </p>
  
  <p>I can easily work around this and not use KVO but I'd like to understand the issue - and KVO better. Sometimes KVO in code examples is hard to follow. For example: in the snippets below, the <code>keyPaths</code> for the <code>addObserver/removeObserver</code>calls are different (in Apple's code). Shouldn't they be the same?</p>
  
  <p>Anyway... if someone has x-ray vision</p>
  
  <pre><code>- (void)teardownAVCapture
  {
  [videoDataOutput release];
  if (videoDataOutputQueue)
      dispatch_release(videoDataOutputQueue);
  
      // CRASH HERE
  [stillImageOutput removeObserver:self forKeyPath:@"isCapturingStillImage"];
  
  [stillImageOutput release];
  [previewLayer removeFromSuperlayer];
  [previewLayer release];
  }
  </code></pre>
  
  <p>// the observer is set up here:</p>
  
  <pre><code>    stillImageOutput = [AVCaptureStillImageOutput new];
  [stillImageOutput addObserver:self forKeyPath:@"capturingStillImage" options:NSKeyValueObservingOptionNew context:AVCaptureStillImageIsCapturingStillImageContext];
  </code></pre>