godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.33k stars 20k forks source link

Mono Exports on Godot 3.5.1 not working (at least the linux version). #74658

Open yohannes-jo opened 1 year ago

yohannes-jo commented 1 year ago

Godot version

3.5.1 mono stable

System information

Arch Linux, GLES2, Intel GeminiLake UHD 605

Issue description

I try to export a game to check if its working outside the engine but it instantly crashes after showing the splash logo of godot. A snippet of what it says when executed from terminal:

Godot Engine v3.5.1.stable.mono.official.6fed1ffa3 - https://godotengine.org
OpenGL ES 2.0 Renderer: Mesa Intel(R) UHD Graphics 605 (GLK 3)

ERROR: Mono: Core API hash mismatch.
   at: _init_godot_api_hashes (modules/mono/mono_gd/gd_mono.cpp:515)
Mono: Log file is: '/home/jo/.local/share/godot/app_userdata/bla bla/mono/mono_logs/2023-03-09_16.20.12_2814.log'
ERROR: Failed to load one of the API assemblies.
   at: _load_api_assemblies (modules/mono/mono_gd/gd_mono.cpp:969)

=================================================================
    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.

=================================================================
    Native stacktrace:
=================================================================
    0xc148ad - ./bla bla.x86_64 : 
    0xc14c39 - ./bla bla.x86_64 : 
    0xc072ef - ./bla bla.x86_64 : 
    0xc1e890 - ./bla bla.x86_64 : 
    0x7fd36e7f4f50 - /usr/lib/libc.so.6 : 
    0xeaac4b - ./bla bla.x86_64 : 
    0xecafeb - ./bla bla.x86_64 : _ZN6GDMono26initialize_load_assembliesEv
    0x274410f - ./bla bla.x86_64 : _ZN12ScriptServer14init_languagesEv
    0xea2388 - ./bla bla.x86_64 : _ZN4Main6setup2Em
    0xe74102 - ./bla bla.x86_64 : _ZN4Main5setupEPKciPPcb
    0xb39ec7 - ./bla bla.x86_64 : main
    0x7fd36e7df790 - /usr/lib/libc.so.6 : 
    0x7fd36e7df84a - /usr/lib/libc.so.6 : __libc_start_main
    0xb3b9ce - ./bla bla.x86_64 : 

=================================================================
    Telemetry Dumper:
=================================================================
Pkilling 0x140545267586752x from 0x140546067197312x
Could not exec mono-hang-watchdog, expected on path '/home/jo/bla bla/blabla/data_bla bla/Mono/etc/../bin/mono-hang-watchdog' (errno 2)
Entering thread summarizer pause from 0x140546067197312x
Finished thread summarizer pause from 0x140546067197312x.
Failed to create breadcrumb file (null)/crash_hash_0x0

Waiting for dumping threads to resume

=================================================================
    External Debugger Dump:
=================================================================
mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0xeaac4b):0xeaac3b  11 a3 7f 01 48 8b 3d ba e4 88 02 e8 85 19 93 ff  ....H.=.........
0xeaac4b  0f 0b 90 66 90 41 56 41 55 41 54 49 89 f4 55 48  ...f.AVAUATI..UH
0xeaac5b  89 fd 53 4c 8b 07 4d 85 c0 0f 84 86 00 00 00 48  ..SL..M........H
0xeaac6b  8b 3e 48 85 ff 0f 84 3a 02 00 00 8b 47 1c 8d 88  .>H....:....G...

=================================================================
    Managed Stacktrace:
=================================================================
=================================================================
Aborted (core dumped)

It runs perfectly fine inside the editor, don't know why it won't work outside of it. Any help?

Steps to reproduce

Create a new mono project, create and build project solution, check whether the project works inside the editor by making a demo empty scene and setting it as main (to verify we have the same issue). Export it anywhere you want to your target preferred platform (html5 version said the same thing). Try to run that version.

Minimal reproduction project

N/A (since its trivial)

Calinou commented 1 year ago

@yohannes-jo Please surround large blocks of text with triple backticks like this:

``` text here ```

This prevents them from taking too much space and also makes sure issue references aren't accidentally created. I edited your comment, but remember to do this next time :slightly_smiling_face:

yohannes-jo commented 1 year ago

will do!

RedworkDE commented 1 year ago

ERROR: Mono: Core API hash mismatch. Looks like the template executable has a different version than the editor, ensure that the editor, export template and csproj all have the same version, if that doesn't help, please upload your project and export and post the editor version (please click the version in the project manager to copy the full version)

EDIT: duplicate of https://github.com/godotengine/godot/issues/70829

XenonSheng commented 1 year ago

@RedworkDE Hi, Here is the example project that can hit the Core API hash mismatch error in HTML5 platform. image

I have tested by exporting it in release. It does not have this error. However for debug, it still have the error. Maybe it requires to update the debug template? But how if so?

FYI, I'm using Godot_v3.5.2-stable_mono_win64 editor and installed the template from Export Template Manager which Download From 'Best Available Mirror'. And using Visual Studio 2019 as external editor.

Project Link WebExample.zip

Export Templates webassembly_debug.zip webassembly_release.zip