Search Issue Tracker
Fixed in 2019.2.X
Votes
0
Found in
2018.2.4f1
Issue ID
1094391
Regression
No
Assertion failed on expression: '!m_CoroutineEnumeratorGCHandle.HasTarget()' is thrown when running Tests in Test Runner
To reproduce:
1. Download the attached project "CoroutineAssertions.zip" and open in Unity
2. Open Test Runner window
3. Select the PlayMode tab
4. Press "Run All" button
5. Observe that Assertions appear in the Console and some of the Tests start failing
Notes:
- This issue appears on both Windows and macOS
- Errors are shared in the Comments section
- If Assertions didn't appear then run the Tests again
- On Unity 2018.2 these Assertions are causing Tests to fail
Reproduced on Unity 2017.4.0f1, 2017.4.13f1, 2018.1.9f2, 2018.2.14f1, 2018.3.0b7 and 2019.1.0a6
Comments (3)
-
Kennosuke
Feb 04, 2020 00:42
I'm getting this same issue in 2018.4.16f1 (LTS)
Can you please include a fix for 2018 LTS?
-
babyjk
May 30, 2019 08:56
Where is CoroutineAssertions.zip?
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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note (fix version 2019.2):
After some investigation, we found a solution and will be included in the 2019.2 release. For stability this will not get backported to earlier versions.
A way to make sure the Coroutine is kept alive is to keep a reference to it. `StartCoroutine` returns the object, and can be stored on the class.