Description
The app crashes on a physical iPhone 11 when using two concurrent RiveViewModel instances (background + icon) and interacting with play/visibility. The crash is easier to reproduce on the first install run, and when the app is run without the Xcode debugger attached.
Environment
- Device: iPhone 11 (physical device, iOS 16.4)
- Rive:
RiveRuntime 6.17.0 (CocoaPods)
- Minimum iOS: 15.0
- Integration:
@_spi(RiveExperimental) import RiveRuntime
- Xcode: Xcode 16.2 (16C5032a)
Steps to reproduce
- Build and install the minimal demo on iPhone 11 (see reproduction project below).
- Launch the app.
- Tap Play Both (starts playback on small button; large button only if visible).
- Tap Toggle Large Visible repeatedly.
- Optional but reported as more reliable: disconnect from Xcode (run app standalone), then repeat steps 3–4.
Observed behavior
- Crash occurs (intermittent in UI, but reliable when reproducing under certain conditions).
- In our testing: crash often happens the first time after tapping Play Both; subsequent launches may work until a clean install / clean build cycle.
- Uninstalling the app, cleaning the Xcode build, and repeating the steps can make the crash reappear.
- Running without the debugger attached makes the crash more likely (always crashes in our scenario).
Expected behavior
No crash when playing/pausing multiple RiveViewModel instances and toggling view visibility.
Minimal reproduction
We prepared a small standalone iOS demo that only contains:
- Two
VitanaChatButton views, each with:
- One
RiveViewModel for a full-background .riv
- One
RiveViewModel for an icon .riv
RiveViewModel(fileName:…, autoPlay: false), views created with createRiveView()
- Heavy setup deferred with
DispatchQueue.main.async from didMoveToWindow
play() / pause() on both view models
**Repository **: https://github.com/wanqingrongruo/rive-crash-demo
Additional notes
- Please let us know if
RiveExperimental SPI or the deferred didMoveToWindow setup is relevant; we can simplify the demo further if needed.
- Crash log / backtrace: I will attach a symbolicated crash report and/or Xcode organizer crash in a follow-up comment.
Attachments
IMG_5197.MOV.zip
Description
The app crashes on a physical iPhone 11 when using two concurrent
RiveViewModelinstances (background + icon) and interacting with play/visibility. The crash is easier to reproduce on the first install run, and when the app is run without the Xcode debugger attached.Environment
RiveRuntime6.17.0 (CocoaPods)@_spi(RiveExperimental) import RiveRuntimeSteps to reproduce
Observed behavior
Expected behavior
No crash when playing/pausing multiple
RiveViewModelinstances and toggling view visibility.Minimal reproduction
We prepared a small standalone iOS demo that only contains:
VitanaChatButtonviews, each with:RiveViewModelfor a full-background.rivRiveViewModelfor an icon.rivRiveViewModel(fileName:…, autoPlay: false), views created withcreateRiveView()DispatchQueue.main.asyncfromdidMoveToWindowplay()/pause()on both view models**Repository **: https://github.com/wanqingrongruo/rive-crash-demo
Additional notes
RiveExperimentalSPI or the deferreddidMoveToWindowsetup is relevant; we can simplify the demo further if needed.Attachments
IMG_5197.MOV.zip