Search Unity

Update to preview 23 And now starting empty scene is about 15 sec and 6 GB of memory

Discussion in 'Entity Component System' started by JesOb, Jan 21, 2019.

  1. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    (PNG Image, 865 × 213 pixels).png
    As title says Unity just got crazy, do anyone knows who is Inspector.Tick and why it allocates so many on start?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Try turning on deep profiling?
     
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    @Jes28, Inspector.Tick contains things like redrawing editors for MonoBehaviours. So it looks like you've got something selected who's inspector is causing Unity to allocate an enormous amount of memory.

    It could be a [CustomEditor] that's doing something broken, or it could be something with custom serialization code doing something broken - an inspected MonoBehaviour has it's serializer run every editor frame (Inspector.Tick) - that includes ISerializationCallbackReceiver stuff. Pretty sure it also goes for ScriptableObjects.

    Turn the deep profiler on on something that's allocating 1.4 GB and spending 14 seconds every inspector frame? Brave.
     
  4. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    Also it can be hight mouse refresh rate which cause editor revresh very offen (even on simple inspector) other guy has same problem before on this forum (his mouse update was 1000 times per second)
     
  5. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    Thanks :)

    My Test:
    - update to latest Unity 2018.3.2f1
    - load default layout
    - close all windows
    - open empty scene
    - close Unity and reopen
    - press play
    - have the same bug considering that Game window is the only opened window
    bug itself happend around 5th frame of play

    I dont change mouse last year and bug start to happen recently

    Enabling Deep Profile cause to eat all 16GB of memory and hard crash, so I need to reload computer to continue working.

    Enabling allocation call stacks eat a lot more memory but somehow editor survived, but there is no call stacks for those allocations.

    Any suggestions before I will retry on 32GB RAM machine? :)
     
  6. M_R

    M_R

    Joined:
    Apr 15, 2015
    Posts:
    559
    attach the debugger, break at random points during the freeze and see if you catch something?

    if it was your code, i'd say spam Debug.Log (or breakpoints) everywhere...

    EDIT: you can set conditional breakpoints on # of hits
     
  7. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    Thanks a lot.
    32 GB Ram was enough to do Deep Profile :D

    And random breaks helps too.

    It seems this is ProBuilder fault :)
    Where send all this for repair?

    (PNG Image, 1175 × 179 pixels).png Screenshot_1.png
     
    Gua and Peter77 like this.
  8. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,619
  9. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    (Case 1118897) If it need to someone :)
     
    kaarrrllll and Peter77 like this.
  10. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    Thanks for filing a bug report, I'm looking at it this morning. To explain what's happening, this is a function that runs when first importing ProBuilder to check for incompatible versions (ex, from the Asset Store). I think what we will do is remove the deprecated asset reference check and instead rely on looking for the old DLLs.
     
    FROS7 likes this.
  11. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    Update for anyone following this thread, this bug has been fixed in ProBuilder 4.0.3 and is now available on Package Manager.
     
    JesOb and FROS7 like this.