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
- Mouse input is registered incorrectly in Custom RP when downscaling Render Target and rendering Overlay UI before final upscale
- Time.deltaTime is locked to the display's refresh rate when the built Player is moved to a Secondary Display and Windowed Mode is used
- Crash on RaiseException when importing a specific asset
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
Resolution Note (2019.1.X):
This behavior reproduces in a winforms application, so I believe it is correct behavior