Skip to content

fix(ios): serialize RiveFactory decode calls to prevent EXC_BAD_ACCESS (#225)#266

Open
mfazekas wants to merge 2 commits into
mainfrom
chore/upgrade-rive-ios-6.20.4
Open

fix(ios): serialize RiveFactory decode calls to prevent EXC_BAD_ACCESS (#225)#266
mfazekas wants to merge 2 commits into
mainfrom
chore/upgrade-rive-ios-6.20.4

Conversation

@mfazekas
Copy link
Copy Markdown
Collaborator

@mfazekas mfazekas commented May 20, 2026

Fixes #225.

RiveFactory.decodeImage/decodeFont/decodeAudio are not thread-safe — calling them concurrently from DispatchQueue.global causes EXC_BAD_ACCESS in rive::gpu::RenderContext::decodeImage. Replaced with a dedicated serial queue.

Also upgrades rive-ios SDK from 6.18.2 to 6.20.4.

Verified with the Issue225.tsx reproducer: crashed within ~5 cycles before the fix, survived 57+ cycles after.

mfazekas added 2 commits May 20, 2026 08:55
Includes render context retain fix, race condition fixes, and concurrency improvements that should address #225.
#225)

RiveFactory.decodeImage/decodeFont/decodeAudio are not thread-safe. Using DispatchQueue.global (concurrent) caused crashes when multiple assets decoded simultaneously. Replaced with a dedicated serial queue.
@mfazekas mfazekas changed the title chore(ios): upgrade rive-ios SDK from 6.18.2 to 6.20.4 fix(ios): serialize RiveFactory decode calls to prevent EXC_BAD_ACCESS (#225) May 20, 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

1 participant