Repository navigation
Editor: the thumbnail device outlives the running thumbnail command (crashes on Vulkan) - #3465
Merged
Merged
Conversation
Closing a session disposed the thumbnail graphics device while a build thread was still inside a thumbnail command. On Vulkan that was an access violation in vkCreateImage on a destroyed device. The close path now awaits the running command without blocking the UI thread. Dispose never blocks: if a command still runs, the resources are destroyed when it ends.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Details
Closing a session disposed the thumbnail
GraphicsDevicewhile a build thread was still inside a thumbnail command.On Vulkan this is a use-after-free (access violation in
vkCreateImageon a destroyedVkDevice, seen on CI in the editor tests on Vulkan). Direct3D11 hides it because the native device is COM ref-counted.Fix
ThumbnailGeneratorcounts the running commands.Dispose()never blocks: if a command still runs, the resources are destroyed when the last one ends.IThumbnailService.StopAsync()refuses new commands and returns a task that completes when no command runs.GameStudioWindow.SaveAndClose()awaits it (10 s max) beforeSession.Destroy(), without blocking the UI thread.Shutdown(), so the tests exercise the real close path.Verification
Destroy()): without the fix, 18 commands fail and 6 never end afterDestroy(); with the fix, all commands succeed.Note:
IThumbnailServicegets a new member.