Search Unity

2020.3 freezing VERY often

Discussion in 'Editor & General Support' started by pistoleta, Jun 3, 2021.

  1. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    I've been experiencing this problem for a while now but now it seems its even more frequent.
    Whenever I change to Rider to Unity and compiles 8/10 times Unity editor freezes.
    The last lines I get in the Editor.log are:

    Reloading assemblies after finishing script compilation.
    Begin MonoManager ReloadAssembly
    Native extension for iOS target not found
    Native extension for OSXStandalone target not found
    Refreshing native plugins compatible for Editor in 3.62 ms, found 5 plugins.
    Preloading 0 native plugins for Editor in 0.00 ms.


    Last lines on the upm.log:

    021-06-03T15:07:13.291Z][INFO] Resolving dependencies using SAT solver
    [2021-06-03T15:07:13.476Z][INFO] GET '/project/registries' <-- Request received
    [2021-06-03T15:07:13.480Z][INFO] GET '/project/registries' --> 200 (4 ms)
    [2021-06-03T15:07:14.860Z][INFO] GET '/project/dependencies' --> 200 (1582 ms)
    [2021-06-03T15:08:21.259Z][INFO] GET '/project/dependencies' <-- Request received
    [2021-06-03T15:08:21.274Z][INFO] Resolving dependencies using SAT solver
    [2021-06-03T15:08:22.460Z][INFO] GET '/project/registries' <-- Request received
    [2021-06-03T15:08:22.470Z][INFO] GET '/project/registries' --> 200 (10 ms)
    [2021-06-03T15:08:22.843Z][INFO] GET '/project/dependencies' --> 200 (1583 ms)


    I'm not sure if this means something or I should give more details from some other log.
    Please help I'm losing a lot of time because of this.

    Unity 2020.3.12
    BigSur 11.4
    Rider 2021.1
     
    Last edited: Aug 11, 2021
    CamillaItalicDk likes this.
  2. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    I'm still having problems, unity freezes at least once every 2 hours...
    I'm wondering if having an unstable internet connection might have increased the frequency this happens. I'm using Collab by the way, not sure if has something to do...
    Any hint or advice? It's getting to my nerves.
    Thanks in advance.
     
  3. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    i have the same problem, not using collab, on windows. It freezes about every tenth recompile, but only happened after i updated to 2020.3.15f2, it wasn't an issue in earlier versions.
     
  4. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Do you use MAC or Rider ?
     
  5. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    I use windows, as i wrote, but i do use rider, yes and when it happens it's in the same situation that you mentioned, when switching between rider and unity.
     
  6. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    There is unity 2023 ?
     
  7. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,911
    This thread brought to us from the future.
     
  8. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    no, typo. sorry
     
  9. CamillaItalicDk

    CamillaItalicDk

    Joined:
    May 14, 2015
    Posts:
    8
    I have the same problem. Has any of you found a solution?
     
  10. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Upgrading to 2020.3.18 seemed to fix it, now it just freezes 2 or 3 times per day... mostly when compiling or when starting a new game...
     
  11. CamillaItalicDk

    CamillaItalicDk

    Joined:
    May 14, 2015
    Posts:
    8
    I still have the problem in Unity 2020.3.19 :(
     
  12. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Which OS do you use? do you use Rider too?
     
  13. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Do you use Rider IDE by any chance too?
     
  14. CamillaItalicDk

    CamillaItalicDk

    Joined:
    May 14, 2015
    Posts:
    8
    No we don't use Rider. But we get the exact same message in the Editor.log as you wrote in the first post.
     
  15. CamillaItalicDk

    CamillaItalicDk

    Joined:
    May 14, 2015
    Posts:
    8
    We use Mac OS 11 and Windows 10.
     
  16. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    Yes, i do, as i already mentioned before
     
  17. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    sorry I meant to answer to CamillaItalicDK... Yes I already read you also use Rider but since Camilla doesn't....
    Maybe Rider is not the reason.
    Anybody knows how can we get more info about the crash for someone to guide us with what is happening?
     
  18. CamillaItalicDk

    CamillaItalicDk

    Joined:
    May 14, 2015
    Posts:
    8
    We can report as a bug or wait for the next update. I had to downgrade to 2020.3.17 because 2020.3.19 makes my Mac insanely slow. 2020.3.17 crashes even more then 2020.3.19. So right now I can choose between lagging or crashes. Looking forward to the next update.
     
  19. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    I'm on 2020.3.18 and now my problem is it gets frozen (not crash) 3 or 4 times per day... I might upgrade to .19 soon
     
  20. CamillaItalicDk

    CamillaItalicDk

    Joined:
    May 14, 2015
    Posts:
    8
    Yeah your right. It doesn't crash but freeze.
     
  21. _GTC_

    _GTC_

    Joined:
    Mar 20, 2016
    Posts:
    8
    Experiencing the same issue here. This is the log I got from the Editor.log file.


    Reloading assemblies after finishing script compilation.
    Begin MonoManager ReloadAssembly
    Native extension for WindowsStandalone target not found
    Refreshing native plugins compatible for Editor in 1.25 ms, found 3 plugins.
    Preloading 0 native plugins for Editor in 0.00 ms.


    It freezes after switching Rider back to Unity when the auto-refresh triggers a re-compile. Unity becomes unresponsive and the only way to fix is to open the task manager and kill Unity - any unsaved scene change will be lost.

    This issue started to appear after I upgrade Unity from 2019.4.29 to 2019.4.30f1.

    After some browsing online this week, I've noticed that some other people starting to have this issue recently with Unity 2019, 2020 and 2021. Many of them are also using Rider and suspecting it is Rider's fault.

    Some people suggested that it's the Rider that triggers the auto-refreshing that causing Unity to freeze, so I tried to turn off the Auto-Refreshing flag in the Unity/Preference page, and press CTRL+R in Unity to manually trigger the refresh and re-compile inside Unity.

    This seems to help a little, previously when I have Auto-Refreshing turned on, it freezes 1/5 of the time, with Auto-Refreshing turned off, it freezes 1/10 of the time (so I am not really buying the Rider's fault theory - the issue is still happening even if I manually refresh in Unity).

    Some other issues I am experiencing that might be related:
    • After upgrading from 2019.4.28 to 2019.4.29, I started to experience Unity cannot be opened but freeze at that black "Unity" logo when open a project in Unity Hub, similarly, the only way to fix is to kill the Unity process in the task manager and re-open the project in Unity Hub again (this is the main reason I upgraded from 2019.4.29 to 2019.4.30).
    • After upgrading from 2019.4.29 to 2019.4.30, other than the refresh/recompile freeze, I also experienced the freeze when entering the Play Mode once or twice, this never happened on my PC when I am using 2019.4.28 or lower version.
    Some people also suggest all this freeze mess might be caused Plugin version incompatible with the recent Unity version. This suggestion rings a bell that I did use Odin Inspector to write some custom Always-Executing property info boxes recently (although I really doubt it's the Odin Inspector's fault as I always write custom info boxes for the past 2 years and it never becomes a problem).

    So here are all the plugins and its I am currently using:
    Odin Inspector 3.0.3.0
    DOTween v1.2.420
    Behaviour Designer Version 1.6.7
    Dialogue System for Unity Version 2.2.8
    A* Pathfinding Project Pro 4.2.15


    Unity and Rider version I am using:
    Unity 2019.4.30f1
    Rider 2021.2.1
     
  22. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    I use Odin, Dotween and A* Pathfinding too besides Rider!

    Here I use:
    Odin 3.0.4.0
    Dotween v1.2.420
    A* Pathfinding Pro 4.2.15

    Rider 2021.2.1
    Unity 2020.3.18

    I doubt A* or Dotween would be the cause since they dont do anything on Edit mode. But Odin and Rider are the most suspicious ones.
     
  23. benzsuankularb

    benzsuankularb

    Joined:
    Apr 10, 2013
    Posts:
    132
    Same issue too, Verry is annoying.
    I didn't use Rider but use Odin too.
     
    Last edited: Oct 10, 2021
  24. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Everybody using Odin?
     
  25. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
  26. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
  27. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    301
    I'm keeping a close eye on this one... (Odin dev here).

    I've not been able to reproduce it in isolation, but that of course doesn't exclude that Odin might be the cause.

    If anyone hits it, try attaching your debugger to the frozen Unity.exe and hit "Pause". You should then be able to get an overview of all the running managed threads and inspect the stack traces for each one of them. (In visual studio it's "Debug>Windows>Threads"). If there is one waiting for something or stuck in an infinite loop, you should be able to see it. Maybe there's one with Odin in its stacktrace if we're somehow the cause of this.
     
  28. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Ok!
     
  29. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    I tried but I don't seem to be able to find any useful info:
     
  30. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    301
    Strange, I don't know if Visuals Studio would be different, it's pretty good at attaching to Unity no matter what state it's in. In my experience. But I'm not sure what the best approach is to continue debugging this otherwise. I would probably start removing things, or try to see if it happens without working in Rider and just use notepad for a while. If you want to try and remove Odin, you can remove everything in the Sirenix folder except for the Sirenix.OdinInspector.Attributes.dll (That will keep the attribute definitions themselves but remove everything else Odin). Maybe also try and remove the rider, visualstudio and vscode packages from manifest.json too, it might be easier to try that first.

    Is Unity using anything of your CPU while frozen?
     
  31. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Ill try next time !
     
  32. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    This is what I could gather this time:


    But I don't seem to be able to get any specific info about the threads.... anybody knows how?
     
  33. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Seems like barely nothing....


    Sometimes, (like right now) im not even able to attach Rider to Unity.
    Really frustrating. Please people continue posting if you have the same problem to keep the post alive, and (maybe) any of the unity people will pay a bit of attention,
    Thanks all
     
  34. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
  35. Plaximo

    Plaximo

    Joined:
    Oct 26, 2016
    Posts:
    8
    Have the same problem for a few months now. I worked on 3 projects and getting this behaviour. I'm using Rider as my IDE and all projects have 2 assets in common. Odin Inspector and UniTask.

    Reading the other thread they talk that the error could come from editor scripts, since I use odin inspector to work with editor windows. Do any of you guys use odin inspector and have the same behavior?
     
  36. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    I've seen most of us at least in this thread are using Odin but we didnt conclude it's an Odin problem at least for the moment.
    @bjarkeck (Odin Dev) is trying to fetch info to see if thats the cause. You can see he posted here last week.
     
  37. Plaximo

    Plaximo

    Joined:
    Oct 26, 2016
    Posts:
    8
    I also don't think it's Odin, I think it has something to do with the unity editor windows, since odin uses it heavily. Also the developers of doozy have problems with hanging unity editors.

    These are all just assumptions, could be something completely different in the end.
     
  38. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    I don't know about you guys but for me in 2020.3.20 freezing is happening at least once every 30 minutes. This sucks.
     
  39. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    301
    It's hard to make progress on this issue without either narrowing it down a lot more, or having a simple project with reliable steps to reproduce the issue. If you can put together such a project and PM me I'll try it out :). You can also submit a bug report with that project to Unity.

    Good to know. Where has this been mentioned, do you have a link?
     
  40. Plaximo

    Plaximo

    Joined:
    Oct 26, 2016
    Posts:
    8
    Yes, it's the link posted above.
    https://forum.unity.com/threads/editor-progress-bar-stalls-request-for-bug-reports.1137817/page-2
     
  41. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
  42. _GTC_

    _GTC_

    Joined:
    Mar 20, 2016
    Posts:
    8
    Freezing only happened once or twice for the past 2 weeks after I turned off Auto Refreshing in Unity and use CTRL+R to refresh manually. You can try this as a temporary workaround.
     
    Plaximo and pistoleta like this.
  43. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    301
    I've had Unity freeze when trying to attach the debugger (it would happen 4 out of 5 times). But deleting the *.csproj, *.sln /Library, /obj and /Temp and letting Unity regenerate all that seemed to fix it for me.
     
    Plaximo and pistoleta like this.
  44. Meishin

    Meishin

    Joined:
    Apr 12, 2019
    Posts:
    26
    Hiho, having the exact same issue as well ;
    • Unity 2020.3.20
    • VS 2019
    • UMA (latest / custo), Odin Inspector (latest), Uber Shaders (latest)
    I noticed also when attaching the debugger the issue happens much quickly.
    Thx for the tips @_GTC_ and @bjarkeck, will try them out !

    Any of you keeping several inspectors open (already caused me some editor shenanigans in the past)?
     
  45. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Yeah I'm keeping at least 5 of them, and sometimes some of them are really complex made with Odin.
     
  46. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    301
    You saying that it happens more frequently on heavy inspectors, makes me want to give reproducing it one more go.

    You can try the latest version of Odin a try and see if it has changed anything (3.0.10), it's still getting aprooved on the Asset Store, but it's available here: https://odininspector.com/download if you create an account, redeem your license, and download it from us. It's a long shot, but one of the fixes in there has caused some strange and unfortunate things to happen in more recent versions of Unity. Could be related.
     
  47. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Certainly it's a long shot, I'm gonna try to have as less as inspectors opened to see if this keeps happening to be sure.

    I just upgraded to 3.0.9 , I'll wait until 3.0.10 is available in the package manager.
    Thanks
     
    Last edited: Nov 3, 2021
    bjarkeck likes this.