Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Bug 1230949: Saving a ShaderGraph shader in 2019.3 results in ProBuilder error spam

Discussion in 'World Building' started by dgoyette, Mar 26, 2020.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    2,445
    I've reported this as bug #1230949. Basically, if the ProBuilder window is open when saving ShaderGraph, the follow error starts spamming the console log until Unity is closed:

    MissingReferenceException: The object of type 'Material' 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.
    UnityEngine.Material.SetFloat (System.String name, System.Single value) (at <d815b7efac424eeb8e053965cccb1f98>:0)
    UnityEditor.ProBuilder.EditorMeshHandles.SetMaterialsScaleAttribute () (at Library/PackageCache/com.unity.probuilder@4.2.3/Editor/EditorCore/EditorMeshHandles.cs:455)
    UnityEditor.ProBuilder.EditorMeshHandles.DrawSceneHandlesInternal (UnityEngine.ProBuilder.SelectMode mode) (at Library/PackageCache/com.unity.probuilder@4.2.3/Editor/EditorCore/EditorMeshHandles.cs:302)
    UnityEditor.ProBuilder.EditorMeshHandles.DrawSceneHandles (UnityEngine.ProBuilder.SelectMode mode) (at Library/PackageCache/com.unity.probuilder@4.2.3/Editor/EditorCore/EditorMeshHandles.cs:293)
    UnityEditor.ProBuilder.ProBuilderEditor.OnSceneGUI (UnityEditor.SceneView sceneView) (at Library/PackageCache/com.unity.probuilder@4.2.3/Editor/EditorCore/ProBuilderEditor.cs:581)
    UnityEditor.SceneView.CallOnSceneGUI () (at <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    UnityEditor.SceneView.OnGUI () (at <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    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 <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    UnityEditor.HostView.Invoke (System.String methodName) (at <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    UnityEditor.DockArea.OldOnGUI () (at <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    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 <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Boolean straightY, System.Single pixelsPerPoint, System.Exception& immediateException) (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    Rethrow as ImmediateModeException
    UnityEngine.UIElements.UIR.RenderChain.Render (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection, UnityEngine.UIElements.PanelClearFlags clearFlags) (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.UIElements.UIRRepaintUpdater.DrawChain (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection) (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.UIElements.Panel.UpdateForRepaint () (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <3736d7cfd1f845a5922f99478cb469e7>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <817eebdd70f8402280b9cb11fff8b976>:0)

    Note that it doesn't matter whether there are any PB objects in the scene. Just having the PB window open causes this to occur.

    ProBuilder 4.2.3, and ShaderGraph 7.3.1.
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    2,445
unityunity