Search Issue Tracker
Fixed in 2.0.8
Votes
0
Found in [Package]
1.1.3
Issue ID
1056755
Regression
No
Console throws NullReferenceException when re-opening a Shader Sub Graph
Steps to reproduce:
1. Open User-supplied project
2. In Project window, create a new Sub Graph in Create->Shader->Sub Graph
3. Select the newly created graph and in the Inspector window press 'Open Shader Editor'
4. In the Shader window, press 'Add Slot' then 'Save Asset' then close the Shader window
5. Try opening the same graph again
Expected: shader node and window load in and there are no errors
Actual: the shader window fails to load in and the console throws a "NullReferenceException: Object reference not set to an instance of an object" error
Reproduced in: 2018.1.7f1, 2018.2.0f1, 2018.2.0f2, 2018.2.0f2 (macOS 10.13)
Note:
Older versions prior to 2018.1 were not tested due to Shader Graph not being implemented yet
2018.3 was not tested due to Pack-Man errors
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ShaderGraph.Drawing.Slots.MultiFloatSlotControlView..ctor (INode node, System.String[] labels, System.Func`1 get, System.Action`1 set) (at C:/Users/Student QA/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.shadergraph@1.1.3-preview/Editor/Drawing/Views/Slots/MultiFloatSlotControlView.cs:23)
UnityEditor.ShaderGraph.Vector4MaterialSlot.InstantiateControl () (at C:/Users/Student QA/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.shadergraph@1.1.3-preview/Editor/Data/Graphs/Vector4MaterialSlot.cs:52)
UnityEditor.ShaderGraph.Drawing.PortInputView..ctor (UnityEditor.ShaderGraph.MaterialSlot slot) (at C:/Users/Student QA/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.shadergraph@1.1.3-preview/Editor/Drawing/Views/PortInputView.cs:51)
UnityEditor.ShaderGraph.Drawing.MaterialNodeView.UpdatePortInputs () (at C:/Users/Student QA/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.shadergraph@1.1.3-preview/Editor/Drawing/Views/MaterialNodeView.cs:341)
UnityEditor.ShaderGraph.Drawing.MaterialNodeView.Initialize (UnityEditor.ShaderGraph.AbstractMaterialNode inNode, UnityEditor.ShaderGraph.Drawing.PreviewManager previewManager, IEdgeConnectorListener connectorListener) (at C:/Users/Student QA/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.shadergraph@1.1.3-preview/Editor/Drawing/Views/MaterialNodeView.cs:126)
UnityEditor.ShaderGraph.Drawing.GraphEditorView.AddNode (INode node) (at C:/Users/Student QA/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.shadergraph@1.1.3-preview/Editor/Drawing/Views/GraphEditorView.cs:335)
UnityEditor.ShaderGraph.Drawing.GraphEditorView..ctor (UnityEditor.EditorWindow editorWindow, UnityEditor.ShaderGraph.AbstractMaterialGraph graph, System.String assetName) (at C:/Users/Student QA/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.shadergraph@1.1.3-preview/Editor/Drawing/Views/GraphEditorView.cs:149)
UnityEditor.ShaderGraph.Drawing.MaterialGraphEditWindow.Initialize (System.String assetGuid) (at C:/Users/Student QA/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.shadergraph@1.1.3-preview/Editor/Drawing/MaterialGraphEditWindow.cs:496)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- UI Builder background color picker alpha values are set to even numbers when saving alpha value as an odd number
- Objects are hard to read in the Hierarchy when using a high resolution display with a low display scale
- Animation triggers do not reset after playing animation
- "Invalid vertex attribute format" error message does not mention "bytes" when the data size is mismatched
- [Windows] About Unity window displays Editor version in two lines instead of one when monitor scale set to 250%
Add comment