Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Bug Unity 2019.3.15 - Crash on launch due to shader warmup

Discussion in 'Editor & General Support' started by Ferazel, May 30, 2020.

  1. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    518
    Just wanted to post this here in case it saves some people some time.
    If you upgrade to 2019.3.15 and notice that the editor silently crashes when opening your project you may be experiencing a bug that I was struggling with.

    I was seeing this stack trace in the Editor.log.
    Code (CSharp):
    1. ========== OUTPUTTING STACK TRACE ==================
    2.  
    3. 0x00007FF63B8173E9 (Unity) GetRenderPipelineScript
    4. 0x00007FF63B8227B7 (Unity) ScriptableRenderContext::ShouldUseRenderPipeline
    5. 0x00007FF63BAC999C (Unity) ShouldGenerateTiersForSnippet
    6. 0x00007FF63BAD6AD6 (Unity) ShaderLab::Program::CompileShaderSubProgram
    7. 0x00007FF63BAD89F6 (Unity) ShaderLab::Program::GetMatchingSubProgram
    8. 0x00007FF63BAE046E (Unity) ShaderLab::ShaderState::FindSubProgramsToUse
    9. 0x00007FF63BADE88B (Unity) ShaderLab::ShaderState::ApplyShaderState
    10. 0x00007FF63BACE609 (Unity) ShaderLab::Pass::ApplyPass
    11. 0x00007FF63BAB9458 (Unity) DrawVBOChunkWithPass
    12. 0x00007FF63BAC991F (Unity) ShaderWarmupFuncImpl
    13. 0x00007FF63BACB717 (Unity) ShaderVariantCollection::WarmupOneShaderImpl
    14. 0x00007FF63BACC289 (Unity) ShaderVariantCollection::WarmupShadersImpl
    15. 0x00007FF63BACBA52 (Unity) ShaderVariantCollection::WarmupShaders
    16. 0x00007FF63B1D66C1 (Unity) GraphicsSettings::WarmupPreloadedShaders
    17. 0x00007FF63B979D33 (Unity) InitializeEngineGraphics
    18. 0x00007FF639D4551C (Unity) Application::InitializeProject
    19. 0x00007FF63A6C0BC4 (Unity) WinMain
    20. 0x00007FF63D692692 (Unity) __scrt_common_main_seh
    21. 0x00007FF8AF8D7BD4 (KERNEL32) BaseThreadInitThunk
    22. 0x00007FF8B0CCCE51 (ntdll) RtlUserThreadStart
    23.  
    24. ========== END OF STACKTRACE ===========
    As a workaround, you can remove your shader variants from your project settings. You can delete your project's Library folder and open the project in the editor. Go to Project Settings > Graphics and remove pre-warming your shader variants collection. Then the project will open consistently after removing your shader variants.

    I have submitted bug (1251734) to have them fix it in a new version.
     
    xVergilx likes this.
  2. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    This happens on 2019.3.14 as well.
    Caused by the graphics settings preloading shaders / shader variant collection.

    I've added yesterday a shader variants collection to the project, and was unable to start .14 version. (Infinite loading instead of the crash)

    Updated to the .15 and got the same crash stack.
     
  3. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Also, its possible to manually remove preloaded shader variants without deleting library. After that project loads.

    In ProjectsSettings/GraphicsSettings.asset remove lines related to the m_PreloadedShaders.
    (via any text editor if your asset serialization is set to text)
     
  4. MartinWorker

    MartinWorker

    Joined:
    Feb 24, 2015
    Posts:
    12
    I got a freeze today in 2019.3.15, when i instanced an object (a bullet with trails and effects). The editor's screen freezed, I had to wait more than 1 minute to get back my sytem. Then the editor's screen stay white. I pressed close , and i got a would you like to save popup. Our testers got random crashes too.. Unity has never get stable build for HDRP. :(
     
  5. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    I got the same issue since 2019.3.15.
    Removing the shader variant is not a fix as we need them (we use asset bundles).
    2019.4 LTS has the same issue. Pink textures everywhere now, we can't update to LTS without this fix.
    @Ferazel Do you have a link to the issue? So I can vote.
     
  6. juanfornos

    juanfornos

    Joined:
    Feb 17, 2018
    Posts:
    10
    I'm also experiencing this after upgrading to Unity 2019 LTS. I would like to add my vote to the issue too. @Ferazel Can you please provide a link to it? Thanks.
     
  7. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    518