Skip to content

fix(android): bump rive-android to 11.6.1 (fixes data-binding UAF crash)#312

Closed
mfazekas wants to merge 3 commits into
feat/use-viewmodel-instance-asyncfrom
fix/android-databinding-bump-rive-1161
Closed

fix(android): bump rive-android to 11.6.1 (fixes data-binding UAF crash)#312
mfazekas wants to merge 3 commits into
feat/use-viewmodel-instance-asyncfrom
fix/android-databinding-bump-rive-1161

Conversation

@mfazekas

@mfazekas mfazekas commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Bumps runtimeVersions.android 11.4.1 → 11.6.1 to fix the intermittent native SIGSEGV in test-harness-android (experimental backend).

Root cause is a single-threaded re-entrancy / iterator-invalidation use-after-free in rive::DataBindContainer::updateDataBinds (a bind that auto-binds a nested view model re-enters addDataBind/removeDataBind and invalidates the active iterator). Fixed upstream in rive-runtime #12649, shipped in rive-android 11.6.1 (11.4.1/11.5.0/11.6.0 are vulnerable). The experimental backend compiles + builds clean against 11.6.1 (no API changes needed).

Resolves the android-databinding-native-crash flake — see #308 for the full investigation.

mfazekas added 3 commits July 1, 2026 07:27
The sync useViewModelInstance creates instances via deprecated runtime
APIs that touch the Rive runtime on the JS thread. Add
useViewModelInstanceAsync built on the non-deprecated `*Async` APIs,
returning a { instance, isLoading, error } discriminated union (mirroring
useRiveFile), with cancellation/disposal on deps change + unmount and
onInit applied before the instance is exposed.

Keeps `required` parity (throws once resolved to null; undefined while
loading). The sync hook is marked @deprecated but left working for
backward compatibility. Migrates the example screens to the async hook.
…ty, not just the view ref

On the experimental iOS backend the ViewModel instance and its properties
resolve asynchronously a short time after the view's hybridRef is assigned.
The test read `getViewModelInstance().numberProperty('ypos')` immediately
after waiting only for the ref, so on slower CI runners the property was
occasionally still undefined, failing at `expect(ypos1).toBeDefined()`
(~1 in 4 runs). Reproduced deterministically: at ref-callback time the VMI
is null 40/40, becoming ready shortly after.

Poll with waitFor until the `ypos` property is available before sampling it,
for both the initial mount and the post-switch reconfigure.
@mfazekas

mfazekas commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded: #304 was rebased onto feat/rive-ios-experimental, which already carries rive-android 11.6.1 (via #313), so this direct bump is now a no-op. Closing.

@mfazekas mfazekas closed this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant