Skip to content
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

App get crashed while interacting with scrollview - PanModal. #197

Open
parasjoshicasting opened this issue May 10, 2023 · 1 comment
Open

Comments

@parasjoshicasting
Copy link

Hi,

Is anyone facing any crash issues with the method didPanOnScrollView of the class PanModalPresentationController?
Here are the crash logs with some lines where we can identify the reason.

UIKitCore 0x1c79a0 -[UIScrollView setContentOffset:animated:animationCurve:animationAdjustsForContentOffsetDelta:animation:animationConfigurator:] + 824
0x2574ec PanModalPresentationController.didPanOnScrollView(
:change:) + 732 (PanModalPresentationController.swift:732)
0x257350 closure #1 in PanModalPresentationController.observe(scrollView:) + 4299109200 (:4299109200)

Kindly let me know if anyone facing the issue or has any idea about that.

Thank you

@Brandon-T
Copy link

Brandon-T commented Jun 1, 2023

Just got the same crash but I have a stack trace:

PanModalPresentationController calls didPanOnScrollView which calls haltScrolling which modifies contentOffset when it calls scrollView.setContentOffset(CGPoint(x: 0, y: scrollViewYOffset), animated: false) which then in turn, calls the observer which calls didPanOnScrollView.

TLDR: didPanOnScrollView -> haltScrolling -> scrollView.setContentOffset -> didPanOnScrollView -> haltScrolling -> scrollView.setContentOffset -> didPanOnScrollView -> .........

Infinite recursion -> stack overflow -> crash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants