I have a lot of crash from my production app but i can't reproduce it locally.
I'm not using compose, i'm using bottom navigation component with backstack saved for each entry using setRestoreState, i'm using Material Transition as well when switching screen...
Maybe not a Mapbox issue but a androidx lyfecycle issue using 2.8.3?
Fatal Exception: java.lang.IllegalStateException: State must be at least CREATED to move to DESTROYED, but was INITIALIZED in component com.mapbox.maps.plugin.lifecycle.ViewLifecycleOwner@180f36c
at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.jvm.kt:131)
at androidx.lifecycle.LifecycleRegistry.setCurrentState(LifecycleRegistry.jvm.kt:107)
at com.mapbox.maps.plugin.lifecycle.ViewLifecycleOwner.doOnAttached(ViewLifecycleOwner.kt:73)
at com.mapbox.maps.plugin.lifecycle.ViewLifecycleOwner.<init>(ViewLifecycleOwner.kt:60)
at com.mapbox.maps.plugin.lifecycle.MapboxLifecyclePluginImpl.registerLifecycleObserver(MapboxLifecyclePluginImpl.kt:30)
at com.mapbox.maps.plugin.MapPluginRegistry.onAttachedToWindow(MapPluginRegistry.kt:192)
at com.mapbox.maps.MapController.onAttachedToWindow$sdk_release(MapController.kt:373)
at com.mapbox.maps.MapView.onAttachedToWindow(MapView.kt:135)
at android.view.View.dispatchAttachedToWindow(View.java:21308)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4239)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4246)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4246)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4246)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4246)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4246)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4246)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4246)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4246)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4246)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4246)
at android.view.ViewGroup.addViewInner(ViewGroup.java:6001)
at android.view.ViewGroup.addView(ViewGroup.java:5777)
at android.view.ViewGroup.addView(ViewGroup.java:5717)
at android.view.ViewGroup.addView(ViewGroup.java:5690)
at android.view.ViewOverlay$OverlayViewGroup.add(ViewOverlay.java:208)
at android.view.ViewGroupOverlay.add(ViewGroupOverlay.java:72)
at androidx.transition.Visibility.onDisappear(Visibility.java:429)
at androidx.transition.Visibility.createAnimator(Visibility.java:254)
at androidx.transition.Transition.createAnimators(Transition.java:798)
at androidx.transition.TransitionSet.createAnimators(TransitionSet.java:476)
at androidx.transition.TransitionSet.createAnimators(TransitionSet.java:476)
at androidx.transition.Transition.playTransition(Transition.java:1934)
at androidx.transition.TransitionManager$MultiListener.onPreDraw(TransitionManager.java:300)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1102)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3311)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2201)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9000)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:996)
at android.view.Choreographer.doCallbacks(Choreographer.java:794)
at android.view.Choreographer.doFrame(Choreographer.java:729)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:981)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7948)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
Environment
Observed behavior and steps to reproduce
I have a lot of crash from my production app but i can't reproduce it locally. I'm not using compose, i'm using bottom navigation component with backstack saved for each entry using
setRestoreState
, i'm using Material Transition as well when switching screen... Maybe not a Mapbox issue but a androidx lyfecycle issue using 2.8.3?