Search Issue Tracker

Won't Fix

Votes

0

Found in

2018.2.13f1

Issue ID

1102068

Regression

No

Unity crashes when starting a coroutine on click

Scripting

-

Repro steps:
1. Open user attached project
2. Enter Play Mode
3. Click on the Game View

Actual: Editor crashes

Reproducible with: 2017.4.16f1, 2018.2.18f1, 2018.3.0b12, 2019.1.0a10

Notes:
- The crash happens when StartCoroutine(Falling()) in PlayerController.cs line 392

  1. Resolution Note:

    This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this fix for the time being. We understand that this will cause problems for some users, and so may address in a future version.

Comments (4)

  1. landonth

    Apr 12, 2020 12:31

    Not to say you should always use Async-Await instead of Coroutine, just an alternative for whoever may be reading this, as Async has return values, threading, not tied to monobehaviour, overall better suited for User Input ( on click in this case ) and device or network IO.

    That talk from Unite Copenhagen 2019 I linked in my last comment goes over some best practices for both Coroutine and Async, and rules of thumb on which you should use depending on what you need.

  2. landonth

    Apr 12, 2020 12:06

    While Coroutines haven't "officially" been replaced or deprecated, the general recommendation from Unity and other devs seems to be to use Async-Await instead of Coroutine when possible. Which provides several benefits beyond whatever was causing this particular reported issue.

    More info:

    Best practices: Async vs. coroutines - Unite Copenhagen 2019
    https://www.youtube.com/watch?v=7eKi6NKri6I

    Async-Await instead of coroutines in Unity 2017
    http://www.stevevermeulen.com/index.php/2017/09/using-async-await-in-unity3d-2017/

  3. WheresMommy

    Jan 29, 2019 08:53

    It is actually not resolved, happens for me too which is a no-go for development. At least some fix or workaround temporarily would be good.

  4. WheresMommy

    Jan 21, 2019 10:33

    It is actually not resolved, happens for me too which is a no-go for development. At least some fix or workaround temporarily would be good.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.