-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Description
We are experiencing a reproducible crash on iOS related to Metal validation when using rive-react-native. The crash occurs on the main thread during rendering and appears to originate from RiveRuntime’s Metal render path.
The crash is triggered by a Metal assertion failure during drawIndexedPrimitives, eventually calling abort().
Provide a Repro
- Run the app on iOS Simulator DEBUG
- App crashes on first launch only, during initial render
- Relaunch the app without reinstalling is OK
Expected behavior
Rive animations should render without triggering Metal validation errors or aborting the app.
Additional context
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ??? 0x1000daae0 ???
1 ??? 0x106c2df4c ???
2 libsystem_pthread.dylib 0x1256e7b66 pthread_kill + 259
3 libsystem_c.dylib 0x1221f296e abort + 134
4 libsystem_c.dylib 0x1221f1b66 __assert_rtn + 314
5 Metal 0x11a1a4e7e MTLReportFailure.cold.1 + 41
6 Metal 0x11a1779b6 MTLReportFailure + 512
7 Metal 0x11a16b3b2 _MTLMessageContextEnd + 1294
8 MetalTools 0x136f7e8ec -[MTLDebugRenderCommandEncoder validateCommonDrawErrors:] + 2712
9 MetalTools 0x136f7dd50 -[MTLDebugRenderCommandEncoder validateCommonDrawErrors:instanceCount:baseInstance:maxVertexID:] + 1305
10 MetalTools 0x136f7f4e7 -[MTLDebugRenderCommandEncoder validateDrawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:function:] + 314
11 MetalTools 0x136f7f5b5 -[MTLDebugRenderCommandEncoder drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:] + 71
12 GPUToolsCapture 0x1098795ea -[CaptureMTLRenderCommandEncoder drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:] + 198
13 RiveRuntime 0x11b58ee51 rive::gpu::RenderContextMetalImpl::flush(rive::gpu::FlushDescriptor const&) + 7393
14 RiveRuntime 0x11b5884a3 rive::gpu::RenderContext::flush(rive::gpu::RenderContext::FlushResources const&) + 7715
15 RiveRuntime 0x11b2e53e8 -[RiveRendererContext endFrame:withCompletion:] + 156
16 RiveRuntime 0x11b2dd1a5 -[RiveRendererView drawInRect:withCompletion:] + 454
17 RiveRuntime 0x11b2dd29b -[RiveRendererView drawRect:] + 104
18 RiveRuntime 0x11b2f281b 0x11b2da000 + 100379
19 MetalKit 0x1097bbaf3 -[MTKView draw] + 142
20 MetalKit 0x1097b7e99 -[MTKViewDisplayLinkTarget draw] + 34
21 QuartzCore 0x11b8054cd CA::Display::DisplayLinkItem::dispatch_ + 45
22 QuartzCore 0x11b801027 CA::Display::DisplayLink::dispatch_items + 1029
23 QuartzCore 0x11b80828a CA::Display::DisplayLink::dispatch_deferred_display_links + 368
24 UIKitCore 0x15b935bf7 _UIUpdateSequenceRun + 55
25 UIKitCore 0x15c6a3eed schedulerStepScheduledMainSection + 184
26 UIKitCore 0x15c6a3027 runloopSourceCallback + 68
27 CoreFoundation 0x124ccaff8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
28 CoreFoundation 0x124ccaf3a __CFRunLoopDoSource0 + 157
29 CoreFoundation 0x124cca78f __CFRunLoopDoSources0 + 311
30 CoreFoundation 0x124cc4f9a __CFRunLoopRun + 973
31 CoreFoundation 0x124cc47c5 CFRunLoopRunSpecific + 536
32 GraphicsServices 0x1336bdc09 GSEventRunModal + 137
33 UIKitCore 0x15c7bf248 -[UIApplication _run] + 875
34 UIKitCore 0x15c7c43cf UIApplicationMain + 123
Device & Versions
- Device: iOS 18.6 simulator
- React Native: 0.81.4
- rive-react-native: 9.7.1, 9.8.0
Metadata
Metadata
Assignees
Labels
No labels