Search Issue Tracker
Won't Fix
Won't Fix in 2023.1.X
Votes
0
Found in
2020.3.44f1
2021.3.18f1
2022.2.5f1
2023.1.0b2
Issue ID
UUM-26414
Regression
No
Crash on LoadSceneAsyncNameIndexInternal_Injected when entering Play Mode
How to reproduce:
- Open the user attached project
- Open the “GameExampleScene” scene
- Enter Play Mode
- Observe the crash
Reproducible with: 2020.3.44f1, 2021.3.18f1, 2022.2.5f1, 2023.1.0b2
Reproduced on: Windows 10 (Intel)
Note: Build and Run doesn’t crash
First lines of stack trace:
0x0000029b79f75d43 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.SceneManagement.SceneManagerAPIInternal:LoadSceneAsyncNameIndexInternal_Injected (string,int,UnityEngine.SceneManagement.LoadSceneParameters&,bool)
0x0000029b79f75c53 (Mono JIT Code) UnityEngine.SceneManagement.SceneManagerAPIInternal:LoadSceneAsyncNameIndexInternal (string,int,UnityEngine.SceneManagement.LoadSceneParameters,bool)
0x0000029b79f75bd3 (Mono JIT Code) UnityEngine.SceneManagement.SceneManagerAPI:LoadSceneAsyncByNameOrIndex (string,int,UnityEngine.SceneManagement.LoadSceneParameters,bool)
0x0000029b79f75991 (Mono JIT Code) UnityEngine.SceneManagement.SceneManager:LoadSceneAsyncNameIndexInternal (string,int,UnityEngine.SceneManagement.LoadSceneParameters,bool)
0x0000029b79f758a3 (Mono JIT Code) UnityEngine.SceneManagement.SceneManager:LoadScene (int,UnityEngine.SceneManagement.LoadSceneParameters)
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Package signature validation unexpectedly return an invalid signature status if the validation check is done after the code signing certificate validaty range has passed
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
Resolution Note:
We could not reproduce the crash, but we could reproduce a hang on LoadScene() when entering Play Mode. This hang is caused by the following user code in the Update() function of Timer.cs:
void Update()
{
while (inPaused == false)
{
currentTime -= 1 * Time.deltaTime;
countdownText.text = currentTime.ToString("0");
if (currentTime <= 0)
{
currentTime = 0;
// Cuando llegue a 0 el timer pasamos a la siguiente escena
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
}
}
This code results in an infinite while-loop calling to SceneManager.LoadScene(). Removing the while-condition solves the hang.
Please note that Update() gets called every frame, so there is no need for a while-loop here. An if-condition is sufficient. To verify that your code does what you expect it to do, it can be useful to use log-messages throughout your code or attach a debugger to step through it.
Resolution Note (2023.1.X):
We could not reproduce the crash, but we could reproduce a hang on LoadScene() when entering Play Mode. This hang is caused by the following user code in the Update() function of Timer.cs:
void Update()
{
while (inPaused == false)
{
currentTime -= 1 * Time.deltaTime;
countdownText.text = currentTime.ToString("0");
if (currentTime <= 0)
{
currentTime = 0;
// Cuando llegue a 0 el timer pasamos a la siguiente escena
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
}
}
This code results in an infinite while-loop calling to SceneManager.LoadScene(). Removing the while-condition solves the hang.
Please note that Update() gets called every frame, so there is no need for a while-loop here. An if-condition is sufficient. To verify that your code does what you expect it to do, it can be useful to use log-messages throughout your code or attach a debugger to step through it.