Search Issue Tracker
By Design
Votes
0
Found in
2018.2.0b3
2018.2.4f1
Issue ID
1079087
Regression
Yes
Canceling an Iteration with small delay values let it iterate after the cancellation request
To reproduce:
1. Download attached project "TaskDelay.zip" and open in Unity
2. Open "SampleScene" scene
3. Select "TDelay" gameObject in Hierarchy and in Inspector window set "Millis Delay to 21 or bigger
4. Enter Play mode
5. Press the "C" button in keyboard
6. Observe that in Console returned value of "Token.IsCancellationRequested" is false as expected before the "TaskCanceledException" is thrown
7. Exit Play mode
8. Select "TDelay" gameObject in Hierarchy and in Inspector window set "Millis Delay to 20 or less
9. Enter Play mode
10. Press the "C" button in keyboard
11. Observe that in Console returned value of "Token.IsCancellationRequested" is true before the "TaskCanceledException" is thrown
Notes:
- This issue appears on both Windows and OSX
- In VisualStudio 2017 the returned value of "Token.IsCancellationRequested" is always false even if "millisDelay" = 1
Reproduced on Unity 2018.2.0b3, 2018.2.8f1, 2018.3.0b2 and 2019.1.0a1
Not reproduced on Unity 2018.2.0b2 (96999d86066c)
Regression on Unity 2018.2.0b3 (0a6b93065060)
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
- RenderTexture pixels are gray when created without drawing on macOS
- Slider disappears when the Baked Lightmap Viewer window is at its minimum size
- Crash on 'TransformParticleMesh' when editing the MeshFilter during PlayMode
- UI Toolkit Window popups are cropped when using an UHD monitor coupled with a lower resolution monitor
- Baked Lightmap ”View” button text is aligned incorrectly
Resolution Note (2019.1.X):
This behavior reproduces in a winforms application, so I believe it is correct behavior