Search Issue Tracker
Fixed in 4.2.0
Votes
0
Found in [Package]
4.1.0, 3.0.2
Issue ID
1196964
Regression
Yes
[Probuilder] Missing reference exception on undo after probuilderizing a GameObject if element mode is selected
[Probuilder] Missing reference exception on undo after probuilderizing a GameObject if vertex/face/side option is selected in probuilder toolbar
Steps To Reproduce:
1. Create a new project
2. Window > Package Manager> Probuilder > Install
3. Tools> Open Probuilder window and dock
4. Hierarchy > 3D > Cube
5. Select Cube and click vertex icon in the probuilder toolbar
6. Click on Probuilderize option in probuilder window
7. Undo the operation
Expected Result: The cube becomes a normal GameObject again
Observed Result: Missing reference exception is thrown in the console
Reproducible in: 2020.1.0a12, 2019.3.0b10, 2019.2.0f2, 2018.3.0f2
Reproducible On Package Version: 4.1.0, 3.0.2
Not Reproducible On Package version: 3.0.1
Environment: Win and Mac
Stack Trace: MissingReferenceException: The object of type 'ProBuilderMesh' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEditor.ProBuilder.EditorSceneViewPicker.GetNearestVertices (UnityEngine.ProBuilder.ProBuilderMesh mesh, UnityEngine.Vector3 mousePosition, System.Collections.Generic.List`1[T] list, System.Single maxDistance, System.Single distModifier) (at Library/PackageCache/com.unity.probuilder@4.1.0/Editor/EditorCore/EditorSceneViewPicker.cs:556)
UnityEditor.ProBuilder.EditorSceneViewPicker.VertexRaycast (UnityEngine.Vector3 mousePosition, UnityEditor.ProBuilder.ScenePickerPreferences pickerOptions, System.Boolean allowUnselected, UnityEngine.ProBuilder.SceneSelection selection) (at Library/PackageCache/com.unity.probuilder@4.1.0/Editor/EditorCore/EditorSceneViewPicker.cs:526)
UnityEditor.ProBuilder.EditorSceneViewPicker.MouseRayHitTest (UnityEngine.Vector3 mousePosition, UnityEngine.ProBuilder.SelectMode selectionMode, UnityEditor.ProBuilder.ScenePickerPreferences pickerOptions, UnityEngine.ProBuilder.SceneSelection selection, System.Boolean allowUnselected) (at Library/PackageCache/com.unity.probuilder@4.1.0/Editor/EditorCore/EditorSceneViewPicker.cs:392)
UnityEditor.ProBuilder.ProBuilderEditor.OnSceneGUI (UnityEditor.SceneView sceneView) (at Library/PackageCache/com.unity.probuilder@4.1.0/Editor/EditorCore/ProBuilderEditor.cs:644)
UnityEditor.SceneView.CallOnSceneGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:3526)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2758)
UnityEditor.SceneView.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2465)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:367)
UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:361)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:337)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:356)
UnityEditor.DockArea.OldOnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:346)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Boolean canAffectFocus) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:291)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean canAffectFocus) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:501)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:484)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:475)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:447)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/Events/IEventDispatchingStrategy.cs:81)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/Events/MouseEventDispatchingStrategy.cs:69)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:277)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at /Users/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:238)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at /Users/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:203)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at /Users/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:44)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:310)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:159)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/Panel.cs:255)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.bindings.cs:404)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.bindings.cs:194)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Polygons are created on the opposite side of the Sprite when the Sprite boundaries are above the edge of the Texture
- Render Graph Viewer Resource list becomes shrunk after using a filter that yields no results
- [Android] [Vulkan] "VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT" not added on some Android devices in "com.unity3d.player.UnityPlayerActivity/2D Colour Attachement"
- ResolveUsePasses now extracts passes from all subshaders including fallbacks, in contrast to documented behaviour
- [UIBuilder] Changes aren't detected on types implementing IList
Add comment