Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godot 4 beta 8 mono crash on opening project. #70129

Closed
lohmaster opened this issue Dec 15, 2022 · 7 comments
Closed

Godot 4 beta 8 mono crash on opening project. #70129

lohmaster opened this issue Dec 15, 2022 · 7 comments

Comments

@lohmaster
Copy link

Godot version

4.0 beta 8

System information

Windows 11, any rendering backend, gtx 1060

Issue description

Godot output:
ERROR: hostfxr_initialize_for_runtime_config failed with code: -2147450733
at: (modules/mono/mono_gd/gd_mono.cpp:201)
ERROR: Parameter "load_assembly_and_get_function_pointer" is null.
at: initialize_hostfxr_and_godot_plugins (modules/mono/mono_gd/gd_mono.cpp:274)
ERROR: Parameter "godot_plugins_initialize" is null.
at: initialize (modules/mono/mono_gd/gd_mono.cpp:403)

dotnet -- info output:
.NET SDK:
Version: 7.0.100
Commit: e12b7af219

Środowisko uruchomieniowe:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.100\

Host:
Version: 7.0.0
Architecture: x64
Commit: d099f075e4

.NET SDKs installed:
6.0.403 [C:\Program Files\dotnet\sdk]
7.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Steps to reproduce

Open any project.

Minimal reproduction project

N/A

@lohmaster lohmaster changed the title Godot 4 beta 8 crash on opening project. Godot 4 beta 8 mono crash on opening project. Dec 15, 2022
@adamscott

This comment was marked as resolved.

@adamscott
Copy link
Member

And please use code quotation marks when citing code. Please edit your description.

@akien-mga
Copy link
Member

@adamscott If it crashes when opening a brand new project, a MRP isn't really needed.

This sounds related to #68652, it's probably caused by the installed .NET Core 7. CC @godotengine/dotnet

@raulsntos
Copy link
Member

ERROR: hostfxr_initialize_for_runtime_config failed with code: -2147450733

Acording to the error code (see https://github.com/dotnet/runtime/blob/main/docs/design/features/host-error-codes.md), the error received was InvalidConfigFile with description:

The .runtimeconfig.json file is invalid. The reasons for this failure can be among these:

  • Failure to read from the file
  • Invalid JSON
  • Invalid value for a property (for example number for property which requires a string)
  • Missing required property
  • Other inconsistencies (for example rollForward and applyPatches are not allowed to be specified in the same config file)
  • Any of the above failures reading the .runtimecofig.dev.json file
  • Self-contained .runtimeconfig.json used in hostfxr_initialize_for_runtime_config. Note that missing .runtimconfig.json is not an error (means self-contained app). This error code is also used when there is a problem reading the CLSID map file in comhost.

@Markyparky56
Copy link

Compiling latest (5674fa0) I am also seeing this CTD on launching a blank project. Compiled the editor in dev mode and caught it in the debugger (VS2022). Trickier than expected because the initially attached/launched application is not the one that crashes.

Callstack:

godot.windows.editor.dev.x86_64.mono.exe!CSharpLanguage::_editor_init_callback() Line 1128
	at C:\godot\modules\mono\csharp_script.cpp(1128)
godot.windows.editor.dev.x86_64.mono.exe!EditorNode::EditorNode() Line 7421
	at C:\godot\editor\editor_node.cpp(7421)
godot.windows.editor.dev.x86_64.mono.exe!Main::start() Line 2810
	at C:\godot\main\main.cpp(2810)
godot.windows.editor.dev.x86_64.mono.exe!widechar_main(int argc, wchar_t * * argv) Line 178
	at C:\godot\platform\windows\godot_windows.cpp(178)
godot.windows.editor.dev.x86_64.mono.exe!_main() Line 203
	at C:\godot\platform\windows\godot_windows.cpp(203)
godot.windows.editor.dev.x86_64.mono.exe!main(int argc, char * * argv) Line 217
	at C:\godot\platform\windows\godot_windows.cpp(217)
godot.windows.editor.dev.x86_64.mono.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 231
	at C:\godot\platform\windows\godot_windows.cpp(231)
[Inline Frame] godot.windows.editor.dev.x86_64.mono.exe!invoke_main() Line 102
	at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(102)
godot.windows.editor.dev.x86_64.mono.exe!__scrt_common_main_seh() Line 288
	at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288)
kernel32.dll!00007ffa8fb67614()
ntdll.dll!00007ffa902426a1()

mini dump attached, full heap dump available but is probably too large to upload here even if I zip it.
godot.windows.editor.dev.x86_64.mono.mini.dmp.zip

Machine is in a similar state as the OP. .NET 6.0 SDK and 7.0 side-by-side

.NET SDK:
 Version:   7.0.101
 Commit:    bb24aafa11

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19044
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.101\

Host:
  Version:      7.0.1
  Architecture: x64
  Commit:       97203d38ba

.NET SDKs installed:
  6.0.404 [C:\Program Files\dotnet\sdk]
  7.0.101 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

@lohmaster
Copy link
Author

It seems after last update of Visual Studio this issue went away. I am not sure whether it had anything to do with it. It is however the only software change that happened on my system since I posted original issue.

@akien-mga
Copy link
Member

Crashes with .NET 7 specifically should be fixed by #71825.

@github-project-automation github-project-automation bot moved this from To Assess to Done in 4.x Priority Issues Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants