rive-app / rive-app/rive-react-native

Crash on setting values on databinding instance when Referenced Assets change on iOS

Open
#342 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
TypeScript
Stars
783
Forks
81
Avg merge
3d 6h
Merged PRs (30d)
3

Description

Description

When running on iOS setting both a boolean property that is in a view model, and referenced assets, the app will crash when both of those types of properties are set via Button click. However if you only set one, there is no crash. This code does work however in React Native on Android.

It looks like the crash is an EXEC_BAD_ACCESS on the following line https://github.com/rive-app/rive-react-native/blob/main/ios/RiveReactNativeView.swift#L678

Provide a Repro

https://github.com/breakawaydata/rive-react-native-boolean-crash

Source .riv/.rev file

rive.zip

Expected behavior

I'd expect the app to not crash and set the properties

Device & Versions
  • Device: iOS Simulator
  • OS: iOS 18.4
  • NPM Version: 10.2.4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash with the linked breakawaydata/rive-react-native-boolean-crash project using the supplied rive.zip asset on the iOS simulator. Start at ios/RiveReactNativeView.swift line 678 and compare the cases that set only one property with the case that sets both. Done means the boolean and referenced asset properties can both be set from a button click without an iOS crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, swift, typescript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.