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
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
-
LooperVFX
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.
-
LooperVFX
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=7eKi6NKri6IAsync-Await instead of coroutines in Unity 2017
http://www.stevevermeulen.com/index.php/2017/09/using-async-await-in-unity3d-2017/ -
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.
-
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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] [Vulkan] Cubes stuck on the first few frames of rotation and application flickering when an Overlay Camera is added to the Camera Stack with MSAA enabled
- Profiling information icon does not update for Light Mode
- [Linux] Type to select functionality is missing for drop down menus
- TextMeshPro calculates Width Compression incorrectly when using certain values in the WD% field
- VFX Graph link contrasts fail WCAG guidelines
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.