Open SysError99 opened 2 years ago
The problem is probably somewhere in the implementation of the glue version generator (in 3.5 the problem persists): https://github.com/godotengine/godot/blob/3.4/modules/mono/build_scripts/gen_cs_glue_version.py
For official and custom builds of the same version, the glue version is different... If you use the glue version from the official assembly in the custom one, everything works.
Hello @CriDos I am running in the same problem.
But for the wasm/javascript export I am also getting "The assembly 'GodotSharp' is out of sync." in the Chrome dev tools.
Do you have a hint, how I can fix it? How can I set the correct version (if it is the same problem)? What is the correct version?
Hello @nicbillen Try to generate the glue using the official release build of the same version you want and use it in your build.
Hello, thank you for your fast answer. I will test it (can take some time) and will share the result.
I have now solved it in another way (maybe the explanation can help other people with the same problem).
I have compiled one glue version for Windows and one for Linux/Web/Javascript. For the generated Windows version, there was a version number in the file "mono_glue.gen.cpp" available (I searched for "uint32_t get_cs_glue_version() { return ").
In the Linux version, the version number in the file "mono_glue.gen.cpp" was:
uint32_t get_cs_glue_version() { return 0; }
Windows value:
uint32_t get_cs_glue_version() { return 1666356653; }
The Windows value (1666356653) can be another number in another build. It is just a timestamp.
Replacing 0 with 1666356653 in the Linux/Web/Javascript version and using this glue for template compilation, solved the problem.
@CriDos many thanks for your help
Godot version
3.4.4.stable.mono
System information
Linux 5.15.32-1-MANJARO (AMD Zen with Vega Mobile Graphics)
Issue description
I'm trying to build custom export template in version
3.4.4.stable
which I will remove various of unused modules and enableoptimize=speed
option. The build process seems to go smoothly until I put it in custom template and export it on3.4.4.stable
editor and test run it. After loading process finishes, canvas only showsunreachable
label, and debugging panel shows below (>
represents each line of text)This happen even if I have used bare-bone command to build the template and got approximately same size of template file compared to official build.
This is custom build one:
And, this is official build:
Ps: While building glue, there are some errors produced but it seems like the glue generator just ignored it. There are possibly more errors but my terminal got overflow and couldn't display all of them, but here's some example:
Steps to reproduce
Environment:
emsdk install 1.39.9
andemsdk activate 1.39.9
)dotnet-host
,dotnet-runtime
,dotnet-sdk
,dotnet-targeting-pack
installed from official Manjaro repository)godot-mono-builds
official build version1cc1257
anddf330ce
godot-mono-builds
's Base Class Library matching each versions.dotnet CLI
option. (I had absolutely no luck withMSBuild (Mono)
even though I satisfied all requirements but it keeps showingParameter "AssemblyFiles" has invalid value "/usr/lib/mono/4.7.2-api/mscorlib.dll". Could not load file or assembly 'System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
)Steps: 1) Cloning project to local with
git clone https://github.com/godotengine/godot .
(I'm already in separated directory) 2) Switching branch to3.4.4-stable
withgit checkout 3.4.4-stable
3) Start building Mono glue generator with:4) Start generating Mono glue with:
5) Start building export template with command:
This is content of custom build file (
$HOME/Godot.Mono.Releases/JsMono.py
)6) Start building project with the build, in
release
mode. 7) Serving the game with Node.JS'shttp-server
installed fromnpm
. 8) Launching URL from site running on (7) in Chromium Web Browser asGuest
. 9) Error occurs.Minimal reproduction project
Example project: GodotMonoHelloWorld.Source.zipv
Export template built (1cc1257): godot.javascript.opt.mono.zip
Export template built (df330ce): godot.javascript.opt.mono.zip
Example exported project with the template (1cc1257): GodotMonoHelloWorld.Exported.zip
Example exported project with the template (df330ce) GodotMonoHelloWorld.df330ce.zip