Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Frequent editor crash when stopping play mode

Discussion in 'Editor & General Support' started by InfiniteMonkey, Jul 19, 2021.

  1. InfiniteMonkey

    InfiniteMonkey

    Joined:
    Oct 8, 2016
    Posts:
    16
    About a month ago I upgraded to 2019.4.26. Since then, when I stop Play mode in the editor, the editor frequently crashes - like close to 50% of the time. My workmate has also upgraded at the same time, and has a fairly similar computer and has very few crashes. I've poked around in various logs and found nothing informative as to why the crashes are happening, but I don't really know what I'm looking for. Any advice on how to work out what might be happening would be greatly appreciated - it's really frustrating!!
     
  2. CoughE

    CoughE

    Joined:
    Oct 26, 2015
    Posts:
    39
    My first area to look would be in OnDestroy and OnDsiable methods. Also i've found having a coroutine that doesn't get to end properly (you attach a coroutine to an object which is then yielding for some condition and never gets to reach it because you exit play mode) can cause crashes
     
  3. InfiniteMonkey

    InfiniteMonkey

    Joined:
    Oct 8, 2016
    Posts:
    16
    Thanks! I'm fairly certain all my OnDestroy, OnDisable and Coroutines are safe. I don't use OnDestroy/OnDisable much, and all the coroutines I have are short-term things for loading games asynchronously and stuff like that. I'll keep looking at them though
     
  4. Alex-Thibodeau

    Alex-Thibodeau

    Unity Technologies

    Joined:
    Apr 18, 2013
    Posts:
    27
    Have you filed a bug for this crash? If so would you happen to have the # for it? I'm curious what the callstack looks like.
     
  5. InfiniteMonkey

    InfiniteMonkey

    Joined:
    Oct 8, 2016
    Posts:
    16
    I finally did file a bug for it yesterday. It's #1351796