Search Issue Tracker

Active

Under Consideration for 2022.3.X, 6000.0.X, 6000.1.X

Votes

0

Found in

2022.3.54f1

6000.0.33f1

6000.1.0b1

Issue ID

UUM-92319

Regression

Yes

NullReferenceException and temporary graph corruption after entering playmode if output node connection was changed

--

-

*Steps to reproduce:*

1. Open attached project

2. Open SampleScene from Assets/Scenes directory

3. Open "New VFX", if not already open and dock it so both vfx graph and scene view windows would be visible

4. In visual effects graph window, connect "Output Particle Unlit Quad" node to the "Update Particle" node in "Burst" node group

5. Disconnect "Output Particle URP List Mesh" node from the same node group

6. Enter playmode

*Actual results:* Exception is thrown:

_NullReferenceException: Object reference not set to an instance of an object_
_UnityEditor.VFX.VFXAbstractParticleOutput.HasStrips (System.Boolean data) (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Models/Contexts/VFXAbstractParticleOutput.cs:239)_
_UnityEditor.VFX.VFXAbstractParticleOutput.get_isRayTraced () (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Models/Contexts/VFXAbstractParticleOutput.cs:139)_
_UnityEditor.VFX.VFXAbstractParticleOutput.GenerateErrors (UnityEditor.VFX.VFXErrorReporter report) (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Models/Contexts/VFXAbstractParticleOutput.cs:898)_
_UnityEditor.VFX.VFXShaderGraphParticleOutput.GenerateErrors (UnityEditor.VFX.VFXErrorReporter report) (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/ShaderGraph/VFXShaderGraphParticleOutput.cs:217)_
_UnityEditor.VFX.VFXErrorReporter.GenerateErrors () (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Models/VFXErrorManager.cs:155)_
_UnityEditor.VFX.VFXErrorManager.GenerateErrors () (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Models/VFXErrorManager.cs:48)_
_UnityEditor.VFX.VFXGraph.RecompileIfNeeded (System.Boolean preventRecompilation, System.Boolean preventDependencyRecompilation) (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs:1467)_
_UnityEditor.VFX.UI.VFXViewWindow.Update () (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/GraphView/VFXViewWindow.cs:384)_
_UnityEditor.HostView.SendUpdate () (at /Users/bokken/build/output/unity/unity/Editor/Mono/HostView.cs:705)_
_UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:384)_

If Visual Effects Graph window is closed when effect is in this state then it won't be possible to reopen it again until editor is restarted

*Expected results:* No exceptions or graph corruption

*Reproducible with versions:* 2022.3.5f1, 2022.3.54f1, 6000.0.33f1, 6000.1.0b1

*Not reproducible with versions:* 2022.3.4f1

*Can’t test with versions:* 

*Tested on (OS):* MacOS 15.1.1

*Notes:*
* It's important that visual effects graph window is visible at all times, otherwise issue does not reproduce
* Closing Visual Effects Graph window while it's throwing NullReferenceException error will get vfx asset into a corrupt state, making it impossible to open it again until editor is restarted
* See attached vfx-exception-repro-from-scratch.mov video for a demonstration on how to recreate the issue from scratch

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.