Reproduction steps:
1. Open the attached “ReproProj” project
2. Open the “Campaign1.unity“ scene
3. Enter the Play Mode and wait a few seconds
4. Pause the Play Mode
5. Exit the Play Mode
6. Repeat the 3rd step
Expected result: The Play Mode is entered
Actual result: The Editor crashes
Reproducible with: 6000.0.8f1, 6000.0.13f1
Not reproducible with: 6000.0.7f1
Couldn’t test with: 2021.3.41f1, 2022.3.40f1 (asset error)
Reproducible on: macOS 14.5 (M1 Max), Windows 10
Not reproducible on: No other environment tested
Note: On some tested versions, crashes on the 3rd step
The first few lines of the stack trace:
#0 0x0000010430ad6c in WriteSerializedAssetsV2(core::hash_set<UnityGUID, core::hash<UnityGUID>, std::_1::equal_to<UnityGUID>> const&, core::hash_set<UnityGUID, core::hash<UnityGUID>, std::_1::equal_to<UnityGUID>>&)
#1 0x000001042dbff0 in AssetDatabase::WriteRevertAssets(core::hash_set<UnityGUID, core::hash<UnityGUID>, std::_1::equal_to<UnityGUID>> const&, core::hash_set<UnityGUID, core::hash<UnityGUID>, std::_1::equal_to<UnityGUID>> const&)
#2 0x000001042dba6c in AssetDatabase::SaveAssets()
#3 0x00000102462534 in AssetDatabase_CUSTOM_SaveAssets()
#4 0x000004869b7030 in (wrapper managed-to-native) UnityEditor.AssetDatabase:SaveAssets () [
{0x395edce50}
+ 0x58] (0x4869b6fd8 0x4869b7084) [0x35188aa80 - Unity Child Domain]
#5 0x000004869b46a4 in Unity.AppUI.Editor.AppUISetup:.cctor () [
{0x356c05368}
+ 0xbc] [./Library/PackageCache/com.unity.dt.app-ui/Editor/AppUISetup.cs :: 23u] (0x4869b45e8 0x4869b46c4) [0x35188aa80 - Unity Child Domain]
#6 0x000004869b4990 in (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr) [
{0x395ef1ef8}
+ 0x68] (0x4869b4928 0x4869b4a18) [0x35188aa80 - Unity Child Domain]
#7 0x00000351c57750 in mono_jit_runtime_invoke