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
- "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 (2019.1.X):
This behavior reproduces in a winforms application, so I believe it is correct behavior