Skip to content

Crash on proxy method "setContentOffset" #74

@andymedvedev

Description

@andymedvedev

Hello, i cant reproduce constantly crash but sometimes it happens and i dont know why. It start crashing after we add library to project. I make exception breakpoint and it shows that it crashes on swizzled method pb_setContentOffset:

2018-09-14 15:22:30.361572+0700 TestApp[78861:15083844] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UILayoutGuide nsli_engineToUserScalingCoefficients]: unrecognized selector sent to instance 0x6040005bf3a0'

First throw call stack:
(
0 CoreFoundation 0x0000000110a881e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000010fcd4031 objc_exception_throw + 48
2 CoreFoundation 0x0000000110b09784 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 UIKit 0x000000010e31f0e2 -[UILayoutGuide forwardInvocation:] + 95
4 CoreFoundation 0x0000000110a0a5f8 __forwarding__ + 760
5 CoreFoundation 0x0000000110a0a278 _CF_forwarding_prep_0 + 120
6 Foundation 0x000000010f83d7b1 -[NSLayoutAnchor nsli_lowerIntoExpression:withCoefficient:forConstraint:] + 275
7 Foundation 0x000000010f7029a5 -[NSLayoutConstraint _lowerIntoExpression:reportingConstantIsRounded:] + 99
8 Foundation 0x000000010f707fc0 -[NSLayoutConstraint _containerGeometryDidChange] + 88
9 UIKit 0x000000010d58c10b -[UIView(Geometry) setBounds:] + 2516
10 UIKit 0x000000010d5b58aa -[UIScrollView setBounds:] + 1140
11 UIKit 0x000000010d5b6b09 -[UIScrollView setContentOffset:] + 438
12 UIScrollView_InfiniteScroll 0x000000010f6716ef -[UIScrollView(InfiniteScroll) pb_setContentOffset:] + 63
13 UIKit 0x000000010d5d9a83 -[UIScrollView(UIScrollViewInternal) _adjustContentOffsetIfNecessary] + 53
14 UIKit 0x000000010d5d2cd0 -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:tramplingDragFlags:] + 462
15 UIKit 0x000000010d5b8565 -[UIScrollView removeFromSuperview] + 32
16 UIKit 0x000000010d577c07 -[UIView dealloc] + 508
17 UIKit 0x000000010d67947c -[UIViewController dealloc] + 665
18 CoreFoundation 0x00000001109c03dd -[__NSArrayI dealloc] + 61
19 libobjc.A.dylib 0x000000010fce8a6e _ZN11objc_object17sidetable_releaseEb + 202
20 UIKit 0x000000010d6ac398 _destroy_helper_block.538 + 31
21 libsystem_blocks.dylib 0x00000001131f998a _Block_release + 111
22 libsystem_blocks.dylib 0x00000001131f998a _Block_release + 111
23 UIKit 0x000000010d6c3976 _destroy_helper_block.1809 + 19
24 libsystem_blocks.dylib 0x00000001131f998a _Block_release + 111
25 UIKit 0x000000010d6c58d9 -[UINavigationController _startDeferredTransitionIfNeeded:] + 1569
26 UIKit 0x000000010d6c686c -[UINavigationController __viewWillLayoutSubviews] + 150
27 UIKit 0x000000010d91ed0b -[UILayoutContainerView layoutSubviews] + 231
28 UIKit 0x000000010d5a87a8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1515
29 QuartzCore 0x000000011197b456 -[CALayer layoutSublayers] + 177
30 QuartzCore 0x000000011197f667 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
31 QuartzCore 0x00000001119060fb _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 343
32 QuartzCore 0x000000011193379c _ZN2CA11Transaction6commitEv + 568
33 UIKit 0x000000010d4d32ef _UIApplicationFlushRunLoopCATransactionIfTooLate + 167
34 UIKit 0x000000010de38662 __handleEventQueueInternal + 6875
35 CoreFoundation 0x0000000110a2abb1 _CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION_ + 17
36 CoreFoundation 0x0000000110a0f4af __CFRunLoopDoSources0 + 271
37 CoreFoundation 0x0000000110a0ea6f __CFRunLoopRun + 1263
38 CoreFoundation 0x0000000110a0e30b CFRunLoopRunSpecific + 635
39 GraphicsServices 0x000000011792ba73 GSEventRunModal + 62
40 UIKit 0x000000010d4d9057 UIApplicationMain + 159
41 Betolimp 0x000000010b924e57 main + 55
42 libdyld.dylib 0x0000000113187955 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions