[Editor] Thumbnail generation race condition with concurrent duplicate builds on asset import
@nalathethird is already working on this.
Since Mar 6, 2026.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: Official Release
Version: master (comment dates back ~8 years; likely present since early editor builds)
Platform(s): All
Describe the Bug
GameStudioThumbnailService.Compile() contains a known-suspect Debugger.Break() left with the note:
"This case should not happen, but it happened to me once and could not reproduce."
It can be reliably triggered by importing multiple assets (meshes, textures, etc.) simultaneously. In the worst case it causes two thumbnail builds to run concurrently for the same asset, corrupting the continuation chain and causing thumbnails to silently fail to regenerate for the rest of the session.
A second independent path exists: if thumbnailCompiler.Compile() throws after the asset is marked as in-progress, ThumbnailBuilt never fires to clean up the entry. The asset is then permanently stuck as "in-progress" - every future refresh sets a continuation that is never consumed.
Steps to Reproduce
- Open the Editor in Debug mode (required for
Debugger.Breakto fire) - Import a model with multiple meshes/textures, or drag-drop several FBX/PNG assets at once
Debugger.Break()fires inGameStudioThumbnailService.Compile()(~line 141)
In release builds: thumbnails for some imported assets may silently fail to appear or regenerate.
Expected Behavior
Thumbnails generate correctly for all imported assets. No duplicate concurrent builds; no assets permanently stuck as in-progress.
Actual Behavior
A Debugger.Break() fires in debug mode. In both debug and release, imported assets can end up with missing or stale thumbnails that never recover within the session.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.