Skip to content

Unity Editor Crashes on macOS using Rive SDK #116

@rubyknickerbocker

Description

@rubyknickerbocker

Unity Editor Crash on macOS Using Rive SDK (Confirmed Minimal Repro)

When using Rive assets in Unity, the Unity Editor regularly crashes on various actions. Sometimes it's when I hit play, sometimes it's when I hit stop, sometimes it's after 2-6 play cycles, sometimes it's just browsing the hierarchy or inspector. It seems to happen more frequently with more complex Rive files, but I have reproduced the issue with minimal files with one artboard, one state machine, and one animation.

I tried loading Rive assets only through runtime loading and not in the inspector, opening a new blank Unity project with only the Rive file, and while I can get the frequency down to once every ~10 minutes or so, the crashes keep happening. Not sure what's causing this, but crash logs suggest it's something render related with the Metal system mac Unity uses.

I'm attaching two .riv files (both have only one state machine and artboard, but one has multiple layers in the state machine), a crash log, and the .cs file I'm using to load in .riv files. I also tried adding them from the inspector originally, but I thought maybe that could be part of the issue so I started loading them from runtime instead.

Unity version: 6000.1.5f1
macOS version: Sequoia 15.4.1, Apple M4
Rive Unity Version: 0.3.6

Repro Steps:
Create new Unity project

Place buttontest.bytes (renamed .riv) in Assets/Resources/rive/

Add a scene with one GameObject that:

Loads the Rive file using File.Load() after two frames

Assigns it to a RiveWidget

Disposes the File on OnDisable

Press Play → Stop → Play repeatedly (~5x)

Unity Editor crashes with RenderContextMetalImpl::flush() in the stack trace

Notes:
Crash occurs with 1 artboard, 1 state machine, 1 animation

No events, no complex UI, no inspector-based assignment

Happens even when .bytes file is loaded safely via script

Does not happen consistently--sometimes takes many runs to get it to crash (but happens more often with more complex files)

bugReport.zip

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