You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows 10 64bit, OpenGL ES 3.0 Renderer: NVIDIA GeForce GTX 1060 with Max-Q Design/PCIe/SSE2 OpenGL ES Batching: ON
Issue description
When trying to call var loadedScene = GD.Load<PackedScene>(path); in a Task.Run within an async function the game crashed and the main godot console window printed out :
ERROR: FATAL: Index p_index = 10 is out of bounds (size() = 9).
at: get (./core/cowdata.h:156)
=================================================================
Native Crash Reporting
=================================================================
Got a UNKNOWN while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Managed Stacktrace:
=================================================================
=================================================================
public override void _Ready()
{
_loadFinished = false;
var dungeonSize = LevelConfig.DungeonSize;
var powerLevel = LevelConfig.PowerLevel;
var playerClass = LevelConfig.PlayerClass;
// Having this in the async function also caused a window freezeup
var scene = GD.Load<PackedScene>(
_loadingScreenPath);
_loadingScreen = scene.Instance();
AddChild(_loadingScreen);
_loadingScreenHandling = HandleLoadingScreenAsync();
_levelLoading = LoadNewLevelAsync(dungeonSize, powerLevel, playerClass);
}
@Calinou
So it seems that the issue is a composite. When trying to create a minimal reproduction project the async loading worked by itself. But then I introduced a rich text label with a custom font in a custom theme and that made the issue I was facing in my project. Tell me, if I need something more to add.
@tvardero after seeing some kind of correlation with using a custom theme with a font to the crash I am no longer sure if these two issues are related.
@tvardero I took the code from async calls and called them synchronously and it worked. Mind you, in one of the async calls I do have a while loop that waits for one bool to get set to true at the end of loading, so that was not executed.
Godot version
v3.4.4.stable.mono.official [419e713]
System information
Windows 10 64bit, OpenGL ES 3.0 Renderer: NVIDIA GeForce GTX 1060 with Max-Q Design/PCIe/SSE2 OpenGL ES Batching: ON
Issue description
When trying to call
var loadedScene = GD.Load<PackedScene>(path);
in a Task.Run within an async function the game crashed and the main godot console window printed out :Here are the logs:
2022-07-24_10.26.40_18036.log
Steps to reproduce
The ready function:
The LoadNewLevelAsync:
The LoadPlayer function, in which the crash happened:
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: