Search Unity

Potential package manager bug freezing editor after recompile with preview packages enabled

Discussion in 'Package Manager' started by meverett, Apr 1, 2020.

  1. meverett

    meverett

    Joined:
    Sep 9, 2005
    Posts:
    34
    TL;DR If you are experiencing huge project recompile/play time increases and freezes in the editor, it may be because you turned on "Show preview packages" in the package manager. Try turning that off. Especially if the delays show up without significantly changing the project in any other major way.

    Details:

    So at some point in the project I've been working on I noticed a dramatic slowdown and unresponsiveness in the editor during project recompile as well as playing the project.

    After the project would recompile based on a script edit, not only did recompilation take longer, but after recompilation completed, focus and responsiveness would return to the editor for just a second or two and then it would hang and freeze for an additional 10-20 seconds. Overall I was experiencing about 30+ seconds round trip before I could get control of the editor again. On top of that, playing the open scene would also hang for about 4-5 additional seconds compared to before the problem started.

    So basically 30-40+ seconds of round trip wait before I could preview changes of what used to take maybe 4-7 seconds before.

    So I used ProcessMonitor.exe and I logged what the editor process was doing when I noticed a pattern occurring slightly before there would be a huge lag in ProcessMonitor's logged time.

    Here is what I saw:

    HKCU\Software\Unity Technologies\Unity Editor 5.x\PackageManager.ShowPreviewPackages_c3c05900-edaf-4ae5-940d-ccd2209a1058_h568069960

    Which would have a result of: BUFFER OVERFLOW

    This would always show up in Process Monitor a few lines before there would be huge multi-second gaps in process logging.

    Then I remembered at some point I had enabled "Show preview packages" in the package manager around the same time this huge unresponsiveness showed up.

    So I disabled "Show preview packages" in the package manager, and now my recompile/play times are back to the 4-7 second range.

    YMMV

    Update: Hopefully it's obvious I'm on Windows (hence the registry keys) and also I'm using 2019.2.21f1
     

    Attached Files:

    Last edited: Apr 2, 2020
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,821
    Thank you for flagging this. I'll forward this to the team for them to investigate.
     
  3. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    Hey there,

    Sincere apologies for the delay in our reply.

    Our Package Manager team has filed a bug report on your behalf as we were quite late in getting back to you. Apologies for that. I'll attach the reference number once I have it.

    In the meantime, we noticed you're using 2019.3. Does this issue persist with the latest version?

    EDIT: Bug number reporting on our behalf is 1250315.
     
    Last edited: May 29, 2020
  4. cebukas

    cebukas

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    1
    Hi,

    I've looked into this and a ~30s freeze does occur in 2019.2.21f1 even on a fresh project when preview packages are being shown. However, this does not occur in the streams that we are currently supporting (2018.4, 2019.3, 2020.1, 2020.2).

    If you can, consider updating to a newer Unity version.