Repository navigation
Description
Description
On Windows with D3D12, a player that never renders any Rive content crashes when it quits. The player log ends normally
(PlayerConnection::Cleanup), then the process dies with an access violation (0xc0000005) in rive.dll at offset 0x13068.
It happens on every run. The same player started with -force-d3d11 exits normally.
Expected: the player exits cleanly whether or not Rive drew anything.
Reproduction steps
- Add the Rive Unity package to a project. The package loads rive.dll at startup even with no Rive content (its
BeforeSceneLoad hook callssetUnityLog). - Build a Windows player with a single empty scene: no RiveWidget, RivePanel or RenderQueue.
- Run it on D3D12 and close the window, or call
Application.Quit(). - The process exits with 0xC0000005, and the Windows Application log has an event 1000 for rive.dll at offset 0x13068.
Cause
From the disassembly of rive.dll 0.5.1 (no symbols ship). On kUnityGfxDeviceEventShutdown, the device-event callback
loads the D3D12 renderer's last render target and calls its GPU wait without checking it for null. The wait's first
access reads through that pointer:
180012727: cmp $0x1,%edx ; kUnityGfxDeviceEventShutdown
18001272a: je 1800127aa
...
1800127aa: mov 0x88(%rsi),%rcx ; last render target, null if none was ever created
1800127b1: call 180013050 ; the render target's GPU wait
...
180013068: mov 0x30(%rcx),%rax ; faults when rcx is null
The pointer at 0x88 is set only when a RenderQueue first renders into a texture, so a session that never drew Rive
reaches this call with null. A null check before the call would fix it.
We ran 0.5.1. In 0.5.2 and 0.5.3-canary.28 we checked the disassembly and found the same code (in the canary the load
is at 0x180012dca and the faulting read at 0x180013688).
Workaround
On D3D12, at BeforeSceneLoad, render one empty RenderQueue into a 1x1 RenderTexture (TextureHelper.Descriptor(1, 1))
so the renderer has a target at shutdown, and dispose the queue on Application.quitting. With that in place, players
that draw Rive and players that don't both exit cleanly.
Rive Unity package version
0.5.1
Unity version
6000.7.0b2
Target platform
Windows
Editor OS & version
Windows 11 (10.0.26200)
Additional context
- Graphics API: D3D12. NVIDIA GeForce RTX 5090, driver 32.0.16.1088.
- Development players, IL2CPP and Mono.
- The editor seems to hit the same crash on exit: our Windows event log has Unity.exe crashes at rive.dll+0x13068.
- [Bug] Unity Editor crashes on Windows when closing the editor #166 was an editor crash that needed Rive content in the scene; this one happens only without it. Crash on application exit in windows build #119 also crashed
on exit, with Rive panels in use; we can't tell whether it's the same bug.
Activity
damzobridge commentedon Oct 26, 2026
Thanks for the detailed report @TigerHix . The issue should now be addressed from
v0.5.3-canary.35onward. Please let us know if it fixes the issue on your end. Please feel free to reopen the issue if it's still happening on your end.You can install it using the package manager with: