TextureGroup / Texture

Smooth asynchronous user interfaces for iOS apps.
https://texturegroup.org/
Other
8.02k stars 1.29k forks source link

ASDisplayLayer asyncdisplaykit_node objc_loadWeakRetained Crash #588

Open workhardupc opened 7 years ago

workhardupc commented 7 years ago

Version: Texture (2.4) iOS version: iOS9、iOS10、iOS11

Crash Stack:

Version: 4.9.0+ (4.9.0) Code Type: ARM-64 Parent Process: ??? [1] Date/Time: 2017-09-26 04:16:02 +0000 OS Version: iPhone OS 9.1 (13B143) Report Version: 104 Exception Type: SIGSEGV Exception Codes: SEGV_ACCERR at 0x20 Triggered by Thread: 0 Thread 0 Crashed: 0 libobjc.A.dylib 0x00000001999e1a6c _weak_read_no_lock :44 (in libobjc.A.dylib) 1 libobjc.A.dylib 0x00000001999e8984 _objc_loadWeakRetained :108 (in libobjc.A.dylib) 2 Lai 0x00000001006e3038 -[_ASDisplayLayer asyncdisplaykit_node] _ASDisplayLayer.h:31 (in Lai) 3 Lai 0x000000010073071c ASDisplayNodePerformBlockOnEveryNode ASDisplayNodeExtras.mm:91 (in Lai) 4 Lai 0x0000000100730874 ASDisplayNodePerformBlockOnEveryNode ASDisplayNodeExtras.mm:106 (in Lai) 5 Lai 0x000000010072c67c -[ASDisplayNode recursivelySetInterfaceState:] ASDisplayNode.mm:2712 (in Lai) 6 Lai 0x000000010075be08 -[ASRangeController _updateVisibleNodeIndexPaths] ASRangeController.mm:374 (in Lai) 7 Lai 0x000000010070c910 -[ASCollectionView didMoveToWindow] ASCollectionView.mm:2149 (in Lai) 8 UIKit 0x0000000189ab309c -[UIView(Internal) _didMoveFromWindow:toWindow:] :1496 (in UIKit) 9 UIKit 0x0000000189ad8410 -[UIScrollView _didMoveFromWindow:toWindow:] :92 (in UIKit) 10 UIKit 0x0000000189ab2dbc -[UIView(Internal) _didMoveFromWindow:toWindow:] :760 (in UIKit) 11 UIKit 0x0000000189ab2dbc -[UIView(Internal) _didMoveFromWindow:toWindow:] :760 (in UIKit) 12 UIKit 0x0000000189ab2dbc -[UIView(Internal) _didMoveFromWindow:toWindow:] :760 (in UIKit) 13 UIKit 0x0000000189ad8410 -[UIScrollView _didMoveFromWindow:toWindow:] :92 (in UIKit) 14 UIKit 0x0000000189ab2dbc -[UIView(Internal) _didMoveFromWindow:toWindow:] :760 (in UIKit) 15 UIKit 0x0000000189ab2dbc -[UIView(Internal) _didMoveFromWindow:toWindow:] :760 (in UIKit) 16 UIKit 0x0000000189ab2dbc -[UIView(Internal) _didMoveFromWindow:toWindow:] :760 (in UIKit) 17 UIKit 0x0000000189ab2350 _45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke :152 (in UIKit) 18 Foundation 0x00000001853c5580 -[NSISEngine withBehaviors:performModifications:] :168 (in Foundation) 19 UIKit 0x0000000189ab21d4 -[UIView(Hierarchy) postMovedFromSuperview:] :532 (in UIKit) 20 UIKit 0x0000000189dc4834 UIViewWasRemovedFromSuperview :228 (in UIKit) 21 UIKit 0x0000000189ab0bf8 -[UIView(Hierarchy) removeFromSuperview] :412 (in UIKit) 22 UIKit 0x0000000189b8df30 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] :596 (in UIKit) 23 UIKit 0x0000000189c6b654 _49-[UINavigationController _startCustomTransition:]_block_invoke :232 (in UIKit) 24 UIKit 0x0000000189be7668 -[UIViewControllerTransitionContext completeTransition:] :116 (in UIKit) 25 UIKit 0x0000000189d521ac 53-[_UINavigationParallaxTransition animateTransition:]_block_invoke93 :684 (in UIKit) 26 UIKit 0x0000000189af3240 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] :628 (in UIKit) 27 UIKit 0x0000000189af2d3c -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] :312 (in UIKit) 28 UIKit 0x0000000189af2bc4 -[UIViewAnimationState animationDidStop:finished:] :108 (in UIKit) 29 QuartzCore 0x00000001892b9c2c ZN2CA5Layer23run_animation_callbacksEPv :284 (in QuartzCore) 30 libdispatch.dylib 0x000000019a1e16a8 dispatch_client_callout :16 (in libdispatch.dylib) 31 libdispatch.dylib 0x000000019a1e6db0 dispatch_main_queue_callback_4CF :1844 (in libdispatch.dylib) 32 CoreFoundation 0x00000001844dc1f8 _CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE :12 (in CoreFoundation) 33 CoreFoundation 0x00000001844da060 _CFRunLoopRun :1628 (in CoreFoundation) 34 CoreFoundation 0x0000000184408ca0 _CFRunLoopRunSpecific :384 (in CoreFoundation) 35 GraphicsServices 0x000000018f98c088 _GSEventRunModal :180 (in GraphicsServices) 36 UIKit 0x0000000189b20ffc _UIApplicationMain :204 (in UIKit)

