Constant Crashes on Play

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.

1 Like

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).

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.

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?

Yes, though that’ll also cause it to reimport all assets.

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):

    /**
    * Search scene and destroy all rendering objects matching name.
    */
    static private void DestroyObjectsWithName(string InName)
    {
        GameObject go = GameObject.Find(InName);

        while(go != null)
        {
            GameObject.DestroyImmediate(go);

            go = GameObject.Find(InName);
        }
    }

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).