callstack / callstack/react-native-pager-view

NSInternalInconsistencyException crashes in 5.4.15

Abierto
#545 16 comentarios 3 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
3.4k
Forks
476
Merge medio
10 d 21 h
PR fusionados (30 d)
2

Descripción

## 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
```

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Revisa la corrección de la versión v5.4.15 y la discusión en PR #530, y compáralas después con los dos registros de fallos de iOS relacionados con UIPageViewController. Reproduce los fallos con las versiones indicadas de React Native e iOS si es posible; el trabajo estará terminado cuando se hayan identificado y prevenido ambos fallos por aserción reportados.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
ios, react-native
Área
mobile-dev
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.