How to reproduce:
- Open the attached project “IN-140084“
- Reimport the “Roslyn C# Runtime Compiler 2.0” asset using the package manger
- Wait for the domain to reload
- Observe the Asset Import Worker crash
Reproducible with: 2023.1.0a10, 6000.0.72f1, 6000.3.13f1, 6000.4.5f1, 6000.5.0b3, 6000.6.0a3
Reproducible on: Windows 11
Not reproducible on: No other environments tested
Note: The issue seems to arise from a script calling AssetDatabase.CreateAsset in an [InitializeOnLoadMethod]
First few lines of the stack trace:
0x00007FFFD06BB921 (Unity) core::base_hash_set<core::pair<core::basic_string<char,core::StringStorageDefault<char> > const ,UnityGUID,1>,core::hash_pair<core::hash<core::basic_string_ref<char> >,core::basic_string<char,core::StringStorageDefault<char> > >,core::equal_pair<std::equal_to<core::basic_string_ref<char> >,core::basic_string<char,core::StringStorageDefault<char> > > >::lookup<core::basic_string_ref<char>,core::equal_pair<std::equal_to<core::basic_string_ref<char> >,core::basic_string<char,core::StringStorageDefault<char> > > >
0x00007FFFD077C488 (Unity) GuidReservations::Reserve
0x00007FFFD075EB57 (Unity) CreateAssetToGUIDMappingV2
0x00007FFFD06A6824 (Unity) CreateSerializedAssetV2
0x00007FFFD075EDF5 (Unity) CreateSerializedAssetV2