Search Issue Tracker
By Design
Votes
0
Found in
2018.3.0a1
2018.3.3f1
Issue ID
1124760
Regression
No
[Support] Altering TimeScale on runtime will make devices unresponsive and application hangs
How to reproduce:
1. Build and run the project on an iOS device or standalone
--
Notice that the game gets frozen in the splash screen.
Versions:
2018.3.6f1
~Editor: Project launches
~Standalone build: Hangs when launching the app
~iOS build: build successful, hangs when launching the app with Xcode
2019.1.0b4:
~Editor: Couldn't enter play mode due to errors
~Standalone build: Couldn't build due to errors
~iOS: Couldn't build due to errors
2019.2.0a6:
~Editor: Couldn't enter play mode due to errors
~Standalone build: Couldn't build due to errors
~iOS: Couldn't build due to errors
Note: Removing `Time.timeScale = 5; (l21) from the script `FPSCounter.cs' Awake() method, the game runs as expected
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2019.3.X):
In FPSCounter.CalculateFPS, there is the following code:
private IEnumerator CalculateFPS()
{
WaitForSeconds waitDelay = new WaitForSeconds(FREQUENCY);
while (true)
{
if (Time.timeScale == 1)
{
yield return waitDelay;
/.../
}
}
}
Now, if Time.timeScale is not 1, this while(true) loop never returns, and you have an endless loop, freezing the game.
Now, I'ms somewhat surprised that this bug (with a 7GB repro project) went all the way to a Unity developer without anyone apparently trying to attach a debugger to see what is going on before ¯\_(ツ)_/¯