Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug Shader Graph unresponsive for all shaders in a project

Discussion in '2020.1 Beta' started by cgallello, Apr 5, 2020.

  1. cgallello

    cgallello

    Joined:
    Jul 29, 2016
    Posts:
    3
    I thought I'd post here before submitting a bug report since it's hard to narrow down a repro in other projects, and it will take a long time to attach my project. Just wondering if there's some easy fix that I missed in my searching.

    While working on a Shader Graph in my project (Unity 2020.01b3.3385), I noticed that I could not let go of a node once I started dragging it. Most buttons in Shader Graph don't seem to work, I'm not able to drag links between nodes, not able to hit Save Asset, etc. This unfortunately applies to all Shader Graphs in the project.

    Here's what I've tried in order to resolve:
    - Closing Unity, then renaming "Library" folder in the project to "Library_backup". Did not fix after reopening Unity.
    - Project Settings > Graphics > Reset. Did not fix.
    - Created a new PBR Shader Graph. Did not fix.
    - Created a new Unlit Shader Graph. Did not fix.
    - Removing all existing shader graphs from my project, then create a new PBR Shader Graph. Did not fix.
    - Creating a new URP project, then bringing in the Shader Graphs from my real project. The Shader Graphs from my real project work fine in the new project, which might point to the issue being related to Unity's project settings or some metadata in the project. Either way, it seems that it's not an issue with the Shader Graphs I was creating.

    Attached below are two console statements. Let me know if there's anything else that would be helpful.

    This shows up when I try to click away while dragging a node.


    ArgumentNullException: Value cannot be null.
    Parameter name: identifier
    UnityEditor.Undo.RegisterCompleteObjectUndo (UnityEngine.Object objectToUndo, System.String name) (at <e2353c5c084f4b5a9d8ead9c6b8ffaa2>:0)
    UnityEditor.Graphing.GraphObject.RegisterCompleteObjectUndo (System.String actionName) (at Library/PackageCache/com.unity.shadergraph@8.0.1/Editor/Data/Implementation/GraphObject.cs:51)
    UnityEditor.ShaderGraph.Drawing.GraphEditorView.GraphViewChanged (UnityEditor.Experimental.GraphView.GraphViewChange graphViewChange) (at Library/PackageCache/com.unity.shadergraph@8.0.1/Editor/Drawing/Views/GraphEditorView.cs:380)
    UnityEditor.Experimental.GraphView.SelectionDragger.OnMouseUp (UnityEngine.UIElements.MouseUpEvent evt) (at <e2353c5c084f4b5a9d8ead9c6b8ffaa2>:0)
    UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <e05e25897e384e2a862b8ea3613fb25c>:0)



    And this is what shows up when I click Save Asset:


    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.ShaderGraph.Drawing.MaterialGraphEditWindow.IsDirty () (at Library/PackageCache/com.unity.shadergraph@8.0.1/Editor/Drawing/MaterialGraphEditWindow.cs:255)
    UnityEditor.ShaderGraph.Drawing.MaterialGraphEditWindow.UpdateTitle () (at Library/PackageCache/com.unity.shadergraph@8.0.1/Editor/Drawing/MaterialGraphEditWindow.cs:275)
    UnityEditor.ShaderGraph.Drawing.MaterialGraphEditWindow.UpdateAsset () (at Library/PackageCache/com.unity.shadergraph@8.0.1/Editor/Drawing/MaterialGraphEditWindow.cs:360)
    UnityEditor.ShaderGraph.Drawing.GraphEditorView+<>c__DisplayClass48_1.<.ctor>b__0 () (at Library/PackageCache/com.unity.shadergraph@8.0.1/Editor/Drawing/Views/GraphEditorView.cs:151)
    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 <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <e05e25897e384e2a862b8ea3613fb25c>:0)

     
    Last edited: Apr 5, 2020
  2. Richay

    Richay

    Joined:
    Aug 5, 2013
    Posts:
    122
    I also have this issue in 2020.1.0b4
     
  3. josephbeuys

    josephbeuys

    Joined:
    Mar 11, 2019
    Posts:
    1
    Same here:

    ArgumentNullException: Value cannot be null.
    Parameter name: identifier
    UnityEditor.Undo.RegisterCompleteObjectUndo (UnityEngine.Object objectToUndo, System.String name) (at <f4f65bdffc5b446a881dc828be3f537e>:0)
    UnityEditor.Graphing.GraphObject.RegisterCompleteObjectUndo (System.String actionName) (at Library/PackageCache/com.unity.shadergraph@8.0.1/Editor/Data/Implementation/GraphObject.cs:51)
    UnityEditor.ShaderGraph.Drawing.MaterialGraphView.DeleteSelectionImplementation (System.String operationName, UnityEditor.Experimental.GraphView.GraphView+AskUser askUser) (at Library/PackageCache/com.unity.shadergraph@8.0.1/Editor/Drawing/Views/MaterialGraphView.cs:621)
    UnityEditor.Experimental.GraphView.GraphView.DeleteSelectionOperation (System.String operationName, UnityEditor.Experimental.GraphView.GraphView+AskUser askUser) (at <f4f65bdffc5b446a881dc828be3f537e>:0)
    UnityEditor.Experimental.GraphView.GraphView.DeleteSelectionCallback (UnityEditor.Experimental.GraphView.GraphView+AskUser askUser) (at <f4f65bdffc5b446a881dc828be3f537e>:0)
    UnityEditor.Experimental.GraphView.GraphView.<BuildContextualMenu>b__156_6 (UnityEngine.UIElements.DropdownMenuAction a) (at <f4f65bdffc5b446a881dc828be3f537e>:0)
    UnityEngine.UIElements.DropdownMenuAction.Execute () (at <06f736509a734c608f8b4e0dff8f746d>:0)
    UnityEditor.UIElements.EditorMenuExtensions+<>c__DisplayClass0_0.<PrepareMenu>b__0 () (at <f4f65bdffc5b446a881dc828be3f537e>:0)
    UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at <f4f65bdffc5b446a881dc828be3f537e>:0)
     
  4. Singtaa

    Singtaa

    Joined:
    Dec 14, 2010
    Posts:
    492
    Problem was fixed for me in Shader Graph 8.1.0
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Is this issue still occuring for you with the latest Shader Graph version?
     
  6. cgallello

    cgallello

    Joined:
    Jul 29, 2016
    Posts:
    3
    Yep it still happens occasionally. For anyone who finds this...
    1. Click "Main Preview" at the top right of Shader Graph to make it visible
    2. The window will basically be 0 x 0. Drag the bottom right of it to increase the size of it
    3. Close out of shader graph
    4. Reopen
    5. It should work!
    Something about the Main Preview having a height of 0 is messing up Shader Graph.
     
  7. Lightway_

    Lightway_

    Joined:
    Dec 20, 2019
    Posts:
    3
    I create shader subgraph. Add float property, add float property. Drag input property to graph sheet...

    2021.1.0b11


    ArgumentNullException: Value cannot be null.
    Parameter name: identifier
    UnityEditor.Undo.RegisterCompleteObjectUndo (UnityEngine.Object objectToUndo, System.String name) (at <9f62394378254de0b0854a31bffc99b8>:0)
    UnityEditor.Graphing.GraphObject.RegisterCompleteObjectUndo (System.String actionName) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Data/Implementation/GraphObject.cs:54)
    UnityEditor.ShaderGraph.Drawing.MaterialGraphView.CreateNode (System.Object obj, UnityEngine.Vector2 nodePosition) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Views/MaterialGraphView.cs:1138)
    UnityEditor.ShaderGraph.Drawing.MaterialGraphView.OnDragPerformEvent (UnityEngine.UIElements.DragPerformEvent e) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Views/MaterialGraphView.cs:1019)
    UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <26a8b3f464c04cf88ca0dd94dd27ee12>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <9ff04fda545c4aacb8dab659ad40b2f4>:0)



    And

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.ShaderGraph.Drawing.Inspector.PropertyDrawers.ShaderInputPropertyDrawer.UpdateEnableState () (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs:142)
    UnityEditor.ShaderGraph.Drawing.Inspector.PropertyDrawers.ShaderInputPropertyDrawer.DrawProperty (System.Reflection.PropertyInfo propertyInfo, System.Object actualObject, UnityEditor.ShaderGraph.Drawing.InspectableAttribute attribute) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs:108)
    UnityEditor.ShaderGraph.Drawing.Inspector.InspectorUtils.GatherInspectorContent (System.Collections.Generic.List`1[T] propertyDrawerList, UnityEngine.UIElements.VisualElement outputVisualElement, UnityEditor.ShaderGraph.Drawing.IInspectable inspectable, System.Action propertyChangeCallback, UnityEditor.ShaderGraph.Drawing.IPropertyDrawer propertyDrawerToUse) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Inspector/InspectorView.cs:195)
    UnityEditor.ShaderGraph.Drawing.Inspector.InspectorView.DrawInspectable (UnityEngine.UIElements.VisualElement outputVisualElement, UnityEditor.ShaderGraph.Drawing.IInspectable inspectable, UnityEditor.ShaderGraph.Drawing.IPropertyDrawer propertyDrawerToUse) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Inspector/InspectorView.cs:140)
    UnityEditor.ShaderGraph.Drawing.Inspector.InspectorView.Update () (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Inspector/InspectorView.cs:126)
    UnityEditor.ShaderGraph.Drawing.GraphEditorView.HandleGraphChanges (System.Boolean wasUndoRedoPerformed) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Views/GraphEditorView.cs:654)
    UnityEditor.ShaderGraph.Drawing.MaterialGraphEditWindow.Update () (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/MaterialGraphEditWindow.cs:342)
    UnityEditor.HostView.SendUpdate () (at <9f62394378254de0b0854a31bffc99b8>:0)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <9f62394378254de0b0854a31bffc99b8>:0)
     
    MaxPirat likes this.
  8. grox777

    grox777

    Joined:
    Jan 14, 2017
    Posts:
    4
    Bug still exist 2021.3.8
    Earlier I was forced to end the unity editor process, cause endless cycle in my script was make editor to "not respond"... So maybe this was the trigger for bug to appear somehow?
     

    Attached Files: