ibireme / YYText

Powerful text framework for iOS to display and edit rich text.
MIT License
8.84k stars 1.69k forks source link

iOS12上有崩溃 #858

Closed YasinTian closed 4 years ago

YasinTian commented 5 years ago
0 CoreGraphics CGColorSpaceEqualToColorSpaceIgnoringRange + 28
1 QuartzCore _CARequiresColorMatching + 256
2 QuartzCore CACGContextEvaluator::update_with_color_components(CGColorSpace, double const) + 120
3 QuartzCore draw_glyphs(CGContextDelegate, CGRenderingState, CGGState, CGAffineTransform const, unsigned short const, CGPoint const, unsigned long) + 184
4 CoreGraphics _draw_glyphs + 604
5 CoreText DrawGlyphsAtPositions(TFont const, unsigned short const, CGPoint const, unsigned long, CGContext, CGAffineTransform, CGAffineTransform, bool) + 2940
6 CoreText CTFontDrawGlyphsAtPositions + 192
7 CoreText TRun::DrawGlyphsAtPositions(CGContext, CFRange, CGPoint const, bool) const + 228
8 CoreText CTRunDraw + 176
9 PengPeng YYTextDrawRun (YYTextLayout.m:2233)
10 PengPeng -[YYTextLayout drawInContext:size:point:view:layer:debug:cancel:] (YYTextLayout.m:3358 [Inline: YYTextDrawText])
11 PengPeng __30-[YYLabel newAsyncDisplayTask]_block_invoke.330 (YYLabel.m:1135)
12 PengPeng -[YYTextAsyncLayer _displayAsync:] (YYTextAsyncLayer.m:222)
13 PengPeng -[YYTextAsyncLayer display] (YYTextAsyncLayer.m:115)
14 QuartzCore CA::Context::commit_transaction(CA::Transaction*) + 548
15 QuartzCore CA::Transaction::commit() + 608
16 QuartzCore CA::Transaction::observer_callback(__CFRunLoopObserver, unsigned long, void) + 92
17 CoreFoundation _CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 32
18 CoreFoundation ___CFRunLoopDoObservers + 412
19 CoreFoundation ___CFRunLoopRun + 1264
20 CoreFoundation CFRunLoopRunSpecific + 436
21 GraphicsServices GSEventRunModal + 100
22 UIKitCore UIApplicationMain + 212
23 PengPeng main (main.m:25)
24 libdyld.dylib _start + 4
WZBbiao commented 5 years ago

我也遇到了同样的问题,线上目前情况来看,每天的异常机型占比: iPhone 5S 27.50% iPhone 6 Plus 25.00% IPAD7,5 10.00% iPhone 6 10.00% iPad mini 27.50%

基本上都是iOS12的系统 12.1.2 (16C101) 22.50% 12.1.1 (16C50) 22.50% 12.1.2 (16C104) 17.50% 12.0 (16A366) 12.50% 12.0.1 (16A404) 12.50%

希望尽快修复吧

sum123 commented 5 years ago

我的也是

YasinTian commented 5 years ago

@Sum123 @WZBbiao 我发现可能是特殊字符的问题,但是目前还不能确定如何引起的

a244676199 commented 4 years ago

现在有结果了么?可以给个联系方式一起讨论下么?

YasinTian commented 4 years ago

现在有结果了么?可以给个联系方式一起讨论下么?

太久了,都忘记这个是哪个Bug了。

a244676199 commented 4 years ago

目前我这还没有头绪 最后怎么改好的有印象么?

YasinTian commented 4 years ago

目前我这还没有头绪 最后怎么改好的有印象么?

好像改过一个阿拉伯文的问题,不知道是不是这个,你显示阿拉伯文看看会不会崩溃。

a244676199 commented 4 years ago

我这不支持阿拉伯文,现在展示的普通的汉字和表情 都会崩溃,

a244676199 commented 4 years ago

看样子是复用导致的这个问题,但是复用不使用的话 我难道要给他置为nil么

xichen744 commented 3 years ago

@YasinTian 所以最后你们怎么修复的?

YasinTian commented 3 years ago

@YasinTian 所以最后你们怎么修复的?

好像有一个布局的最大size,设置一下。这个问题好像是特殊字符导致的宽度计算出来是一个极大值,导致的崩溃。

xichen744 commented 3 years ago

@YasinTian 还记得是哪个特殊字符吗? 我之前改过YYTextContainerMaxSize这个, 设置了一个合理的最大宽度吗? 你也是吗?