Search Issue Tracker

Fixed in future release

Votes

16

Found in

2017.1.0b9

Issue ID

919997

Regression

No

Crash in ShaderVariantCollection::GetShaderKeywordSetForShader when building on any platform

Build Pipeline

-

-

Priority: 7Not yet prioritized for a release

-

Severity: 1Crash or major loss of functionality

Reproduction Steps:
1. Import attached project.
2. Build and Run on any platform. (Login and Main scenes need to be included)

Result: Unity crashes.

Stack trace:
0x00000001414BF7BA (Unity) ShaderVariantCollection::GetShaderKeywordSetForShader
0x00000001403FDDDD (Unity) UpdateShaderUsageTagRecursive
0x00000001403FDEBA (Unity) UpdateShaderUsageTagRecursive
0x00000001403FDFBD (Unity) ComputeShaderVariantCollectionShaderUsageFlags
0x000000014040FD82 (Unity) ComputeBuildUsageTagOnObjects
0x0000000140410569 (Unity) ComputeBuildUsageTagOnObjects
0x0000000140431AEE (Unity) ComputeBuildUsageTagOnObjects
0x00000001404326BA (Unity) CompileGlobalGameManagerDependencies
0x00000001404400F2 (Unity) BuildPlayerData
0x0000000140443180 (Unity) DoBuildPlayer_Build
0x0000000140443246 (Unity) DoBuildPlayer
0x0000000140444047 (Unity) BuildPlayer
0x0000000141744ED1 (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
0x000000003C03E877 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,UnityEditor.BuildOptions,bool)
0x000000003C03E2DA (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:155] UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
0x000000003C0397AF (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83] UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
0x000000003C02228E (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:1026] UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform)
0x000000003C015208 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:953] UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
0x000000003BFFC0CD (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:593] UnityEditor.BuildPlayerWindow:OnGUI ()
0x0000000013596C42 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFE0E885B63 (mono) [c:\buildslave\mono\build\mono\mini\mini.c:4937] mono_jit_runtime_invoke
0x00007FFE0E7D872D (mono) [c:\buildslave\mono\build\mono\metadata\object.c:2623] mono_runtime_invoke
0x00007FFE0E7DEC3B (mono) [c:\buildslave\mono\build\mono\metadata\object.c:3838] mono_runtime_invoke_array
0x00007FFE0E79D0F7 (mono) [c:\buildslave\mono\build\mono\metadata\icall.c:2750] ves_icall_InternalInvoke
0x0000000013560257 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
0x000000001355E3B2 (Mono JIT Code) [/Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222] System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
0x00000000136444DF (Mono JIT Code) [/Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115] System.Reflection.MethodBase:Invoke (object,object[])
0x0000000015466F85 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:272] UnityEditor.HostView:Invoke (string,object)
0x0000000015466E2A (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:265] UnityEditor.HostView:Invoke (string)
0x000000003BFFA772 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:94] UnityEditor.HostView:OnGUI ()
0x0000000013596C42 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFE0E885B63 (mono) [c:\buildslave\mono\build\mono\mini\mini.c:4937] mono_jit_runtime_invoke
0x00007FFE0E7D872D (mono) [c:\buildslave\mono\build\mono\metadata\object.c:2623] mono_runtime_invoke
0x00000001413FA355 (Unity) scripting_method_invoke
0x00000001413F2571 (Unity) ScriptingInvocation::Invoke
0x00000001410354E3 (Unity) MonoBehaviourDoGUI
0x0000000141027D10 (Unity) IMGUIModule::MonoBehaviourDoGUI
0x000000014116D4FD (Unity) MonoBehaviour::DoGUI
0x0000000140029F36 (Unity) GUIView::OnInputEvent
0x00000001401B0E23 (Unity) GUIView::ProcessInputEvent
0x0000000140006AA1 (Unity) GUIView::ProcessEventMessages
0x000000014002D9C5 (Unity) GUIView::GUIViewWndProc
0x00007FFE6945AF83 (USER32) CallWindowProcW
0x00007FFE6945A90F (USER32) DispatchMessageW
0x0000000141A768FA (Unity) MainMessageLoop
0x0000000141A78327 (Unity) WinMain
0x0000000141CD9EEC (Unity) __tmainCRTStartup
0x00007FFE696131E4 (KERNEL32) BaseThreadInitThunk
0x00007FFE6BE9FAC1 (ntdll) RtlUserThreadStart

Reproducible with: 2017.1.0b1, 2017.1.0b9, 2017.2.0a3

Note: Due to errors, the project does not work on previous versions.

Comments (8)

  1. D71ed81094da403e2fe50bef655de11f?d=mm

    dobrMAN

    Aug 22, 2017 09:58

    Have some issue in 2017.1.0f3

  2. Fcd7dccc5fb77e9e7a100bb95f4f95b9?d=mm

    daniel-griffiths

    Jul 28, 2017 08:42

    Hi I am getting this is issue also. The problem i have is i have 100's of shaders and would take hours to try and change and not guaranteed the suggested fixes by users will work. Unity please can you look into this ASAP. Thanks

  3. C50adf388b07484bfca38d2895576888?d=mm

    dhunnicutt

    Jul 27, 2017 00:06

    Had the same problem in my project. It actually doesn't seem like missing Properties but rather a missing Pass. Anyway, I ended up just switching my Fallback to either Fallback Off or Fallback "Diffuse" which seems fine now.

  4. 7f5e9d040c4b67d7eaa48d64ce1297c4?d=mm

    chmodseven

    Jul 24, 2017 14:20

    I am having the same problem here, with builds that worked on 5.6 no longer working in 2017.1 (iOS build).

    In one of my scripts, I was doing a warmup of a ShaderVariantCollection, to try to manage load time spikes. When I removed this code, the problem still happened. However when I removed the code AND removed the saved .shadervariants file that I was referencing, the build started working again.

    Trying to clear and rebuild the shader variants asset under Graphics did not repair the problem, which came back. However leaving the code back in place did not cause any problem. Therefore the issue seems to be with having the .shadervariant file in the project, for whatever reason.

    Hope that helps some with the bug analysis.

  5. 7b05da8ca0232baf66a4a30dc0dd14b3?d=mm

    MikeHergaarden

    Jul 21, 2017 08:52

    This is crashing our editor for every assetbundle build we try to make. Never crashed in 5.6 or earlier.

  6. 21bad74b99d4c81185a41ee1423f617d?d=mm

    GarethPikPok

    Jul 18, 2017 23:27

    Likewise happens for us in our project (tested in Unity 2017.1.0f3). Was not a problem in Unity 5.6.1p4 (same project). For us, it happens when we attempt to build our asset bundles (our shader variants are stored in their own bundle).

  7. Ef6e46a4618e6735d8e5e815430339df?d=mm

    efruchter-within

    Jul 06, 2017 20:57

    Also noticed this in our project. Removed all fallbacks and still the same error.

  8. 6ada54c086e289ddb671414d0e85e259?d=mm

    Invertex

    Jun 19, 2017 10:53

    The root of this issue is to do with the "Fallback" value in shaders. I am guessing that if a shader does not have the material properties that the Fallback shader requires, it is causing a shader compilation error, as removing the Fallback value from our shaders fixes this issue and allows us to build again.

All about bugs

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