Skip to content

[CP-beta][Impeller] Wait for the Vulkan device to become idle before destroying Vulkan objects in the AHBSwapchainImplVK destructor#188519

Closed
flutteractionsbot wants to merge 1 commit into
flutter:flutter-3.45-candidate.0from
flutteractionsbot:cp-beta-145475453cbe3bf25a6687c49eee3e4c691524c9
Closed

[CP-beta][Impeller] Wait for the Vulkan device to become idle before destroying Vulkan objects in the AHBSwapchainImplVK destructor#188519
flutteractionsbot wants to merge 1 commit into
flutter:flutter-3.45-candidate.0from
flutteractionsbot:cp-beta-145475453cbe3bf25a6687c49eee3e4c691524c9

Conversation

@flutteractionsbot

@flutteractionsbot flutteractionsbot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Issue Link:

#187237

Impact Description:

This can cause a crash on Impeller/Vulkan during app lifecycle events (shutdown/rotation/etc.) when using HCPP/AHBSwapchain.

Changelog Description:

[flutter/187237] Fixes a crash that can happen during app shutdown or rotation on some Android devices using Impeller/Vulkan with HCPP.

Workaround:

Disable Impeller or use the Impeller GLES back end

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

Run the AndroidAHBSwapchainTest.AHBSwapchainDtorCallsWaitIdle unit test. Or try reproducing the crash in the #187237 example app and verifying that it is fixed.

…g Vulkan objects in the AHBSwapchainImplVK destructor (flutter#187477)

AHBSwapchainImplVK holds Vulkan objects such as fences that may be used
by operations submitted to the Vulkan device. The AHBSwapchainImplVK
destructor must wait until the device is no longer using these objects
before destroying them.

Fixes flutter#187237
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Jun 24, 2026
@flutteractionsbot

Copy link
Copy Markdown
Contributor Author

@jason-simmons please fill out the PR description above, afterwards the release team will review this request.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 24, 2026
@flutter-dashboard

Copy link
Copy Markdown

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Jun 24, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request ensures that the Vulkan device is idle before destroying objects by calling a new WaitIdle method in the destructor of AHBSwapchainImplVK, and adds a corresponding unit test. The review feedback recommends logging vkDeviceWaitIdle failures as ERROR instead of INFO to properly reflect the severity of the failure according to the Google C++ Style Guide.

@jason-simmons jason-simmons requested a review from gaaclarke June 24, 2026 22:14
@walley892

walley892 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

We cut the new beta branch, 3.46 yesterday - closing this cherry pick. Will re-open against 3.46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD cp: review Cherry-picks in the review queue e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants