I'm developing an application using Core Image framework.Everything is working fine on simulator but when i'm running the app on device,my app gets crash with EXC_BAD_ACCESS on following piece of code.
CIFilter *myFilter = [CIFilter filterWithName:@"CIBumpDistortion"];
[myFilter setDefaults];
[myFilter setValue: [CIImage imageWithCGImage:[self.storyBoardImage CGImage]] forKey: kCIInputImageKey];//<----self.storyBoardImage is an UIImage and not being released.
[myFilter setValue: [CIVector vectorWithX:self.leftEyePosition.x Y:self.leftEyePosition.y]
forKey: kCIInputCenterKey];<-------Here my app crashed(EXC_BAD_ACCESS )
note:I'm using ARC in my app.
The error comes from the fact that kCIInputCenterKey isn't available on IOS. As you can see in the documentation here, it is only avaiable for OSX 10.5 and later.
That's probably the reason why it works on the simulator and not on the device itself.