Search Unity

Editor Hangs on Play (175199ms) in 2018.30f2

Discussion in 'Editor & General Support' started by thatscraigz, Apr 4, 2019.

  1. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    So I've recently updated to 2018.3 from 2017.3 (I know, quite the leap)

    And for the most part, things have gone really well! The only huge issue is when I go to press play in the editor, I get a HUGE spike that happens, literally hangs for a minute or two, then resumes no problem. It's a fairly large project, so I'm used to like a 6-10 second wait, but this feels extreme...

    I managed to profile it in the editor and found out it's some crazy GC.Alloc.



    Though if try and look at any details on that line item or Unity just freezes then crashes.

    Things I've tried:
    • Reimport all
    • Update to Unity 2018.3.11f1
    • Close all UI windows except game view, scene view, and inspector
    • Change scenes (it's universal though)
    • Fresh project (doesnt happen)
    Any ideas? Kind of lost, not quite sure what else to try :/

    -craigz

    edit: profiler link data
    https://drive.google.com/open?id=1dKc5GKua4lIZ652DBbbAy8kkg9zdMn9r
     
    Last edited: Apr 4, 2019
  2. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,317
    Try deleting your temp folders (Library/Temp/any folder that isn't Assets or ProjectSettings) and reimport everything. The fact that this issue doesn't occur on a new project makes me think your Library is somehow corrupted.

    It's also worth noting that at least part of those ridiculous alloc numbers are probably partially to blame on the profiler itself running.
     
  3. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Good idea @Madgvox !

    Did a full library rebuild and still no change though :/

    Very true about the profiler itself, but even then - this is pretty extreme haha :p

    It's definitely got to be something project-wide though, because even in a fresh scene with nothing in it, still happens....
     
  4. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    507
    Hi @thatscraigz ,

    Thanks for the profiler capture!

    Can you open detailed view without crash?
    48M samples might be too much for profiler, but if you have enough RAM (64GB) you might try to enable managed allocation callstacks collection. For 48M samples that might use 4-5GB extra, but you might be able to see some information and pin point offending source code.

    Also you can run Editor with -profiler-maxusedmemory 64000000 . That would decrease profiler memory buffer and cause stopping the capture at some point. But also gives an ability to look at the allocation callstacks for a reduced frame data set.
     
  5. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Hi @alexeyzakharov

    Thanks for the great input :) unfortunately even with those editor flags and 64GB of RAM (albeit with chrome eating a few of those...) I can't even seem to load in my profiler data. I get this?



    I'll try again to generate some profiler data and preview it in detailed view with those flags enabled, though everytime in the past when trying to enter detailed view its crashed out so I was unable to pin point the culprit :/
     
  6. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Just wanted to bump this and see if anyone has any other possible ideas to debug something like this :)

    thanks!
    craigz
     
  7. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Another bump ;)
     
  8. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Please submit a bug-report as described in this document:
    https://unity3d.com/unity/qa/bug-reporting

    It's important that you report these issues together with a reproduction project if you want them to get fixed. If you don't do it, it might be a long time until someone else reports them or until Unity Technologies find them.

    After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. Please post the Case number (number only, not the link) in this forum thread for Unity staff to pick up.
     
    alexeyzakharov likes this.
  9. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    507
    There are more things to try:
    1) Reduce -profiler-maxusedmemory 64000000 even more to get less generated data viewable by all views.
    2) Use Raw Hierarchy view which displays all samples unmerged and then open details view.
    3) Use Deep Profiler instead of allocation callstacks.

    Also bug is very welcome for this case.