Skip to content

[Editor] Thumbnail generation race condition with concurrent duplicate builds on asset import #3083

@nalathethird

Description

@nalathethird

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

  1. Open the Editor in Debug mode (required for Debugger.Break to fire)
  2. Import a model with multiple meshes/textures, or drag-drop several FBX/PNG assets at once
  3. Debugger.Break() fires in GameStudioThumbnailService.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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions