callstack / callstack/react-native-pager-view

NSInternalInconsistencyException crashes in 5.4.15

Đang mở
#545 16 bình luận 3 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
3.4k
Fork
476
Merge trung bình
10 ngày 21 giờ
Pull request đã merge (30 ngày)
2

Mô tả

## Environment

"react-native-pager-view": "5.4.15",
"react-native": "0.66.4",

## Description

I saw that https://github.com/callstack/react-native-pager-view/releases/tag/v5.4.15 contained a fix for NSInternalInconsistencyException however I'm still getting production crash reports.

Looks like another user here https://github.com/callstack/react-native-pager-view/pull/530#issuecomment-1096189299 is reporting the same issue.

## NSInternalInconsistencyException: Unexpected view controller

```
Hardware Model: iPhone14,5
Role: Foreground
OS Version: iOS 15.3.1

NSInternalInconsistencyException: Unexpected view controller:

0 CoreFoundation ___exceptionPreprocess
1 libobjc.A.dylib _objc_exception_throw
2 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
3 UIKitCore -[UIPageViewController queuingScrollView:willManuallyScroll:toRevealView:concealView:animated:]
4 UIKitCore -[_UIQueuingScrollView _notifyDelegateWillManuallyScroll:toRevealView:concealingView:animated:]
5 UIKitCore ___54-[_UIQueuingScrollView _didScrollWithAnimation:force:]_block_invoke
6 UIKitCore -[_UIQueuingScrollView _didScrollWithAnimation:force:]
7 UIKitCore -[_UIQueuingScrollView layoutSubviews]
8 UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
9 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*)
10 QuartzCore CA::Layer::layout_and_display_if_needed(CA::Transaction*)
11 QuartzCore CA::Context::commit_transaction(CA::Transaction*, double, double*)
12 QuartzCore CA::Transaction::commit()
13 QuartzCore CA::Transaction::flush_as_runloop_observer(bool)
14 UIKitCore __UIApplicationFlushCATransaction
15 UIKitCore __UIUpdateSequenceRun
16 UIKitCore _schedulerStepScheduledMainSection
17 UIKitCore _runloopSourceCallback
18 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
19 CoreFoundation ___CFRunLoopDoSource0
20 CoreFoundation ___CFRunLoopDoSources0
21 CoreFoundation ___CFRunLoopRun
22 CoreFoundation _CFRunLoopRunSpecific
23 GraphicsServices _GSEventRunModal
24 UIKitCore -[UIApplication _run]
25 UIKitCore _UIApplicationMain
```

## NSInternalInconsistencyException: Don't know about flushed view

https://stackoverflow.com/questions/42833765/assertion-failure-in-uipageviewcontroller
https://github.com/iospro/AMPageViewController

```
Hardware Model: iPhone9,3
Role: Foreground
OS Version: iOS 15.2.1

NSInternalInconsistencyException: Don't know about flushed view >

0 CoreFoundation ___exceptionPreprocess
1 libobjc.A.dylib _objc_exception_throw
2 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
3 UIKitCore -[UIPageViewController _flushViewController:animated:]
4 UIKitCore -[UIPageViewController queuingScrollView:didFlushView:animated:]
5 UIKitCore -[_UIQueuingScrollView _flushView:animated:]
6 UIKitCore -[_UIQueuingScrollView _replaceViews:updatingContents:adjustContentInsets:animated:]
7 UIKitCore -[_UIQueuingScrollView _didScrollWithAnimation:force:]
8 UIKitCore -[_UIQueuingScrollView layoutSubviews]
9 UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
10 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*)
11 QuartzCore CA::Layer::layout_and_display_if_needed(CA::Transaction*)
12 QuartzCore CA::Context::commit_transaction(CA::Transaction*, double, double*)
13 QuartzCore CA::Transaction::commit()
14 QuartzCore CA::Transaction::flush_as_runloop_observer(bool)
15 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
16 CoreFoundation ___CFRunLoopDoObservers
17 CoreFoundation ___CFRunLoopRun
18 CoreFoundation _CFRunLoopRunSpecific
19 GraphicsServices _GSEventRunModal
20 UIKitCore -[UIApplication _run]
21 UIKitCore _UIApplicationMain
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Xem xét bản sửa lỗi của bản phát hành v5.4.15 và cuộc thảo luận trong PR #530, sau đó so sánh chúng với hai crash trace của iOS liên quan đến UIPageViewController. Nếu có thể, hãy tái hiện các lỗi trên các phiên bản React Native và iOS được liệt kê; công việc được xem là hoàn tất khi đã xác định và ngăn chặn cả hai crash assertion được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
ios, react-native
Lĩnh vực
mobile-dev
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.