Search Issue Tracker

Fixed in 2.1.2

Votes

3

Found in [Package]

0.1.7

Issue ID

1080367

Regression

No

[Post Processing] ArgumentNullException error spams console when the package is removed and installed again

Package: PostProcessing

-

ArgumentNullException error spams console when the package is removed and installed again, while "Post Process Layer" component was used in the scene. The exception keeps occurring in the following cases

1. After re-adding the component to the game object
2. On creating a new game object with the component
2. On playing the scene
3. On scaling game or scene window

Steps to Repro:
1. Create a new or open attached project
2. Window > package manager
3. Install post-processing package
4. Hierarchy > camera > add 'Post Process Layer' component
5. Repeat step 1 > remove post-processing package
6. Repeat step 1 and 2
7. Play scene

Actual result:
1. The console is spammed with errors

Occurring with:
2018.3.0b1, 2018.1.9f2

Package Version:
2.0.12, 2.0.5, 0.1.7

Note:
1. Once this case occurs an additional error comes on installing the package please check error 2 in the stack trace

Stack trace:
Error 1:
ArgumentNullException: Value cannot be null.
Parameter name: value
UnityEngine.MaterialPropertyBlock.SetTexture (System.Int32 nameID, UnityEngine.Texture value) (at C:/buildslave/unity/build/Runtime/Export/Shader.cs:130)
UnityEngine.Rendering.PostProcessing.Dithering.Render (UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context) (at Library/PackageCache/com.unity.postprocessing@2.0.12-preview/PostProcessing/Runtime/Effects/Dithering.cs:31)
UnityEngine.Rendering.PostProcessing.PostProcessLayer.RenderBuiltins (UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context, System.Boolean isFinalPass, System.Int32 releaseTargetAfterUse) (at Library/PackageCache/com.unity.postprocessing@2.0.12-preview/PostProcessing/Runtime/PostProcessLayer.cs:872)
UnityEngine.Rendering.PostProcessing.PostProcessLayer.Render (UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context) (at Library/PackageCache/com.unity.postprocessing@2.0.12-preview/PostProcessing/Runtime/PostProcessLayer.cs:706)
UnityEngine.Rendering.PostProcessing.PostProcessLayer.BuildCommandBuffers () (at Library/PackageCache/com.unity.postprocessing@2.0.12-preview/PostProcessing/Runtime/PostProcessLayer.cs:441)
UnityEngine.Rendering.PostProcessing.PostProcessLayer.OnPreCull () (at Library/PackageCache/com.unity.postprocessing@2.0.12-preview/PostProcessing/Runtime/PostProcessLayer.cs:298)

Error 2:
ArgumentException: Object at index 0 is null
UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs, UnityEngine.Object context) (at C:/buildslave/unity/build/Editor/Mono/SerializedObject.bindings.cs:39)
UnityEditor.Editor.GetSerializedObjectInternal () (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:525)
UnityEditor.Editor.get_serializedObject () (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:432)
UnityEditor.Rendering.PostProcessing.BaseEditor`1[T].FindProperty[TValue] (System.Linq.Expressions.Expression`1[TDelegate] expr) (at Library/PackageCache/com.unity.postprocessing@2.0.12-preview/PostProcessing/Editor/BaseEditor.cs:18)
UnityEditor.Rendering.PostProcessing.PostProcessDebugEditor.OnEnable () (at Library/PackageCache/com.unity.postprocessing@2.0.12-preview/PostProcessing/Editor/PostProcessDebugEditor.cs:31)

  1. Resolution Note (fix version 2.1.2):

    Error no longer appears when Post Processing package is removed and installed again, while "Post Process Layer" component is used in the scene.

Comments (2)

  1. eliGasious

    May 06, 2019 19:03

    Same error in Unity 2019.1.1f1, and I am not using the post-processing package.

  2. RedHillbilly

    Oct 21, 2018 15:50

    Same error in Unity 2018.3, and I am no using the post-processing package.
    The error seems to appear randomly.

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.