rive-app / rive-app/rive-react-native
Crash on setting values on databinding instance when Referenced Assets change on iOS
Nobody has claimed this yet.
- 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
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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