From db26339a5fa10c4b9eb271bc8c3e5358a45b8117 Mon Sep 17 00:00:00 2001 From: LeandroLP23 Date: Wed, 7 Oct 2026 10:53:33 +0200 Subject: [PATCH] fix(agc): release the current address space with the image mirrors ClearImageMirrors drops the mirror map before the device is destroyed, but the current address space in Spaces() still held its mirrors, so they were freed by the cache's static destructor from the driver's DLL detach, after the Vulkan driver was unloaded, and every exit crashed on Windows. The teardown now releases the current address space too. Co-Authored-By: Claude Opus 5.5 --- core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp b/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp index 1a1c8941e..48af3cf6b 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp @@ -1013,6 +1013,7 @@ void ClearImageMirrors(VkDevice device) { state.heapBytes = 0; state.device = VK_NULL_HANDLE; } + Spaces().current.store(nullptr); } ImportProbe ProbeImportWriteProtection(const Context& context) {