Search Issue Tracker

Duplicate

Votes

28

Found in [Package]

12.0.0, 11.0.0.

Issue ID

1318882

Regression

Yes

[Shader Graph] NullReferenceException error thrown on selecting any property in Blackboard window in Subgraph Shader Graph

Package: Shader Graph

-

-ArgumentNullException error is thrown on deleting property from the Blackboard window.
-NullReferenceException error thrown on selecting any property in Blackboard window in Subgraph Shader Graph.

Steps to repro:
1. Create a new HDRP template project.
2. Project > Click on "+" > Shader > SubGraph.
3. Open SubGraph > Blackboard > Click on "+" > Vector2.
4. Select Vector2 property.

Actual Result:
NullReferenceException error thrown in the console.

Expected Result:
No error in the console.

Reproducible in:
2021.2.0a7, 2021.1.0b10, 2021.1.0a10 with Package version 12.0.0, 11.0.0.

Working Fine in:
2021.1.a9, 2020.2.7f1 with Package version 10.3.2, 10.3.1.
2021.1.17f1 with Package version 9.0.0-preview.71.
2019.4.21f with Package version 7.5.3.

Environment:
Occurring on Windows 10 & Mac 10.15.

Stack trace:
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:330)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

ArgumentNullException: Value cannot be null.
Parameter name: identifier
UnityEditor.Undo.RegisterCompleteObjectUndo (UnityEngine.Object objectToUndo, System.String name) (at <c2e9ddac9be94c64888ec1c467657510>: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.DeleteSelectionImplementation (System.String operationName, UnityEditor.Experimental.GraphView.GraphView+AskUser askUser) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Views/MaterialGraphView.cs:891)
UnityEditor.ShaderGraph.Drawing.MaterialGraphView+<>c__DisplayClass38_0.<BuildContextualMenu>b__5 (UnityEngine.UIElements.DropdownMenuAction e) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Views/MaterialGraphView.cs:343)
UnityEngine.UIElements.DropdownMenuAction.Execute () (at <1c96b7a3f7794c85b453037183b01ec4>:0)
UnityEditor.UIElements.EditorMenuExtensions+<>c__DisplayClass1_0.<PrepareMenu>b__0 () (at <cfee44c50c74452d92e0643773711d9d>:0)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at <c2e9ddac9be94c64888ec1c467657510>:0)

  1. Response avatar

    Resolution Note:

    Bug never reproduced in 21.2 as far as I can tell (did not repro in a7 or a6), making this case a duplicate of case 1328377, which was fixed in 2021.1.7f1 (11.0.0)

Comments (8)

  1. 3c0cbb8b7397243ac5aea26e2c79af5a?d=mm

    crimsonbinome22

    May 14, 2021 01:12

    Having this issue on URP 2021.1.4, Shadergraph 11.0.0 here. I cannot edit existing shader graphs or create new ones at all. How is this not higher priority, and how come there's no plan to apply the fix before 12.0.0?

  2. 4f5badd147f593435f4734551de1c3c5?d=mm

    xadrados

    May 10, 2021 10:22

    We need an emergency hot fix

  3. 39eaae46cae68c6d21a03ab7b5b36e15?d=mm

    ZackPetropoulakis

    May 02, 2021 23:16

    Still no conclusion? This problem seems to have no workaround and has entirely halted production on existing SubGraphs. I hope this can be resolved soon.

  4. E5b5b295efeb76d924a17f2e636b0e14?d=mm

    Korindian

    Apr 17, 2021 18:04

    Sorry, meant to write HDRP 11 on 2021.1.3f1, not 2020.1.3f1.

  5. E5b5b295efeb76d924a17f2e636b0e14?d=mm

    Korindian

    Apr 17, 2021 17:56

    Yes, cannot even create shaders due to this problem on HDRP 11, 2020.1.3f1. This needs an emergency hot fix please!!!

  6. B16b9a9f9375b20f1f5ce0bd29c7dc27?d=mm

    HG_SB

    Apr 12, 2021 07:14

    Any ETA on when this fix will release? It´s impossible to work with SubGraphs at the moment due to this.
    This is breaking an essential package marked as "production ready" so I would assume this would have high priority.

  7. Fc82b86b7af11448d1390b12a80d6fd8?d=mm

    marras1994

    Apr 08, 2021 09:21

    Same happening on Mac Os 10.15.17, Unity 2021.1.1f1 and Shadergraph 11.

    I migrated a project from Unity 2020 to 2021 and now my graph are broken when I try to edit them.

  8. Bbba4696c7f7fbdf37b78828727660e4?d=mm

    Aalegre

    Apr 05, 2021 12:53

    This also happens on URP for me.
    I'm using Shadergraph version 11, and unity version 2021.1.1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.