Skip to content

Crash! app.rive.runtime.kotlin.core.errors.RiveException: Accessing disposed C++ object RiveArtboardRenderer. #424

Open

Description

@YvgenTroshchiy

Steps to reproduce:
LazyColumn inside each row button with rive.
Quite fast scroll up/down for few seconds.

And we have get a this crash. We are trying to riveView?.pause()/stop - just in case. clear all references. by onRelease. listItem.onRelease = { } do dispose , don't do dispose but still get this crash.

AndroidRuntime                  E  FATAL EXCEPTION: Thread-15
                                   Process: com.letyco, PID: 27929
                                   java.lang.Throwable: 
                                   app.rive.runtime.kotlin.core.errors.RiveException: Accessing disposed C++ object RiveArtboardRenderer.
                                       app.rive.runtime.kotlin.core.NativeObject.getCppPointer(NativeObject.kt:55)
                                       app.rive.runtime.kotlin.renderers.Renderer.getWidth(Renderer.kt:215)
                                       app.rive.runtime.kotlin.renderers.RiveArtboardRenderer.resizeArtboard(RiveArtboardRenderer.kt:36)
                                       app.rive.runtime.kotlin.renderers.RiveArtboardRenderer.draw(RiveArtboardRenderer.kt:51)
InputDispatcher                 E  channel 'b67e987 com.letyco/com.letyco.MainActivity' ~ Channel is unrecoverably broken and will be disposed!

You can just create empty LazaColumn. So I've added just empty RiveAnimationView and there no crash and only I uncomment. resId = style.type.resId, I've got crash by fast scroll. I event disabled rive VM. so there only empty view.
Also trying dispose in many ways this view but still get the crash.

        AndroidView(
            modifier = modifier,
            factory = { context ->

                val riveView = RiveAnimationView(context).apply {
                    // setRiveResource(
                    //     resId = style.type.resId,
                    //     // fit = Fit.LAYOUT,
                    //     stateMachineName = "boost-animation",
                    //     autoplay = false,
                    //     autoBind = false,
                    // )
                    // riveController.init(this, model)
                }
                riveView

Activity

  1. added a commit that references this issue on Dec 8, 2025
  2. dabrosch commented on Dec 8, 2025

    @dabrosch

    I am seeing this same problem in 10.4.4 and would expect to see it in the latest version (which we cannot use quite yet in our project) because I think the problem is that the resize needs to be under the frame lock. I made a PR to do so: #429

    The issue for us is happening to 0.025% of production users, and I still haven't been able to repro the crash locally.

  3. added 2 commits that reference this issue on Dec 9, 2025
  4. dabrosch commented on Dec 9, 2025

    @dabrosch

    Here is my attempt at reproducing the crash, but it doesn't seem to repro: https://github.com/dabrosch/rive-android/tree/dabrosch/10.4.4-with-bug-demo

  5. YvgenTroshchiy commented on Dec 9, 2025

    @YvgenTroshchiy
    Author

    Hi, looks like you fixed it few days after my report.
    adb1852

  6. dabrosch commented on Dec 9, 2025

    @dabrosch

    Oh, interesting, that method of fixing it doesn't obtain a lock around the call, so theoretically it still could occur, but at least it would be a lot less likely to happen. Thanks for pointing that out.

  7. added 3 commits that reference this issue on Dec 10, 2025
  8. dabrosch commented on Jan 26, 2026

    @dabrosch

    I would like to see the proposed PR be merged as well to prevent threadlock or additional errors.

  9. tylernij commented on Feb 13, 2026

    @tylernij
    Contributor

    Hi all, thank you for including the PR, that is very valuable to us. We're aware of the issue and are working on getting it resolved. Thank you for your patience.

  10. tylernij commented on Mar 2, 2026

    @tylernij
    Contributor

    For confirmation, are we still getting this crash on the latest runtime version of Rive on Android?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions