CGFontGetGlyphAdvances crash on jailbreak devices because of system font

111 Views Asked by At

Recently I updated my app and redesigned one of the view controllers. Crashlytics tells me that there are some jailbreak users(only jailbreak users) experiencing the following crashes.

Exception Type: EXC_BAD_ACCESS
Code: KERN_PROTECTION_FAILURE at 0x2fc77efc
CoreGraphics CGFontGetGlyphAdvances + 196

Detailed crash reports are here:
http://crashes.to/s/96facdd8c3a
http://crashes.to/s/30a55faaa9f

One of my users sent his screenshot to me and I notice from the status bar that he changed his default font.

I do not have a jailbreak device now so I can not reproduce this crash. However, in the redesigned view controller, there are some codes about setting font for UILabels.

self.amountIndicator.text = @"◀︎";
self.amountIndicator.font = [UIFont systemFontOfSize:13];
self.amountIndicator.adjustsFontSizeToFitWidth = YES;
self.amountIndicator.textColor = iOS7tintColor;


swipeChangeLabel.textAlignment = NSTextAlignmentCenter;
swipeChangeLabel.textColor = [UIColor whiteColor];
swipeChangeLabel.backgroundColor = [UIColor clearColor];
swipeChangeLabel.numberOfLines = 0;
swipeChangeLabel.adjustsFontSizeToFitWidth = NO;

Is there any code that is not compatible with "custom font or skin" on jailbreak devices?

1

There are 1 best solutions below

0
On
self.amountIndicator.text = @"◀︎";

By removing this line in the next version(change this label view to an imageview), affected users say that it's fixed now. As @Emmanuel said, it might be a font problem.