another stack:

Date/Time: 2017-09-26 13:37:30 +0000 OS Version: iPhone OS 11.0 (15A372) Report Version: 104 Exception Type: SIGSEGV Exception Codes: SEGV_ACCERR at 0x20 Triggered by Thread: 0 Thread 0 Crashed: 0 libobjc.A.dylib 0x0000000185cbcbb4 _objc_loadWeakRetained :156 (in libobjc.A.dylib) 1 Lai 0x00000001008af038 -[_ASDisplayLayer asyncdisplaykit_node] _ASDisplayLayer.h:31 (in Lai) 2 Lai 0x00000001008fc71c ASDisplayNodePerformBlockOnEveryNode ASDisplayNodeExtras.mm:91 (in Lai) 3 Lai 0x00000001008fc874 ASDisplayNodePerformBlockOnEveryNode ASDisplayNodeExtras.mm:106 (in Lai) 4 Lai 0x00000001008f867c -[ASDisplayNode recursivelySetInterfaceState:] ASDisplayNode.mm:2712 (in Lai) 5 Lai 0x0000000100927e08 -[ASRangeController _updateVisibleNodeIndexPaths] ASRangeController.mm:374 (in Lai) 6 Lai 0x00000001008d8910 -[ASCollectionView didMoveToWindow] ASCollectionView.mm:2149 (in Lai) 7 UIKit 0x000000018fb9776c -[UIView(Internal) _didMoveFromWindow:toWindow:] :1496 (in UIKit) 8 UIKit 0x000000018fbba5e0 -[UIScrollView _didMoveFromWindow:toWindow:] :96 (in UIKit) 9 UIKit 0x0000000190609ce4 -[UICollectionView _didMoveFromWindow:toWindow:] :80 (in UIKit) 10 UIKit 0x000000018fb9745c -[UIView(Internal) _didMoveFromWindow:toWindow:] :712 (in UIKit) 11 UIKit 0x000000018fb96918 _45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke :156 (in UIKit) 12 Foundation 0x00000001870bc59c -[NSISEngine withBehaviors:performModifications:] :168 (in Foundation) 13 UIKit 0x000000018fb9678c -[UIView(Hierarchy) _postMovedFromSuperview:] :824 (in UIKit) 14 UIKit 0x000000018fba239c -[UIView(Internal) _addSubview:positioned:relativeTo:] :1728 (in UIKit) 15 UIKit 0x00000001905ffc90 -[_UIQueuingScrollView _setWrappedViewAtIndex:withView:] :500 (in UIKit) 16 UIKit 0x00000001906008c4 -[_UIQueuingScrollView _viewAtIndex:loadingIfNecessary:updatingContents:animated:] :480 (in UIKit) 17 UIKit 0x0000000190603ca0 ___54-[_UIQueuingScrollView _didScrollWithAnimation:force:]_block_invoke :836 (in UIKit) 18 UIKit 0x0000000190603668 -[_UIQueuingScrollView _didScrollWithAnimation:force:] :448 (in UIKit) 19 UIKit 0x00000001905ff3c8 -[_UIQueuingScrollView layoutSubviews] :200 (in UIKit) 20 UIKit 0x000000018fb98000 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] :1256 (in UIKit) 21 QuartzCore 0x000000018a7690b4 -[CALayer layoutSublayers] :184 (in QuartzCore) 22 QuartzCore 0x000000018a76d194 ZN2CA5Layer16layout_if_neededEPNS_11TransactionE :332 (in QuartzCore) 23 QuartzCore 0x000000018a6dbf24 ZN2CA7Context18commit_transactionEPNS_11TransactionE :336 (in QuartzCore) 24 QuartzCore 0x000000018a702340 ZN2CA11Transaction6commitEv :540 (in QuartzCore) 25 QuartzCore 0x000000018a6570d4 ZN2CA7Display11DisplayLink14dispatchitemsEyyy :928 (in QuartzCore) 26 IOKit 0x00000001869f630c 0x00000001869f0000 + 25356 27 CoreFoundation 0x000000018671a080 CFMachPortPerform :188 (in CoreFoundation) 28 CoreFoundation 0x00000001867349dc _CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION_ :56 (in CoreFoundation) 29 CoreFoundation 0x00000001867340e0 CFRunLoopDoSource1 :440 (in CoreFoundation) 30 CoreFoundation 0x0000000186731bb4 ___CFRunLoopRun :2196 (in CoreFoundation) 31 CoreFoundation 0x00000001866522d8 _CFRunLoopRunSpecific :436 (in CoreFoundation) 32 GraphicsServices 0x00000001884e3f84 _GSEventRunModal :100 (in GraphicsServices) 33 UIKit 0x000000018fbfe880 _UIApplicationMain :208 (in UIKit)

hannahmbanana commented 7 years ago

Thank you for including the stack traces. Could you share any other details on what you've observed? Have you ever reproduced this crash locally? Is it only a few logs from production or does it happen regularly?

I see there have been a few changes to the background deallocation system recently and it's possible that one of these could have fixed this. Consider upgrading to Texture 2.5 to see if that resolves the issue.