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
- Caret is not being offset when content on a GUISkin is offset
- [Android][Vulkan] Application crashes with out of memory when warming up a specific shader on some of the Adreno devices
- Unity Editor hangs on a fresh import when using "-CacheServerWaitForUploadCompletion" command line argument
- SpriteShapeRenderer overrides stencil settings when a custom shader is used to set stencil values
- Frame Debugger window is flickering and unusable when HDRP Water is used in the Scene
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.