forked from androidx/androidx
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Skia context usage a critical section on iOS. #896
Merged
Conversation
This file contains 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
elijah-semyonov
changed the title
Make skia dispose a critical section on iOS.
Make Skia context usage a critical section on iOS.
Nov 6, 2023
igordmn
approved these changes
Nov 6, 2023
how should we test this? |
elijah-semyonov
added a commit
that referenced
this pull request
Nov 17, 2023
This reverts commit a985c43.
elijah-semyonov
added a commit
that referenced
this pull request
Nov 17, 2023
## Proposed Changes Using Skia context in multiple threads simultaneously leads to occasional unreproducable crashes on users' side. Roll back experimental #896. Disable the path for encoding rendering commands on a separate thread until the scenario is resolved and underlying issue is fixed. ## Testing Test: N/A ## Issues Fixed Fixes: JetBrains/compose-multiplatform#3862
igordmn
pushed a commit
that referenced
this pull request
Nov 20, 2023
## Proposed Changes Using Skia context in multiple threads simultaneously leads to occasional unreproducable crashes on users' side. Roll back experimental #896. Disable the path for encoding rendering commands on a separate thread until the scenario is resolved and underlying issue is fixed. ## Testing Test: N/A ## Issues Fixed Fixes: JetBrains/compose-multiplatform#3862
mazunin-v-jb
pushed a commit
that referenced
this pull request
Dec 7, 2023
## Proposed Changes Since there are no reliable repros, it's a speculative fix for [the crash](JetBrains/compose-multiplatform#3862) on iOS. It's based on an assumption that the case for the crash is caused by render command encoding in a separate thread being performed after (or in parallel) with the context disposal on the main thread which leads to incorrect state inside Skia. ## Testing Test: see if issues persists. ## Issues Fixed Fixes: JetBrains/compose-multiplatform#3862 ## Note Skia is supposed to handle internal resources based on reference counting and assumed scenario shouldn't lead to the crash, since the context should be indirectly retained by the moment encoding starts. Revert if issue persists because that logic would be redundant.
mazunin-v-jb
pushed a commit
that referenced
this pull request
Dec 7, 2023
## Proposed Changes Using Skia context in multiple threads simultaneously leads to occasional unreproducable crashes on users' side. Roll back experimental #896. Disable the path for encoding rendering commands on a separate thread until the scenario is resolved and underlying issue is fixed. ## Testing Test: N/A ## Issues Fixed Fixes: JetBrains/compose-multiplatform#3862
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.
Proposed Changes
Since there are no reliable repros, it's a speculative fix for the crash on iOS.
It's based on an assumption that the case for the crash is caused by render command encoding in a separate thread being performed after (or in parallel) with the context disposal on the main thread which leads to incorrect state inside Skia.
Testing
Test: see if issues persists.
Issues Fixed
Fixes: JetBrains/compose-multiplatform#3862
Note
Skia is supposed to handle internal resources based on reference counting and assumed scenario shouldn't lead to the crash, since the context should be indirectly retained by the moment encoding starts.
Revert if issue persists because that logic would be redundant.