fix(ios): serialize RiveFactory decode calls to prevent EXC_BAD_ACCESS (#225)#266
Open
mfazekas wants to merge 2 commits into
Open
fix(ios): serialize RiveFactory decode calls to prevent EXC_BAD_ACCESS (#225)#266mfazekas wants to merge 2 commits into
mfazekas wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #225.
RiveFactory.decodeImage/decodeFont/decodeAudioare not thread-safe — calling them concurrently fromDispatchQueue.globalcausesEXC_BAD_ACCESSinrive::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.tsxreproducer: crashed within ~5 cycles before the fix, survived 57+ cycles after.