Search Unity

Bug Saving a scene cause Application.ExecuteMenuItem to take about 6 minutes to complete

Discussion in '2020.2 Beta' started by YuriyPopov, Dec 10, 2020.

  1. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    135
    After Upgrading to beta 14 my entire project slowed down. Every action takes minutes or leads to a crash. Downgrading the project version does not help. Why is this happening and how can I fix it ?
    This is what the editor loged after a 10 minute wait to save the scene
    "
    Start importing ProjectSettings/ProjectSettings.asset using Guid(00000000000000004000000000000000) Importer(-1,00000000000000000000000000000000) -> (artifact id: '344b48fc4590ad6a6dcbfc9b57464d8d') in 0.002673 seconds
    Refreshing native plugins compatible for Editor in 1.38 ms, found 6 plugins.
    Preloading 0 native plugins for Editor in 0.00 ms.
    RefreshInfo: StopAssetImportingV2(NoUpdateAssetOptions) scanfilter:
    RefreshProfiler: Total: 154.041ms
    Start importing Assets/Scenes/Main menu scene.unity using Guid(9b58d4ea5bdcd5048913957f858be1da) Importer(-1,00000000000000000000000000000000) -> (artifact id: '857e5f1e96e4fdd5ae8bc3ad4ece6abd') in 0.000802 seconds
    Refreshing native plugins compatible for Editor in 1.18 ms, found 6 plugins.
    Preloading 0 native plugins for Editor in 0.00 ms.
    RefreshInfo: StopAssetImportingV2(NoUpdateAssetOptions) scanfilter:
    RefreshProfiler: Total: 178.427ms"


    Edit: Reverting back to beta 8 fixed the issues. Issues were present in beta 12, 13 and 14
     
    Last edited: Dec 10, 2020
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,491
    Hi @YuriyPopov,

    Could you please submit a bug report with reproduction steps and ideally a reproduction project attached?
     
  3. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    135
    Submiting the project would be tough since it is rather large. After profiling a bunch I figured out that what takes the most time( about 12 mins) is compiling shaders and more specifically reading from the shader cache.
     
    P_Jong likes this.
  4. Mafutta

    Mafutta

    Joined:
    Sep 30, 2014
    Posts:
    36
    Also see this on Unity 2020.2.1f1. It takes a few minutes to enter play mode.
     
  5. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    135
    Hey we narrowed down the issue to shader variant caching. Deleting the Library folder fixed it. Also removing a bunch of trird party shaders that were causing the spike in variants.
     
    LeonhardP likes this.
  6. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    48
    How did you do it? We're having the same issue with waiting for ExecuteMenuItem, but we don't know what causes it. Editor.log doesn't have any long operations logged - only some ms or seconds, but we sometimes wait for 6 minutes.
    I thought enabling Editor Deep Profiler would show something, but nope. =(
     
  7. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    174
    Also having this issue where saving the scene sometimes causes Application.ExecuteMenuItem to take 2+ minutes. It doesn't always happen, but I'm not sure what is causing it to happen when it does. Unity 2020.2.0f1

    Edit: Nevermind, its now at 10+ minutes. Guess I'll just kill the application and reopen Unity.
     
    Last edited: Jan 31, 2021
  8. FlorianBernard

    FlorianBernard

    Joined:
    Jun 9, 2015
    Posts:
    146
    Encountering the same issue when Addressable Windows are opened. Seriously annoying.

    2020.2.2f1
     
  9. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    48
    We fixed it by removing Library folder. I guess when you upgrade often, these issues might happen
     
  10. Personuo

    Personuo

    Joined:
    Mar 19, 2014
    Posts:
    70
    Same problem when I build addressable in android.
    It's take my a lot time.
     
  11. Personuo

    Personuo

    Joined:
    Mar 19, 2014
    Posts:
    70
    On average, it gets stuck once an hour and cannot be solved
     
  12. PJY

    PJY

    Joined:
    Jun 4, 2015
    Posts:
    5
    Same issue... ( Unity 2020.2.6f1 )

    and..
    ShaderCache.db in the Library folder is very big size.
     

    Attached Files:

  13. Personuo

    Personuo

    Joined:
    Mar 19, 2014
    Posts:
    70
    This has seriously affected my development, and I don't think such a devastating error should appear on the lts version
     
    P_Jong likes this.
  14. Personuo

    Personuo

    Joined:
    Mar 19, 2014
    Posts:
    70
    A few hours later, the problem came back
     
    P_Jong likes this.
  15. unity_4A16D5F13FAF0E85A614

    unity_4A16D5F13FAF0E85A614

    Joined:
    Mar 21, 2021
    Posts:
    1
    I'm having this issue as well, gets hung up when creating an android build and saving sometimes. Can take 10 minutes+ to complete these. Really frustrating.
     
  16. gewl

    gewl

    Joined:
    May 19, 2016
    Posts:
    22
    I'm encountering this as well. Last two times I've saved my scene, this has run for about 10 minutes.
     
  17. firozjokhi

    firozjokhi

    Joined:
    Nov 11, 2020
    Posts:
    2
    Same issue here. Switching scenes or saving a scene causes 10+ minutes of 'Application.ExecuteMenuItem' popup.

    My ShaderCache.db is 19GB in size.
     
  18. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    700
    up to 12min
    in
    Unity 2020.3.2f1 and 2020.3.3f1

    Unbenannt.JPG

    Is there any way to find out why?

    Adressable and Package Manager Windows are closed.
     
  19. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    6,132
    LeonhardP and RunninglVlan like this.
unityunity