Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug NullReferenceExecption in Probuilder

Discussion in 'World Building' started by oc1345, Jul 26, 2023.

  1. oc1345

    oc1345

    Joined:
    Mar 27, 2023
    Posts:
    4
    I tried to add a edge loop to a poly shape in Unity 2021.3 and this error happened
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEngine.ProBuilder.MeshOperations.ConnectElements.Connect (UnityEngine.ProBuilder.ProBuilderMesh mesh, System.Collections.Generic.IEnumerable`1[T] edges, UnityEngine.ProBuilder.Face[]& addedFaces, UnityEngine.ProBuilder.Edge[]& connections, System.Boolean returnFaces, System.Boolean returnEdges, System.Collections.Generic.HashSet`1[T] faceMask) (at Library/PackageCache/com.unity.probuilder@5.0.7/Runtime/MeshOperations/ConnectElements.cs:276)
    3. UnityEngine.ProBuilder.MeshOperations.ConnectElements.Connect (UnityEngine.ProBuilder.ProBuilderMesh mesh, System.Collections.Generic.IEnumerable`1[T] edges) (at Library/PackageCache/com.unity.probuilder@5.0.7/Runtime/MeshOperations/ConnectElements.cs:62)
    4. UnityEditor.ProBuilder.Actions.InsertEdgeLoop.PerformActionImplementation () (at Library/PackageCache/com.unity.probuilder@5.0.7/Editor/MenuActions/Geometry/InsertEdgeLoop.cs:55)
    5. UnityEditor.ProBuilder.MenuAction.PerformAction () (at Library/PackageCache/com.unity.probuilder@5.0.7/Editor/EditorCore/MenuAction.cs:281)
    6. UnityEditor.ProBuilder.MenuAction.DoButton (System.Boolean isHorizontal, System.Boolean showOptions, UnityEngine.Rect& optionsRect, UnityEngine.GUILayoutOption[] layoutOptions) (at Library/PackageCache/com.unity.probuilder@5.0.7/Editor/EditorCore/MenuAction.cs:390)
    7. UnityEditor.ProBuilder.EditorToolbar.OnGUI () (at Library/PackageCache/com.unity.probuilder@5.0.7/Editor/EditorCore/EditorToolbar.cs:340)
    8. UnityEditor.ProBuilder.ProBuilderEditor.OnGUI () (at Library/PackageCache/com.unity.probuilder@5.0.7/Editor/EditorCore/ProBuilderEditor.cs:407)
    9. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <a53e7cd0bf8c4035ac3e78fb7b43c4a6>:0)
    10. UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <a53e7cd0bf8c4035ac3e78fb7b43c4a6>:0)
    11. UnityEditor.DockArea.OldOnGUI () (at <a53e7cd0bf8c4035ac3e78fb7b43c4a6>:0)
    12. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    13. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    14. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    15. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    16. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    17. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    18. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    19. UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    20. UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    21. UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    22. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    23. UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    24. UnityEngine.UIElements.EventDispatcher.OpenGate () (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    25. UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    26. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    27. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    28. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    29. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    30. UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    31. UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    32. UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <b4f9fef5cd1a4165b892ba1d572be672>:0)
    33. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <d8e1dd7a299549d0a7c7e0d6aee4fe0a>:0)
     
  2. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    810
    did you report it as a bug?
     
  3. oc1345

    oc1345

    Joined:
    Mar 27, 2023
    Posts:
    4
    Well it doesnt occur anymore so i cant make a report but instead creates a broken edge loop
    EDIT: I got it to error again and reported it
    Screenshot 2023-07-27 102013.png
     
    Last edited: Jul 27, 2023
  4. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    810
    interesting edge loop for sure.