Search Issue Tracker

Fixed in 2017.3.0f3

Fixed in 2017.1.X, 2017.2.X

Votes

16

Found in

2017.1.0b9

Issue ID

919997

Regression

No

Crash in ShaderVariantCollection::GetShaderKeywordSetForShader when building on any platform

Build Pipeline

-

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 (11)

  1. shubhamswaraj2021

    Aug 18, 2020 16:40

    good one <a href="https://www.lyricsauto.com">lyricsauto</a>

  2. cozyurt_unity

    Jul 13, 2020 17:21

    kedi ve köpek mamaları kedi kumu çeşitleri www.patilimama.com

  3. chriscode

    Oct 23, 2017 02:17

    Had trouble with this : think it's the same.
    Made a new ShaderVariants file, crashed on build, every time.
    revert to old shadervariants, no crash, but no "Add shader" button at bottom as there was for the new file...

  4. dobrMAN

    Aug 22, 2017 09:58

    Have some issue in 2017.1.0f3

  5. 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

  6. 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.

  7. 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.

  8. 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.

  9. 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).

  10. efruchter-within

    Jul 06, 2017 20:57

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

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.