Search Unity

Bug Waiting for Unity's code to finish executing

Discussion in 'Editor & General Support' started by blockimperium, Nov 19, 2021.

  1. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    upload_2021-11-18_21-50-1.png

    Why does Unity always have an issue with shutting itself down? This is becoming so prevalent, especially with WebGL projects. What the heck is it doing?
     
  2. Blaster-Lizard

    Blaster-Lizard

    Joined:
    Feb 15, 2013
    Posts:
    1
    The exact same happens with me. Almost everything requires the engine to stop for a couple of minutes and it just takes so long. It never happened in previous versions of the engine. They should fix this asap.
     
    ms502040 and Mythran like this.
  3. PeclitheUltra

    PeclitheUltra

    Joined:
    Apr 29, 2021
    Posts:
    1
    This happened to me after enabling Developer Mode for Windows 10, reverting to disabled solved my problem
     
  4. Kissh_dev

    Kissh_dev

    Joined:
    Jan 20, 2021
    Posts:
    1
    This still happened to me... Someone know how to fix this ?
     
  5. MarkWaldo

    MarkWaldo

    Joined:
    Dec 1, 2019
    Posts:
    12
    So, after 14 years, no one has yet answered this question that still persists in May, 2022 with the latest Unity version? I'm disappointed with this blog.
     
  6. JotaRata

    JotaRata

    Joined:
    Dec 8, 2014
    Posts:
    61
    I always get this when exiting Play mode.
    Anyone else has this too?

    upload_2022-5-7_6-42-31.png
     
  7. unity_AmSezFmN7VbhDQ

    unity_AmSezFmN7VbhDQ

    Joined:
    Nov 14, 2020
    Posts:
    7
    yep have this issue as of may 10th 2022
     
    DavidZobrist likes this.
  8. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    This seems to be happening since updating to 2021.3.x

    ever change take 3 minutes!

    Find something you want to change:
    1. Edit file in project folder, wait 1 to 2 minutes
    2. Press play, wait another minute
    3. press stop, wait 30 seconds.

    Seriously, this is absolutley ridiculous. @JeffDUnity3D The Development toggle makes no difference. If this isn't your area maybe you know someone who can comment on this? Wasting So Much time its beyond funny
     
    nh92, URPian, DavidZobrist and 4 others like this.
  9. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Anyone experiencing this, is this happening on Win 11? For me it is, just upgraded and its been happening since
     
    Evocress_, DavidZobrist and JotaRata like this.
  10. JotaRata

    JotaRata

    Joined:
    Dec 8, 2014
    Posts:
    61
    This is happening to me since I upgraded to Unity 2021.3
     
  11. Jishnu2010

    Jishnu2010

    Joined:
    Jan 7, 2022
    Posts:
    4
    Not only when exiting Unity(2021.3), I also have to wait for like 5-6 mins whenever I make a change in any C# file. Even a very small change like changing the value of a variable takes so much time. Unity 2020.3.25f1 is much,much more faster and doesn't have so many bugs like icons disappearing etc.
     
  12. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Yeah, seems to be any code or project folder change. Plus start and stop editor play mode.
    It’s a recompile issue, seems to be worse in larger projects.
     
    Anonym1414 likes this.
  13. unknownsk

    unknownsk

    Joined:
    Jan 16, 2020
    Posts:
    36
    It still happens! This is so annoying and slows down development process. I have to crash unity with task manager. They need to fix this!
     
  14. ajayiolaniyi

    ajayiolaniyi

    Joined:
    May 18, 2022
    Posts:
    1
    happening to me right now
     
    Swann06 likes this.
  15. rajsoni1232

    rajsoni1232

    Joined:
    Dec 16, 2019
    Posts:
    1
    Ever since I updated to 2021.3.2f1. I am facing this issue too.
     
    DavidZobrist likes this.
  16. ms502040

    ms502040

    Joined:
    Jan 9, 2019
    Posts:
    18
    Same here when enter | exit play mode with or without changes in script | assets | scene - Unity 2021.3.3f1 and unity 2021.3.2f1
     
    DavidZobrist likes this.
  17. Wec25

    Wec25

    Joined:
    Jun 16, 2021
    Posts:
    1
    Updating to 2021.3.3f1 was a mistake because ever since i updated i've gotten this error. currently at 9 minutes just going to end the task...
     
    Swann06, URPian and DavidZobrist like this.
  18. jay3sh

    jay3sh

    Joined:
    Dec 30, 2013
    Posts:
    19
    Bump. I'm seeing the same issue on 2021.3.2f1. Every time I save a script OR I play in editor, I get "reloading script assemblies" progress bar followed by "Waiting for Unity's code to finish executing". On my machine it takes at least 30 seconds each time.
     
    ms502040 likes this.
  19. inveth7

    inveth7

    Joined:
    Mar 26, 2022
    Posts:
    2
    Issue still there on 2021.3.4f1
     
  20. hualinZhang

    hualinZhang

    Joined:
    Dec 15, 2016
    Posts:
    3
    2021.3.1f1c1 Evety time I call
    Code (CSharp):
    1. AsyncOperationHandle initializeHandle = Addressables.Initialize();
    2. initializeHandle.WaitForCompletion();
    In AddressblesGroups->PlayModeScript->Using exiting Build(windows)
    It takes forever.
     
    Last edited: Jun 5, 2022
    mmlp likes this.
  21. XanderHD

    XanderHD

    Joined:
    Mar 9, 2016
    Posts:
    3
    having this issue since i upgraded my project to the latest 'stable LTS' version of 2021.3 last week...
     
  22. michealcaj

    michealcaj

    Joined:
    Aug 18, 2017
    Posts:
    191
    Lol same come on unity3d what the f is going on first collabs now this , come on
     
  23. michealcaj

    michealcaj

    Joined:
    Aug 18, 2017
    Posts:
    191
    Yes lazy bones have not fixed it
     
  24. aDittami

    aDittami

    Joined:
    Dec 10, 2012
    Posts:
    1
    Experiencing this issue, as well. Anyone find a fix?
     
  25. kingofhypocrites_unity

    kingofhypocrites_unity

    Joined:
    Jun 19, 2020
    Posts:
    4
    Yeah this is ridiculously annoying. How has this not been fixed yet?
     
  26. antja0

    antja0

    Joined:
    Dec 7, 2015
    Posts:
    8
    For what it's worth, also experiencing this issue
     
  27. lasse5720

    lasse5720

    Joined:
    Nov 4, 2021
    Posts:
    3
    I started having this issue after using hdrp
     
    stefanutz1504 likes this.
  28. Omi

    Omi

    Joined:
    Dec 2, 2012
    Posts:
    9
    Upgrading from 2021.3.4 to 2021.3.6f1 to see if this issue goes away.
     
  29. yekimevol

    yekimevol

    Joined:
    Nov 28, 2012
    Posts:
    7
    Getting this issue in 2021.3.0f1
     
    jorikito likes this.
  30. ShuiRun108

    ShuiRun108

    Joined:
    Apr 13, 2022
    Posts:
    5
    no use for me
     
  31. ShuiRun108

    ShuiRun108

    Joined:
    Apr 13, 2022
    Posts:
    5
    2021.3.1 & win 10
     
  32. cchenece

    cchenece

    Joined:
    Nov 6, 2021
    Posts:
    1
    I have similar issue. Spinning at GizmoManager.DrawGizmos after I switch to DX12 inside Unity Editor.
    I experienced same issue on both 2021.2.2f1 and 2021.3.6f1.
    Windows 10 with Intel IG.
    What GPUs are you guys using? Wondering if it has anything to do with graphics driver.
     
  33. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    I upgraded my hdrp project to 2021.3.6f1 and I'm getting this issue too. I have a large project, and currently when I click to enter "Playmode" it's been on the "hold on" window for 1 hour 37 minutes so far lol.

    It was taking a long time in the last Editor version I used (2020.1.0b10), and when I killed the process with windows task manager, it completely corrupted my project somehow. That's why I upgraded to a newer version.

    I'd say 1.5+ hours to enter playmode is kind of bad..... lol. If it ever actually enters playmode that is. Maybe something in my project got corrupted beyond repair? I don't know.
     
  34. MO-NASSER

    MO-NASSER

    Joined:
    Dec 4, 2019
    Posts:
    1
    Getting this issue in 2021.3.5f1
     
    live-unity likes this.
  35. LackyHaus

    LackyHaus

    Joined:
    Jul 30, 2022
    Posts:
    1
    Did no one be able to fix this problem?
     
  36. GameRickster

    GameRickster

    Joined:
    Apr 28, 2018
    Posts:
    21
    This has to be so annoying. It has something to do with your Hierarchy, you must have some object with some script, missing, etc.
     
  37. trikingo

    trikingo

    Joined:
    Oct 22, 2020
    Posts:
    3
    This is happening to me 2021.3.7f
    A workaround that seems to prevent this issue is to open a different scene and then go back to your original scene (the one you are testing) without even saving or doing any change. For some reason it prevents the bug. A bit annoying if your scene is big, but other than that is better than killing the process and reopening Unity every time.
     
  38. zenwatermelon168

    zenwatermelon168

    Joined:
    Sep 23, 2020
    Posts:
    6
    Unity 2021.3.7f1
    Sometimes the editor gets stuck on entering playmode for ages (at least 5 minutes), other times the entire editor crashes when Entering play mode. Even when there are no changes to the scripts. Been having the same issue across other projects too. What is most frustrating is the lack of any errors.
    I also work on VR games, so could be something to do with OpenXR. But this version of Unity is a**.
     
    DavidZobrist and kfireven like this.
  39. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Unity 2022.1.13f1 - Clompletely locking up when opening any scene in project. Waited 5+ minutes and still locked I think Unity is in an infinite loop???
     
  40. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Surely a simple close [x] button would create a work around to this issue.
     
    RiverExplorer and Recon03 like this.
  41. Akura

    Akura

    Joined:
    Jun 28, 2015
    Posts:
    23
    I could fix the problem in my project by deleting a game object in the hierarchy which i probuilderized.
     
  42. Solphist

    Solphist

    Joined:
    Mar 1, 2015
    Posts:
    12
    My Unity version is 2021.3.6f
    This issue happens on a new 3d standard core project,
    I'm presently exporting music and sfx into my own library for wwise to use.
    The only thing added to the base project is sound and music files. I've exported 32k files from another source no problem but with unity it's taking forever to do the exact same thing.
    The package mangler has always been painful to work with though, tbf it has gotten a good bit better than it used to be a few years ago, but even now it still feels fragile, so it feels like there's still a good bit of work to do on it yet.
     
  43. goodnewsjimdotcom

    goodnewsjimdotcom

    Joined:
    May 24, 2017
    Posts:
    342
    I get this. Unity has become completely unstable after this new CEO joined. All flash, no substance. Dog and pony shows... Please fix unity's stability. GOtta force crash unity now again...
     
    Anonym1414 likes this.
  44. SoftwareConductor

    SoftwareConductor

    Joined:
    Mar 8, 2015
    Posts:
    12
    Still having this issue when debugging with visual studio.
    Using Unity version "2021.3.7f1"

    Any news regarding this issue?
     
  45. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Yeah, between the wait for recompile and insane build time, with unity 2021 lts I've wasted so much time. It is very disappointing.
     
    Last edited: Aug 30, 2022
    IS_Twyker likes this.
  46. nubbyninja

    nubbyninja

    Joined:
    May 16, 2019
    Posts:
    25
    Necro, but, this problem still exists in Unity 2022.1.13f1
    This is me, trying to find a solution.
     
  47. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Damn, I was under the impression that this was a 2021 issue only and that it would be resolved in 2022.

    It's becoming really time consuming to work on large projects in Unity.
     
    RiverExplorer and CloudyVR like this.
  48. kfireven

    kfireven

    Joined:
    Oct 18, 2016
    Posts:
    38
    What the... it's completely unusable. No one found a solution? No official comment? UNITY 2021.3.X
     
  49. spuchals

    spuchals

    Joined:
    Sep 29, 2018
    Posts:
    8
    Hi guys, I've stumbled upon this post while having the issue and I managed to fixed it, so I'm writing down what helped me.
    As others suggested, it was looking like there's an infinite loop in a script, which surprised me, but anyway.
    I disabled every GameObject in the scene, and after each succesful Play mode, I reenable one, which will show you the culprit that makes it stuck.
    Then you have to debug the scripts on that GameObject to find the loop.
    So for me it wasn't Unity's fault.
     
    Shubham_rgupta likes this.
  50. zenwatermelon168

    zenwatermelon168

    Joined:
    Sep 23, 2020
    Posts:
    6
    This is not related to the problem. This happens on empty scenes too. Between multiple projects.
     
    RiverExplorer and LtKelleyUSMC like this.