Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone app crashed: Assertion failed function evict_glyph_entry_from_strike, file Fonts/CGFontCache.c

this happened quite randomly. I didn't delete any tableview cell, the backtrace information:

Assertion failed: (d->entry[identifier.glyph] == g), function evict_glyph_entry_from_strike, file Fonts/CGFontCache.c, line 810.
Program received signal:  “SIGABRT”.
(gdb) bt
#0  0x97da5972 in __kill ()
#1  0x97da5964 in kill$UNIX2003 ()
#2  0x97e38ba5 in raise ()
#3  0x97e4ec5c in abort ()
#4  0x97e3b804 in __assert_rtn ()
#5  0x0037fe0e in evict_glyph_entry_from_cache ()
#6  0x003226aa in expire_glyphs_nl ()
#7  0x00322645 in CGFontCacheUnlock ()
#8  0x00321fef in CGGlyphLockUnlock ()
#9  0x0240f9b7 in ripc_DrawGlyphs ()
#10 0x0031b0d4 in draw_glyphs ()
#11 0x0031a91f in CGContextShowGlyphsWithAdvances ()
#12 0x35814178 in WebCore::Font::drawGlyphs ()
#13 0x35813da5 in WebCore::Font::drawGlyphBuffer ()
#14 0x35813aca in WebCore::Font::drawSimpleText ()
#15 0x35813760 in drawAtPoint ()
#16 0x3581307e in -[NSString(WebStringDrawing) _web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:includeEmoji:] ()
#17 0x3090d2e9 in -[NSString(UIStringDrawing) drawAtPoint:forWidth:withFont:lineBreakMode:letterSpacing:includeEmoji:] ()
#18 0x3090cfe3 in -[NSString(UIStringDrawing) drawAtPoint:forWidth:withFont:lineBreakMode:] ()
#19 0x3093d853 in -[UINavigationItemView drawText:inRect:] ()
#20 0x3093a96b in -[UINavigationItemButtonView drawRect:] ()
#21 0x3091ff61 in -[UIView(CALayerDelegate) drawLayer:inContext:] ()
#22 0x0060daeb in -[CALayer drawInContext:] ()
#23 0x0060d8f9 in backing_callback ()
#24 0x0060d1b4 in CABackingStoreUpdate ()
#25 0x0060c3cc in -[CALayer _display] ()
#26 0x0060bf56 in CALayerDisplayIfNeeded ()
#27 0x0060b3bd in CA::Context::commit_transaction ()
#28 0x0060b022 in CA::Transaction::commit ()
#29 0x006132e0 in CA::Transaction::observer_callback ()
#30 0x30245c32 in __CFRunLoopDoObservers ()
#31 0x3024503f in CFRunLoopRunSpecific ()
#32 0x30244628 in CFRunLoopRunInMode ()
#33 0x32044c31 in GSEventRunModal ()
#34 0x32044cf6 in GSEventRun ()
#35 0x309021ee in UIApplicationMain ()
like image 835
Ross Avatar asked Nov 14 '22 13:11

Ross


1 Answers

https://discussions.apple.com/message/8213970?messageID=8213970 states that it seems to be related to using functions inside of animation blocks...

just.do.it commented half way down :

Hi, may be you can show us some code where this happens.

I had this assertion-failure occasionally in different apps. As far as i can tell, it seems that it is no good idea to use more than one of the follwing methods:

deleteRowsAtIndexPaths:withRowAnimation:
deleteSections:withRowAnimation:
insertRowsAtIndexPaths:withRowAnimation:
insertSections:withRowAnimation:

within a beginUpdate / endUpdates block.

What also seems to be at least problematic is to call one of these methods wich have an animation within a datasources method that itself is accompanied by an animation such as tableView:moveRowAtIndexPath:toIndexPath:

like image 68
Grady Player Avatar answered Nov 23 '22 23:11

Grady Player