I have an application that applies various filters to an image. It works fine on iOS 5, but crashes to 6. Below is an example of where it crashes:
CGImageRef inImage = self.CGImage; CFDataRef m_DataRef = CGDataProviderCopyData(CGImageGetDataProvider(inImage)); UInt8 * m_PixelBuf = (UInt8 *) CFDataGetBytePtr(m_DataRef); int length = CFDataGetLength(m_DataRef); for (int i=0; i<length; i+=4) { if(filter == filterCurve){ int r = i; int g = i+1; int b = i+2; int red = m_PixelBuf[r]; int green = m_PixelBuf[g]; int blue = m_PixelBuf[b]; m_PixelBuf[r] = SAFECOLOR(red);
Notice the bad access point when I try to assign the m_PixelBuf value. Does anyone know why this is happening? What in iOS 6 will cause this?
source share