title: EXC_BAD_ACCESS when creating CIContext on iOS8.1 but not 9 or 10
body: <p>I am getting exc_bad_access on the line <code>CIContext *context = [CIContext contextWithOptions:nil];</code></p>
  
  <p>I have enabled zombies and checked with instruments: No luck.</p>
  
  <p>The full code is:</p>
  
  <pre><code>- (UIImage *) doBinarize:(UIImage *)sourceImage withThreshold:(float)threshold {
      UIImage *newImage; 
      if (sourceImage){
  
          CIContext *context = [CIContext contextWithOptions:nil];
          CIImage *image = [[CIImage alloc] initWithImage:sourceImage];
          CIImage *cImg = [self AdaptiveThresholdFilter:image withThreshold:threshold];
          CIImage *ciImage = cImg;
          CGImageRef cgImage   = [context createCGImage:ciImage fromRect:CGRectMake(0, 0, sourceImage.size.width, sourceImage.size.height)];
          newImage = [UIImage imageWithCGImage:cgImage];
          CGImageRelease(cgImage);
      } else {
          return nil;
      }
  
      return newImage;
  }
  </code></pre>
  
  <p>However I find almost wherever I put the CIContext contextWithOptions line the app will crash there. </p>
  
  <p>This is on iOS8.1, iPhone 5C. It should be noted that there is no issue on iOS9 or iOS10.</p>
  
  <p>Any suggestions?</p>