-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
GD.Seed C# Black Screen HTML5 #36858
Comments
Also the engine really needs a way to see console output when testing HTML5 projects especially when you get a black screen -- debugging seems impossible in those cases as the black screen is only in HTML not in the normal mode. |
Can you reproduce this when doing the same operation, but in GDScript with non-Mono export templates?
Can't you see the output in the web inspector by pressing F12 or Ctrl + Shift + I? |
Yes, I think in the console tab. I didn't know that. Thanks! Ok, after saying that. I could only open the Inspector with the black screen (crashed) game. I can't seem to be able to open it when the game actually works. I can however right click before the game has loaded so that allows me to open it but I have to be very quick. |
Did you try with ( ⋮ ) > More tools > Developer tools? |
Absolutely perfect! Thanks a lot! |
I think I know why this is happening. Mono on WASM needs to generate a trampoline for each internal call function signature possible for the interpreter: https://github.com/mono/mono/blob/master/mono/mini/wasm_m2n_invoke.g.h The trampolines they generate are not enough for all of Godot's internal call signatures. This was addressed in this commit with a temporary workaround: 8cbe4a3
However those changes were only applied to the generated bindings. We need to do the same for the ones we maintain manually, like Although at this point, it may be better to revert the workaround and go with the proper solution mentioned above. |
@neikeq Is this fixed via: godotengine/godot-mono-builds#21 ? Or does we still need proper binding for |
If the cause of the issue is what I suspected in my previous comment, then #44105 should fix it. However, that PR cannot be backported to 3.2 as it requires C++17. @akien-mga would it be possible to make an exception about the C++ version for the Mono module in 3.2? Otherwise the solution is to fix |
The
If it's a simple change, I'd say that it would be worth doing first regardless of whether #44105 can be backported, as that one is not merged yet and will likely require some testing to validate the changes. For the |
Godot version:
Mono 3.2, 3.2.1 rc, 3.2.2 rc (I tested it with all of them as they were getting released to make sure it's not fixed)
OS/device including version:
Linux (pop-os), HTML5 in Google Chrome
Issue description:
C#/F# GD.Seed(1UL); (same for GD.Seed(1);)
produce black screen of death in HTML build.
The black screen does not get produced when doing a Linux build.
Only when it is in the browser.
Moreover, the issues does not occur if you call seed from GDScript.
Steps to reproduce:
Test in Browser => Black Screen
Test Normally => Works fine
5. (Optional) Try same thing with GDScript => works fine both in browser and normally
Project zip at the bottom after pics.
Minimal reproduction project:
seed_bug.zip
The text was updated successfully, but these errors were encountered: