Search Issue Tracker
Won't Fix
Votes
0
Found in
2022.1.20f1
2022.2.0b10
2023.1.0a13
2023.2.0a1
Issue ID
UUM-16824
Regression
No
[Undo] Undoing prefab instancing leaves ghost objects in scene that throw ArgumentNullExceptions and crash editor when dragged to project view
How to reproduce:
# Create new project
# Create a cube object in scene
# Make it a prefab by dragging it from hierarchy into project view
# Create a few instances in the scene by dragging prefab from project view into scene
# Delete the prefab in project view
# Create a new cube in the scene, rename it to Cube (exact name as the created prefab in step 2)
# Drag the new cube from hierarchy into project view
# Observe Hierarchy - all prefab instances object names change to Cube
# Ctrl + z to undo these actions
# Observe in hierarchy and scene that ghost objects are left, that show empty inspector and throw exception in console when selected
# Dragging such object into project view crashes the editor
Expected result: No errors thrown/editor doesn't crash
Error:
ArgumentNullException: Value cannot be null.
Parameter name: prefabInstance
UnityEditor.PropertyEditor.ExtractPrefabComponents () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/PropertyEditor.cs:851)
UnityEditor.PropertyEditor.OnTrackerRebuilt () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/PropertyEditor.cs:693)
UnityEditor.PropertyEditor.DrawEditors (UnityEditor.Editor[] editors) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/PropertyEditor.cs:1805)
UnityEditor.PropertyEditor.RebuildContentsContainers () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/PropertyEditor.cs:1010)
UnityEditor.InspectorWindow.OnSelectionChanged () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:144)
UnityEditor.Selection.Internal_CallSelectionChanged () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Selection.cs:37)
Reproduced with: 2022.1.0a15, 2022.1.11f1, 2022.2.0b11, 2023.1.0a12
Does not reproduce with: 2021.3.11f1, 2022.1.0a14
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] [iOS] [UnityWebRequest] Requests with "UnityWebRequest" are open for SSL Proxying
- SetWindowsHookEx does not prevent Windows key input when Editor or Player Window is focused and Active Input Handling is set to “Input System Package (New)” or “Both”
- Crash on GetEffectiveBc7TextureCompressor() when loading and unloading all Assets in the Project
- Terrain Masks do not ignore the mipmap limit
- "Build And Run" the project for Web is allowed even though the directory for the non-default browser is not selected
Resolution Note:
Thank you for reporting a bug to Unity.
We have reviewed the issue carefully, and in this case the team is unable to prioritize fixing this bug. There are a number of reasons we make this decision, including the impact and severity of the issue across our user and customer base, and the possibility that future plans may solve the problem in a different way, or that a workaround for the bug may be available.
Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.