Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Desktop Constant Crashes on Play

Discussion in '5.2 Beta' started by ImpossibleRobert, Jul 5, 2015.

  1. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    521
    After enthusiastically upgrading my project to 5.2b1 the editor crashes constantly after some actions in the scene. Initially I can run it and everything works great. But then I do a rebake, or change the render path and when hitting play again the editor crashes and closes down.

    In this current state 5.2b1 is unusable for me unfortunately. I reverted back to 5.1.1p3 and there it works nicely.

    I submitted: 709829, 709832, 709844, then I just gave up

    PS: upon first start it reimports most assets which takes forever, same when reverting back to 5.1, is this really necessary? Makes me think twice about "quickly" trying b2.
     
    MrEsquire likes this.
  2. Alex-Lian

    Alex-Lian

    Guest

    A glance at all three bugs shows the stacks to be all the same and that the crash stack has ProBuilder 2 in it. There's probably some wonky interaction that we need to work out, and having a project to repro would help out a ton. It's probably also worth notifying the ProBuilder 2 developer that there may be something broken for 5.2 that needs addressing (it still may be our side, but working from both sides would probably speed things up).
     
  3. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    Generally speaking, Unity projects are not downgradable, i.e. Converting a project to 5.2 and then back to 5.1 is not a supported or safe scenario. When dealing with beta versions in particular, you should work with a separate copy of your project.
     
  4. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    521
    Thanks for pointing this out! If i have the full project under version control isnt the only risk i have the need to delete my library folder when reverting?
     
  5. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    Yes, though that'll also cause it to reimport all assets.
     
  6. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    The issue is addressable on the ProBuilder side - it looks like some cleanup code in the pb_Editor_Graphics class is the catalyst. Specifically, the crash occurs when entering play mode with the ProBuilder editor window open, then closing that window. I was able to build and run a test scene without crashes just by closing the Probuilder window prior to compile.

    I haven't done much digging yet, but here's the offending bit of code on my end (called from OnDisable() in the pb_Editor window):

    Code (csharp):
    1.  
    2.     /**
    3.     * Search scene and destroy all rendering objects matching name.
    4.     */
    5.     static private void DestroyObjectsWithName(string InName)
    6.     {
    7.         GameObject go = GameObject.Find(InName);
    8.  
    9.         while(go != null)
    10.         {
    11.             GameObject.DestroyImmediate(go);
    12.  
    13.             go = GameObject.Find(InName);
    14.         }
    15.     }
    16.  
    I've actually been meaning to go back through the rendering stuff and change how it works, so this function isn't really necessary anymore anyways. I'll try to have an update out later this week to address this crash (though I'm still not sure why it's crashing in the first place).
     
    Last edited: Jul 6, 2015