rive-app / rive-app/rive-android
Crash !!! Caused by app.rive.runtime.kotlin.core.errors.RiveException Accessing disposed C++ object FallbackAssetLoader.
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 538
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
Caused by app.rive.runtime.kotlin.core.errors.RiveException
Accessing disposed C++ object FallbackAssetLoader.
--- Stack Trace for NativeObject Dispose ---.
app.rive.runtime.kotlin.core.NativeObject.dispose (NativeObject.kt:145)
app.rive.runtime.kotlin.core.NativeObject.release (NativeObject.kt:126)
app.rive.runtime.kotlin.RiveViewLifecycleObserver.onDestroy (RiveAnimationView.kt:1108)
androidx.lifecycle.DefaultLifecycleObserverAdapter.onStateChanged (DefaultLifecycleObserverAdapter.kt:29)
androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent (LifecycleRegistry.jvm.kt:313)
androidx.lifecycle.LifecycleRegistry.backwardPass (LifecycleRegistry.jvm.kt:266)
androidx.lifecycle.LifecycleRegistry.sync (LifecycleRegistry.jvm.kt:284)
androidx.lifecycle.LifecycleRegistry.moveToState (LifecycleRegistry.jvm.kt:135)
androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent (LifecycleRegistry.jvm.kt:119)
androidx.lifecycle.ReportFragment$Companion.dispatch$lifecycle_runtime_release (ReportFragment.android.kt:181)
androidx.lifecycle.ReportFragment$LifecycleCallbacks.onActivityPreDestroyed (ReportFragment.android.kt:137)
android.app.Activity.dispatchActivityPreDestroyed (Activity.java:1579)
android.app.Activity.performDestroy (Activity.java:8360)
android.app.Instrumentation.callActivityOnDestroy (Instrumentation.java:1394)
android.app.ActivityThread.performDestroyActivity (ActivityThread.java:5465)
android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:5509)
android.app.servertransaction.DestroyActivityItem.execute (DestroyActivityItem.java:44)
android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2319)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loop (Looper.java:257)
android.app.ActivityThread.main (ActivityThread.java:8218)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:626)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1016)
--- Current Stack Trace ---.
app.rive.runtime.kotlin.core.NativeObject.getCppPointer (NativeObject.kt:55)
app.rive.runtime.kotlin.core.FileAssetLoader.setRendererType (FileAssetLoader.kt:36)
app.rive.runtime.kotlin.core.File. (File.kt:35)
app.rive.runtime.kotlin.RiveAnimationView.loadFileFromResource (RiveAnimationView.kt:435)
app.rive.runtime.kotlin.RiveAnimationView.onAttachedToWindow (RiveAnimationView.kt:923)
android.view.View.dispatchAttachedToWindow (View.java:20704)
android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3548)
android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3548)
android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3548)
android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3548)
android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2708)
android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:2214)
android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:8686)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:1031)
android.view.Choreographer.doCallbacks (Choreographer.java:849)
android.view.Choreographer.doFrame (Choreographer.java:779)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1016)
android.os.Handler.handleCallback (Handler.java:938)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loop (Looper.java:257)
android.app.ActivityThread.main (ActivityThread.java:8218)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:626)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1016)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with NativeObject.kt:145 and RiveAnimationView.kt:1108 to trace disposal during the lifecycle, then compare it with FileAssetLoader.setRendererType in FileAssetLoader.kt:36 and File.kt:35. Reproduce the attach and destroy sequence around loadFileFromResource; done means the view can attach and be destroyed without the disposed-object exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100