I have a random crash in my iOS app that happens from time to time. It was not possible to play it at all, but I have thousands of user crash reports.
It crashes with "EXC_BREAKPOINT UNKNOWN" during a call to [UIView drawViewHierarchyInRect:].
This only happens on iOS7 devices, as the method is not available (and therefore not called) until iOS7.
Does anyone have any ideas on how to approach this? Any help would be greatly appreciated.
- (UIImage *)imageRepresentation
{
if (![self respondsToSelector:@selector(drawViewHierarchyInRect:afterScreenUpdates:)]) {
return nil;
}
UIGraphicsBeginImageContextWithOptions(self.bounds.size, YES, [UIScreen mainScreen].scale);
[self drawViewHierarchyInRect:self.bounds afterScreenUpdates:NO];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
Crashed: com.apple.main-thread
EXC_BREAKPOINT UNKNOWN at 0x0000defe
raw
0
CoreFoundation
CFRelease + 1131
1
UIKit
-[UIView(Rendering) _imageFromRect:] + 136
2
UIKit
-[UIView(Rendering) _imageFromRect:] + 136
3
UIKit
-[UIView _drawViewHierarchyInRect:] + 174
4
UIKit
-[UIView drawViewHierarchyInRect:afterScreenUpdates:] + 378
5
MyApp
UIView+SSToolkitAdditions.m line 23
-[UIView(SSToolkitAdditions) imageRepresentation]
source
share