Editor crash in FAssetDefinitionProxy::GetSupportedClass() ▎ (Engine/Source/Developer/AssetTools/Private/AssetTools.cpp:153)

Summary

Below is a Claude description of the crash. Claude was able to fix the crash as follows:

Editor crash in FAssetDefinitionProxy::GetSupportedClass()
▎ (Engine/Source/Developer/AssetTools/Private/AssetTools.cpp:153)
▎
▎ Version: 5.8.3-58210709 (launcher build), Windows 11
▎
▎ Crash: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000000 at
▎ UnrealEditor-AssetTools!FAssetDefinitionProxy::GetSupportedClass().

What Type of Bug are you experiencing?

Editor

Steps to Reproduce

  1. Create a 5.8.3 project.
  2. Enable the plugins below
  3. Restart, open the default level and select an actor.
  • It reproduced every time across several restarts, including selecting an actor through
    EditorActorSubsystem.set_selected_level_actors from Python.
  • The project was upgraded from 5.7. Its enabled plugins are Datasmith (Importer, CAD, C4D), DataPrepEditor, AxFImporter,
    InterchangeEditor, USD Core/Importer, LidarPointCloud, MovieRenderPipeline, VariantManager, RemoteControl,
    CameraCalibration, PythonScriptPlugin, SunPosition, HDRIBackdrop, ModelingToolsEditorMode, ElectraPlayer,
    SerializationUtils and VisualStudioTools.
  • The project’s C++ doesn’t touch AssetTools or asset definitions.

Expected Result

the actor is selected and the Details panel shows it.

Observed Result

the editor crashes with EXCEPTION_ACCESS_VIOLATION reading address 0x0 in
FAssetDefinitionProxy::GetSupportedClass() (AssetTools.cpp:153). Opening Project Settings or loading a different level
instead of step 3 crashes it the same way.

Affects Versions

5.8

Platform(s)

Windows

For crash reports, include your callstack

FAssetDefinitionProxy::GetSupportedClass() AssetTools.cpp:153 ← AssetDefinitionPtr.Get() returns null
UAssetToolsImpl::SyncAssetTypesToAssetDefinitions() AssetTools.cpp ~1488 / ~1534
UAssetToolsImpl::GetAssetTypeActionsForClass() (also GetAssetTypeActionsList)
<editor selection / Details panel / Project Settings / level load>

Additional Notes

▎ Summary: Editor crash in FAssetDefinitionProxy::GetSupportedClass()
▎ (Engine/Source/Developer/AssetTools/Private/AssetTools.cpp:153)
▎
▎ Version: 5.8.3-58210709 (launcher build), Windows 11
▎
▎ Crash: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000000 at
▎ UnrealEditor-AssetTools!FAssetDefinitionProxy::GetSupportedClass().
▎
▎ When: after some editor uptime, on any action that triggers UAssetToolsImpl::SyncAssetTypesToAssetDefinitions(), such
▎ as selecting an actor in the level viewport, opening Project Settings or loading a level. Reproduces on an empty test
▎ level.
▎
▎ Analysis: FAssetDefinitionProxy holds a TWeakObjectPtr, and every accessor calls
▎ AssetDefinitionPtr.Get()->… without a null check. If a proxied, non-CDO UAssetDefinition is dropped from
▎ UAssetDefinitionRegistry and garbage-collected before the next sync, the sync crashes. Both the Algo::AnyOf(…
▎ Actions->GetSupportedClass() …) check and the “remove proxies without an associated AssetDefinition” loop call
▎ GetSupportedClass() on the stale proxy.
▎
▎ Workaround: calling AddToRoot() on all UAssetDefinition instances in a
▎ FCoreUObjectDelegates::GetPreGarbageCollectDelegate() handler stops the crash.
▎
▎ Suggested fix: null-check AssetDefinitionPtr in FAssetDefinitionProxy (e.g. GetSupportedClass() returns nullptr when
▎ stale), and have the sync remove stale proxies before calling into them.