I’m not sure where to go from here. The game runs fine in the editor, but when I try to build a standalone executable (for win64) it builds for about an hour, then dies at some point when it’s stripping shader variants. I’ve tried NOT stripping anything, but it still dies at the same place. The top of the crashing stacktrace is always “OnPreprocessShaderVariants”. Does anyone have any ideas what else I can try?
Here’s the actual stacktrace:
Obtained 67 stack frames
0x00007ff788a4f2d8 (Unity) OnPreprocessShaderVariants
0x00007ff7889b8818 (Unity) CompileGpuProgramSnippets
0x00007ff7889ba01f (Unity) CompileShaderSubprograms
0x00007ff7889b9721 (Unity) CompileShaderSubprograms
0x00007ff78944366b (Unity) Shader::Transfer<StreamedBinaryWrite>
0x00007ff787dee65b (Unity) SerializedFile::WriteObject
0x00007ff787dd8158 (Unity) PersistentManager::WriteFile
0x00007ff787dd9f3f (Unity) PersistentManager::WriteFile
0x00007ff788a7b729 (Unity) WriteSharedAssetFile
0x00007ff788a6897e (Unity) CompileSharedAssetsFile
0x00007ff7897554eb (Unity) BuildPlayerData
0x00007ff78975e58c (Unity) DoBuildPlayer_Build
0x00007ff78975cf46 (Unity) DoBuildPlayer
0x00007ff789750f8d (Unity) BuildPlayer
0x00007ff787635b4d (Unity) BuildPipeline::BuildPlayerInternalNoCheck
0x00007ff78748ca5f (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
0x000001a4bd876be7 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,UnityEditor.BuildOptions,string[],bool)
0x000001a4bd8762d3 (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
0x000001a4bd870653 (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
0x000001a4bd890ef3 (Mono JIT Code) UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform,UnityEditor.Modules.IBuildPostprocessor)
0x000001a4bd8875b3 (Mono JIT Code) UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
0x000001a4b9319583 (Mono JIT Code) UnityEditor.BuildPlayerWindow:OnGUI ()
0x000001a4a82d834a (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect)
0x000001a4a82d8163 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect)
0x000001a4a82ca65b (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
0x000001a19ca01d2f (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
0x000001a19ca00f5b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
0x000001a4b930793b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool)
0x000001a4b93077a3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool)
0x000001a4b930732b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool)
0x000001a4b9307213 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool)
0x000001a45f4048cb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleEvent (UnityEngine.UIElements.EventBase)
0x000001a45f3ee318 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase)
0x000001a4b9305423 (Mono JIT Code) UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x000001a45f3ec52e (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
0x000001a45f3ec02b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x000001a45f3f13bb (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEventQueue ()
0x000001a45f3dfc93 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
0x000001a45f3eff4b (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:Dispose ()
0x000001a45f3ec2b3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x000001a45f3eba03 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
0x000001a45f3eb87b (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
0x000001a47f501e3b (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
0x000001a47f5018e3 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
0x000001a47f50169f (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
0x000001a47f5015bb (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
0x000001a47f50140d (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
0x000001a47f5014c6 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
0x00007ff82a94e034 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007ff82a88e724 (mono-2.0-bdwgc) [object.c:3064] do_runtime_invoke
0x00007ff82a88e8bc (mono-2.0-bdwgc) [object.c:3111] mono_runtime_invoke
0x00007ff787d44474 (Unity) scripting_method_invoke
0x00007ff787d3f094 (Unity) ScriptingInvocation::Invoke
0x00007ff787d389d5 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff787e6409a (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
0x00007ff78886a716 (Unity) GUIView::ProcessRetainedMode
0x00007ff788d9fefb (Unity) GUIView::OnInputEvent
0x00007ff78886a527 (Unity) GUIView::ProcessInputEvent
0x00007ff788da0e17 (Unity) GUIView::ProcessEventMessages
0x00007ff788d9a9c3 (Unity) GUIView::GUIViewWndProc
0x00007ff8d1a01c4c (USER32) CallWindowProcW
0x00007ff8d1a00ea6 (USER32) DispatchMessageW
0x00007ff788d76143 (Unity) MainMessageLoop
0x00007ff788d7aadb (Unity) WinMain
0x00007ff78a08aaa2 (Unity) __scrt_common_main_seh
0x00007ff8d1bb54e0 (KERNEL32) BaseThreadInitThunk
0x00007ff8d2a0485b (ntdll) RtlUserThreadStart