Search Unity

Unity5.0.0f4 Editor crash on stop (Windows7)

Discussion in 'Editor & General Support' started by ForrestX, Mar 13, 2015.

  1. ForrestX

    ForrestX

    Joined:
    Apr 17, 2010
    Posts:
    94
    Hi,
    after upgrading my game to Unity5 (from Unity 4.6) the editor crashes everytime I hit stop.
    After further investigation I've found that is something related to Materials. For some reason they cannot be collected correctly on stop (I guess).

    If I:
    -Pause the editor
    -Delete manually all gameobjects inside hierarchy
    -Stop the editor

    I don't have any issue.


    Any suggestions?
     
  2. ForrestX

    ForrestX

    Joined:
    Apr 17, 2010
    Posts:
    94
    It seems not related to Materials and I wasn't able to reproduce it in a blank project, but I've found that is related to a memory leak issue.

    What I do to reproduce it:
    Allocate memory for this simple array (keeping it empty and unused)
    eventHandlers = new Delegate[64];
    Unity will crash on stop, but if set it to null OnDestroy()
    eventHandlers = null;

    no issues.