0
Fixed

picking fallback shader triggers NullReferenceException

dcodery 9 years ago updated by LennardF1989 8 years ago 5
Picture below shows the bug.
I simply create any create shader, and attach it to a material. Then, I click "pick" button for fallback shader. The NullReferenceException is triggered.

Image 421


I didn't find the folder of "C:/buildslave/..." mentioned in error information.
The post below says that "something is locking that directory". I shut down my antivirus scanner, and run Unity as administrator, which didn't solve the problem.
http://forum.unity3d.com/threads/error-building-player-ioexception-tempserializationweaver-not-empty.325074/
Maybe it is a Unity bug.

Answer

Answer
Fixed

This should have been fixed as of 1.23, which version are you on?

Under review
I'll look into this for the next version
I can't reproduce this, the bug doesn't trigger for me :(

Just managed to trigger it. I clicked "Pick", but didn't pick any shader. Now it will keep throwing the exception each time I click "Pick" again until I restart.


Here is the stacktrace:

NullReferenceException
UnityEngine.Material..ctor (UnityEngine.Shader shader) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/ShaderBindings.gen.cs:168)
ShaderForge.SFPSC_Meta.DisplayShaderContext (Rect r)
ShaderForge.SFPSC_Meta.ShaderPicker (Rect r, System.String s)
ShaderForge.SFPSC_Meta.DrawInner (UnityEngine.Rect& r)
ShaderForge.SFPS_Category.Draw (Single yOffset)
ShaderForge.SF_PassSettings.OnLocalGUI (Int32 yOffset, Int32 in_maxWidth)
ShaderForge.SF_Editor.DrawPreviewPanel (Rect r)
ShaderForge.SF_Editor.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Answer
Fixed

This should have been fixed as of 1.23, which version are you on?

Oops! My bad, my client hasn't given me the latest version yet! Just happened to ran across this post in search of where the Fallback-setting was, and saw this happening and figured I'd throw in my stacktrace for you :)