Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@johnmccutchan
Copy link
Contributor

The following sequence of events would lead to a crash:

  • Reader A is created.
  • Reader A produces a frame (A0)
  • Texture is resized.
  • Reader B is created and reader A is scheduled to be closed.
  • Reader A produces a frame (A1). This is skipped.
  • Reader A is closed.
  • Frame A0 is acquired.

Because we closed Reader A the frame A0 is invalid.

The fix is to not close Reader A when it is the last reader to produce a frame.

Fixes internal bug b/318458306

The following sequence of events would lead to a crash:

- Reader A is created.
- Reader A produces a frame (A0)
- Texture is resized.
- Reader B is created and reader A is scheduled to be closed.
- Reader A produces a frame (A1). This is skipped.
- Reader A is closed.
- Frame A0 is acquired.

Because we closed Reader A the frame A0 is invalid.

The fix is to not close Reader A when it is the last reader to produce a frame.

Fixes internal bug b/318458306
@johnmccutchan johnmccutchan requested a review from gmackall January 3, 2024 17:46
@johnmccutchan johnmccutchan added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 3, 2024
@johnmccutchan johnmccutchan removed the request for review from matanlurey January 3, 2024 17:54
Copy link
Member

@gmackall gmackall left a comment

Choose a reason for hiding this comment

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

LGTM

@johnmccutchan johnmccutchan merged commit bf979d2 into flutter:main Jan 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants