Skip to content

Mark state-derived props nonisolated #679

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

Merged
merged 2 commits into from
Apr 21, 2025

Conversation

pblazej
Copy link
Contributor

@pblazej pblazej commented Apr 18, 2025

Resolves #678

Properties behind _state can be marked nonisolated to avoid crashes when accessed from bg threads (in a @MainActor-isolated video view).

Copy link

ilo-nanpa bot commented Apr 18, 2025

it seems like you haven't added any nanpa changeset files to this PR.

if this pull request includes changes to code, make sure to add a changeset, by writing a file to .nanpa/<unique-name>.kdl:

minor type="added" "Introduce frobnication algorithm"

refer to the manpage for more information.

@pblazej pblazej requested a review from hiroshihorie April 18, 2025 13:45
Copy link
Member

@hiroshihorie hiroshihorie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm ✅
Can you rerpo it ?

Copy link
Contributor

@ladvoc ladvoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@hiroshihorie hiroshihorie merged commit e5ba386 into main Apr 21, 2025
19 of 20 checks passed
@hiroshihorie hiroshihorie deleted the blaze/video-view-isolated-props branch April 21, 2025 04:14
hiroshihorie pushed a commit that referenced this pull request Apr 22, 2025
Resolves #678 

Follow-up of #679

I managed to reproduce the issue, steps:
- open example app on iPhone (non-sample buffer mode)
- join from e.g. macOS
- publish/unpublish camera track on mac

The diagnosis was correct - logs are coming via unsafe
`UIView`/`NSObject` territory, so main actor isolated props are listed
from bg threads. The last one was `isHidden`.

I also overrode the `description` string, just in case... for every
descendant of `NativeView` (that may inherit the description).

<img width="1483" alt="Screenshot 2025-04-22 at 10 40 14 AM"
src="https://github.com/user-attachments/assets/441d9bd8-6ecd-4b45-93b0-34517c6dab2b"
/>
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.

Crash in iOS 18.3.2 when another participant on/off video
3 participants