Steps to reproduce
1.Run a Flutter app on a Vulkan-enabled Android / Linux device with Impeller (e.g. --enable-impeller).
2.Repeatedly start and kill the app (or rapidly tear down the FlutterEngine / ContextVK).
3.Observe occasional native crashes during shutdown.
This is a teardown-time race; reproduction is timing-dependent but is reliably hit on lower-end devices under memory pressure or fast app-restart loops.
This is the same class of lifetime bug as #166725 ("[Impeller] keep device
holder and allocator alive until last vk image is destroyed"), but on the
command pool teardown path which was not touched in that PR.
Expected results
The application shuts down cleanly. vkDestroyCommandPool / vkFreeCommandBuffers should never be issued through a VkDevice that has already been destroyed.
Actual results
#00 vkFreeCommandBuffers+28 /system/lib64/libvulkan.so
#1 impeller::BackgroundCommandPoolVK::~BackgroundCommandPoolVK()
[inlined: impeller::CommandPoolRecyclerVK::Reclaim(
vk::UniqueHandle<vk::CommandPool, ...>&&,
std::vector<vk::UniqueHandle<vk::CommandBuffer, ...>>&&, bool)]
impeller/renderer/backend/vulkan/command_pool_vk.cc
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
Flutter Doctor output
Doctor output
Steps to reproduce
1.Run a Flutter app on a Vulkan-enabled Android / Linux device with Impeller (e.g. --enable-impeller).
2.Repeatedly start and kill the app (or rapidly tear down the FlutterEngine / ContextVK).
3.Observe occasional native crashes during shutdown.
This is a teardown-time race; reproduction is timing-dependent but is reliably hit on lower-end devices under memory pressure or fast app-restart loops.
This is the same class of lifetime bug as #166725 ("[Impeller] keep device
holder and allocator alive until last vk image is destroyed"), but on the
command pool teardown path which was not touched in that PR.
Expected results
The application shuts down cleanly. vkDestroyCommandPool / vkFreeCommandBuffers should never be issued through a VkDevice that has already been destroyed.
Actual results
#00 vkFreeCommandBuffers+28 /system/lib64/libvulkan.so
#1 impeller::BackgroundCommandPoolVK::~BackgroundCommandPoolVK()
[inlined: impeller::CommandPoolRecyclerVK::Reclaim(
vk::UniqueHandle<vk::CommandPool, ...>&&,
std::vector<vk::UniqueHandle<vk::CommandBuffer, ...>>&&, bool)]
impeller/renderer/backend/vulkan/command_pool_vk.cc
Code sample
Code sample
[Paste your code here]Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]