Search Issue Tracker

Duplicate

Votes

0

Found in

2022.3.41f1

6000.0.16f1

Issue ID

UUM-78565

Regression

Yes

Crash on AttachAddedComponents when attempting to create a Prefab from a missing Prefab whose link with the original Prefab is broken

--

-

Reproduction steps:
1. Open the attached “ReproProj” project
2. Open the “Assets/Scenes/Scene01.unity“ Scene
3. From the Hierarchy, drag the “Player” GameObject into the Project window

Expected result: Prefab is created
Actual result: The Editor crashes

Reproducible with: 2022.2.0a6, 2022.3.41f1, 6000.0.16f1
Not reproducible with: 2021.3.43f1, 2022.2.0a5

Reproducible on: macOS 14.6.1 (M1 Max)
Not reproducible on: No other environment tested

First few lines of the stack trace:
#0 0x00000104051a60 in AttachAddedComponents(GameObject*, core::vector<ObjectData, 0ul>&, core::vector<PrefabModification::AddedComponent, 0ul> const&, core::vector<core::pair<PPtrUnity::Component, PPtr<EditorExtension>, false>, 0ul>&)
#1 0x000001040533d4 in MergePrefabChanges(GameObject*, core::vector<Object*, 0ul> const&, core::vector<ObjectData, 0ul> const&, core::vector<ObjectData, 0ul>&, core::vector<PrefabModification::AddedComponent, 0ul> const&, core::vector<PrefabModification::AddedGameObject, 0ul> const&, core::vector<Unity::Component*, 0ul>&, core::vector<core::pair<PPtrUnity::Component, PPtr<EditorExtension>, false>, 0ul>&, PrefabModification const&, PrefabHideFlagBehaviour, Object::HideFlags, TransferInstructionFlags, PrefabPPtrRemapper&)
#2 0x0000010402108c in MergePrefabInternal(Prefab&, PrefabInstance&, core::vector<ObjectData, 0ul> const&, core::vector<PrefabModification::AddedComponent, 0ul> const&, core::vector<PrefabModification::AddedGameObject, 0ul> const&, AwakeFromLoadQueue&, core::vector<ObjectData, 0ul>&, TransferInstructionFlags, bool, PrefabPPtrRemapper&)
#3 0x00000104020ae8 in MergePrefab(Prefab&, PrefabInstance&, MergePrefabBatchData&, core::vector<ObjectData, 0ul>&, PrefabPPtrRemapper&, Transform*)
#4 0x00000104020578 in MergePrefabInstance(PrefabInstance&, MergePrefabBatchData&, PrefabPPtrRemapper&)
#5 0x000001040201d4 in MergePrefabInstances(core::vector<PPtr<PrefabInstance>, 0ul> const&, MergePrefabBatchData&, bool)
#6 0x00000104020814 in MergeAllPrefabInstancesInScenes(PPtr<Prefab>, MergePrefabBatchData&, bool)

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.