-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Occasional crashing in iOS10 #860
Comments
Interesting! I don't believe we've seen this one before. Could you show the other threads as well First guess is that the typesetter is trying to retain the text view, which is illegal since it's deallocating. In any case, iOS 10 seems to be doing something very silly during text view dealloc, and the workaround could be to set a |
Well, for that particular crash report we took the callstack from, the other thread callstacks don't look that interesting, mostly "idle" ones or 3rd party platform ones. The only possibly relevant one is at the end (ASDeallocQueue): com.apple.uikit.eventfetch-thread AVAudioSession Notify Thread com.twitter.crashlytics.ios.MachExceptionServer com.apple.NSURLConnectionLoader com.apple.CoreMotion.MotionThread Thread (several of these with the exact callstack) Thread WebThread JIT Worklist Worker Thread WTF Parallel Helper Thread AFNetworking QBGCDAsyncSocket-CFStream ASDeallocQueue (this is the one that may be most interesting) Nevertheless, we'll try your suggestion to see if it fixes (or at the very least mitigates) the issue. We'll let you know how it turns out. |
@carlos-saraiva #915 should address this issue. I'm going to close this ticket, but feel free to re-open if the issue still occurs after the fix. Thank you for the report! |
Hello,
We currently have an app in production that has an "infinite" scrollable video feed (with a paged scroller so there's only one video per page). Due to some performance issues when scrolling (because of AVPlayer playback starting) we have recently migrated that feed to use Texture (version 2.6 which is the latest CocoaPods version at the time of writing).
It consists of an ASTableNode with paging enabled, where each cell occupies one screen size. Each cell has various subnodes (like an ASVideoNode for video playback, an ASEditableTextNode to show the video description, but nothing I can see out of the ordinary).
It passed our internal testing so we've launched it to production, but once we did we noticed that some iOS 10 devices started having crashes (that we haven't yet been able to reproduce), with the following callstack:
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x18ca32f30 objc_msgSend + 16
1 UIFoundation 0x193d64a1c -[NSATSTypesetter actionForControlCharacterAtIndex:] + 116
2 UIFoundation 0x193d66fec -[NSATSGlyphStorage setGlyphRange:characterRange:] + 3128
3 UIFoundation 0x193d6294c -[NSATSTypesetter _ctTypesetter] + 276
4 UIFoundation 0x193d6bb14 -[NSATSLineFragment layoutForStartingGlyphAtIndex:characterIndex:minPosition:maxPosition:lineFragmentRect:] + 128
5 UIFoundation 0x193d63534 -[NSATSTypesetter _layoutLineFragmentStartingWithGlyphAtIndex:characterIndex:atPoint:renderingContext:] + 2316
6 UIFoundation 0x193d64af8 -[NSATSTypesetter layoutParagraphAtPoint:] + 160
7 UIFoundation 0x193dbaf08 -[NSTypesetter _layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:maxCharacterIndex:nextGlyphIndex:nextCharacterIndex:] + 3012
8 UIFoundation 0x193dbbda4 -[NSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 244
9 UIFoundation 0x193d65558 -[NSATSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 448
10 UIFoundation 0x193d5168c -[NSLayoutManager(NSPrivate) _fillLayoutHoleForCharacterRange:desiredNumberOfLines:isSoft:] + 1116
11 UIFoundation 0x193d57d54 _NSFastFillAllLayoutHolesForGlyphRange + 1416
12 UIFoundation 0x193d887c0 -[NSLayoutManager ensureLayoutForBoundingRect:inTextContainer:] + 220
13 UIKit 0x194858918 __38-[UITextView _visibleRangeWithLayout:]_block_invoke + 112
14 UIFoundation 0x193d8e62c -[NSLayoutManager(TextLocking) coordinateAccess:] + 64
15 UIKit 0x19485885c -[UITextView _visibleRangeWithLayout:] + 144
16 UIKit 0x19485f49c -[_UITextViewRestorableScrollPosition initWithTextView:] + 100
17 UIKit 0x19485f04c +[_UITextViewRestorableScrollPosition restorableScrollPositionForTextView:] + 68
18 UIKit 0x194855704 -[UITextView setContentOffset:] + 80
19 UIKit 0x194144168 -[UIScrollView(UIScrollViewInternal) _adjustContentOffsetIfNecessary] + 60
20 UIKit 0x193f0cd60 -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:tramplingDragFlags:] + 448
21 UIKit 0x193f0cb60 -[UIScrollView removeFromSuperview] + 40
22 UIKit 0x193e2e14c -[UIView dealloc] + 1176
23 Foundation 0x18ea35a58 -[NSConcretePointerArray replacePointerAtIndex:withPointer:] + 176
24 OurApp 0x1007ce11c -[ASRunLoopQueue processQueue] (ASRunLoopQueue.mm:379)
25 CoreFoundation 0x18df957dc CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 32
26 CoreFoundation 0x18df9340c __CFRunLoopDoObservers + 372
27 CoreFoundation 0x18df9389c __CFRunLoopRun + 1024
28 CoreFoundation 0x18dec2048 CFRunLoopRunSpecific + 444
29 GraphicsServices 0x18f945198 GSEventRunModal + 180
30 UIKit 0x193e9b818 -[UIApplication _run] + 684
31 UIKit 0x193e96550 UIApplicationMain + 208
32 OurApp 0x10030b3bc main (main.m:16)
The callstack suggests that a scrollview with text (maybe the ASEditableTextNode) is disappearing and yet doing some layout calculations. However I don't really understand why this is happening, why it's crashing or why it's limited to iOS10 (and only occurs rarely). Since I can't reproduce it, I can't give a crashing example, but was hoping for some pointers to figure out what is going wrong.
Thanks in advance!
The text was updated successfully, but these errors were encountered: