Question

I've seen a handful of different crash reports coming in that all seem to be triggered when Core Text is calculating the size of some text in response to a call to [UIView sizeThatFits]. I suspect the crashes share some common cause, but I've only got a few stack traces and I don't know how to reproduce any of the problems myself, so I'm left guessing what sorts of problems could be triggering the crash.

In one case the crash is happening in an ABPeoplePickerNavigationController and the code on the stack is entirely Apple code. I've audited my code to make sure that UIKit/Core Text are only being used from the main thread.

I saw this tantalizing stack trace posted on the buzztouch forum, which looks very similar and also shares the "contacts" trigger.

frame #0: 0x007fe283 CoreText`TComponentFont::GetMinSideBearing(CGAffineTransform const&, bool) const + 43 
frame #1: 0x0076b244 CoreText`TRun::GetLeftHangersGlyphCountAndWidth(long, unsigned long, TCharStream const&) const + 524 
frame #2: 0x0077e7da CoreText`TLine::GetLeftHangersGlyphCountAndWidth(unsigned long const*) const + 234 
frame #3: 0x0077e4b9 CoreText`TLine::GetBounds(unsigned long) const + 811 
frame #4: 0x0077ace6 CoreText`CTLineGetBoundsWithOptions + 44 
frame #5: 0x02059497 UIKit`-[UITableViewIndex _cacheAndMeasureTitles] + 984 
frame #6: 0x02059ace UIKit`-[UITableViewIndex sizeThatFits:] + 131

On the forum, someone named Ofer left a post saying the crash had been fixed. I'm hoping Ofer might be kind enough to share some details about what they discovered they were doing to trigger the crash!

Was it helpful?

Solution

In my case the problem appears to have stemmed from the way I was loading icons using the FontAwesomeKit library, as described in his "Known Issues". I had the good luck of getting my app into a state where I could pretty regularly reproduce the problem, and applying the suggested workaround made the problem go away (of course, for all I know it could just be hiding).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top