diff --git a/interfaces/ImsdMessages.Ui-App.cppm b/interfaces/ImsdMessages.Ui-App.cppm index 2fcc9ad..25d8515 100644 --- a/interfaces/ImsdMessages.Ui-App.cppm +++ b/interfaces/ImsdMessages.Ui-App.cppm @@ -74,6 +74,10 @@ export namespace ImsdMessages::Ui { day.reset(); frames.reset(); canvas.reset(); + // The library queues a window's buffers, shaders and pipelines + // for deletion; with no window left no frame frees them, and + // the device is idle here. + Crafter::Device::DrainDeletions(); gestures = GestureDetector{}; hits.clear(); hitKeys.clear(); @@ -167,10 +171,13 @@ export namespace ImsdMessages::Ui { // No display, a compositor without a global the library // needs, no Vulkan device: the library throws, and the app // has no window. It says so and runs on without one — a - // resident instance keeps importing; a later Show fails at - // once with the same reason, the device's set-up running - // only once. + // resident instance keeps importing. A later Show fails at + // once with the same reason when the device's set-up failed + // (it runs only once), and tries again past it (an asset + // missing): what the failed Create queued is drained here, + // as Teardown drains, since no frame will. canvas.reset(); + Crafter::Device::DrainDeletions(); Log(std::format("no window: {}", e.what())); return; }