inaturalist / react-native-inat-camera

React Native package that provides a camera with optional species recognition.
MIT License
10 stars 6 forks source link

Crash in INatCameraView.onLayout #30

Closed albullington closed 4 years ago

albullington commented 4 years ago

There's a crash that has affected 270 users to date (mostly on Samsung Galaxy devices). The crash log says this is happening in the INatCameraView.onLayout method.

Here's the Logcat file for this crash.

And also, here are a few additional descriptions of the crash from Google Play:

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
FATAL EXCEPTION: main
Process: org.inaturalist.seek, PID: 13094
java.lang.IllegalStateException: 
  at android.app.FragmentManagerImpl.checkStateLoss (FragmentManager.java:1870)
  at android.app.FragmentManagerImpl.enqueueAction (FragmentManager.java:1893)
  at android.app.BackStackRecord.commitInternal (BackStackRecord.java:688)
  at android.app.BackStackRecord.commit (BackStackRecord.java:646)
  at org.inaturalist.inatcamera.nativecamera.INatCameraView.onLayout (INatCameraView.java:144)
  at android.view.View.layout (View.java:20857)
  at android.view.ViewGroup.layout (ViewGroup.java:6401)
  at com.facebook.react.uimanager.NativeViewHierarchyManager.updateLayout (NativeViewHierarchyManager.java:251)
  at com.facebook.react.uimanager.NativeViewHierarchyManager.updateLayout (NativeViewHierarchyManager.java:219)
  at com.facebook.react.uimanager.UIViewOperationQueue$UpdateLayoutOperation.execute (UIViewOperationQueue.java:154)
  at com.facebook.react.uimanager.UIViewOperationQueue$1.run (UIViewOperationQueue.java:779)
  at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches (UIViewOperationQueue.java:888)
  at com.facebook.react.uimanager.UIViewOperationQueue.access$2200 (UIViewOperationQueue.java:42)
  at com.facebook.react.uimanager.UIViewOperationQueue$2.runGuarded (UIViewOperationQueue.java:846)
  at com.facebook.react.bridge.GuardedRunnable.run (GuardedRunnable.java:29)
  at android.os.Handler.handleCallback (Handler.java:789)
  at android.os.Handler.dispatchMessage (Handler.java:98)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:6944)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
albullington commented 4 years ago

Closing since this library is being completely rewritten.