Search Issue Tracker

Fixed in 2022.1.X

Planned for 2019.4.X, 2020.3.X, 2021.1.X, 2021.2.X

Votes

1

Found in

2019.4.18f1

2020.2.2f1

2020.3

2021.1.0a7

2021.2

Issue ID

1324978

Regression

Yes

Crash on BuildPrefabInstanceCorrespondingObjectMap when overriding nested prefab inside AssetDatabase.StartAssetEditing() block

Scene Management

-

How to reproduce:
1. Open user's attached project from "CrashTest 2020.2.2f1.zip"
2. Open Scene "CrashTestScene"
3. Add 2 objects as children under Prefab "Inner" which is under "Outer" in Hierarchy
4. Select Prefab "Inner" and click the "Crash Test" button in Inspector
5. Observe crash

Reproducible with: 2019.4.18f1, 2019.4.24f1, 2020.2.2f1, 2020.3.4f1, 2021.1.0a7, 2021.1.3f1, 2021.2.0a12
Not reproducible with: 2018.4.33f1, 2019.4.17f1, 2020.2.1f1, 2021.1.0a6

First lines of stack trace:
0x00007ff76b5f93d0 (Unity) BuildPrefabInstanceCorrespondingObjectMap
0x00007ff76b5f5343 (Unity) AddGameObjectsToPrefabAndConnect
0x00007ff76c0b7dd6 (Unity) PrefabUtility_CUSTOM_AddGameObjectsToPrefabAndConnect_Internal
0x000002042c54287d (Mono JIT Code) (wrapper managed-to-native) UnityEditor.PrefabUtility:AddGameObjectsToPrefabAndConnect_Internal (UnityEngine.GameObject[],UnityEngine.Object)
0x000002042c541f93 (Mono JIT Code) UnityEditor.PrefabUtility:AddGameObjectsToPrefabAndConnect

Note:
1. Crash occurs when applying more than one AddedObjectOverrides to it inside AssetDatabase.StartAssetEditing, works fine with one

  1. Response avatar

    Resolution Note (fix version 2022.1):

    Fixed in 2022.1.0a3

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.