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

Exported Web Project does not work on Linux with Mesa 22.2+ #68180

Closed
ngreve opened this issue Nov 2, 2022 · 24 comments · Fixed by #80909
Closed

Exported Web Project does not work on Linux with Mesa 22.2+ #68180

ngreve opened this issue Nov 2, 2022 · 24 comments · Fixed by #80909

Comments

@ngreve
Copy link

ngreve commented Nov 2, 2022

Godot version

v4.0.beta4.official [e675154]

System information

  • Chromium Version 107.0.5304.87 (Official Build) Arch Linux (64-bit)

  • Firefox 107.0b8

  • OS: Arch Linux

  • KERNEL: 6.0.6-arch1-1

  • KERNEL: 6.0.7-arch1-1

  • KERNEL: 6.0.8-arch1-1

  • KERNEL: 6.0.9-arch1-1

  • CPU: AMD Ryzen 7 3700X 8-Core

  • GPU: AMD Radeon RX 6900 XT (navi21, LLVM 14.0.6, DRM 3.48, 6.0.6-arch1-1)

  • GPU DRIVER: 4.6 Mesa 22.2.1

Issue description

When I try to start the provided minimal project as a web project, the mesh in the scene is not visible and the browser console is showing this error right after the site loaded:
Screenshot from 2022-11-02 20-01-35

After that, the console is flooded with these error messages:
Screenshot from 2022-11-02 19-49-14

Steps to reproduce

Use the official beta4 with the provided templates and try to start the provided project as a web application

Minimal reproduction project

beta4_webtest.zip

@dzil123
Copy link
Contributor

dzil123 commented Nov 3, 2022

I've tested the project on the same system and browser versions listed and I can't reproduce this.

@ngreve
Copy link
Author

ngreve commented Nov 3, 2022

When I am working with godot I am actually always building from source, using the master branch. Here I used the official beta, to make sure my build process is not broken in any way.

So, does anyone know about any build cache/temporary files/config file which could cause this?
Does Godot somewhere store files, which could cause some sort of compatability issues, when I continuously "switch versions" this way?
I already did rm -rf .local/share/godot .config/godot .cache/godot, without any changes.

The thing is, that it also worked for me, up until ~2 weeks ago. And since then, I am stuck with the shown errors.

@dzil123
Copy link
Contributor

dzil123 commented Nov 3, 2022

I think those are the only folders that could be the culprit. You can try cleaning .godot in the project and running the official binary with a _sc_ file in the same directory.

Just to confirm, this is on the non-mono version, and the web export prints v4.0.beta4.official.e6751549c?

If that doesn't resolve it, can you please upload a build showcasing these errors to itch.io? Could this be a gpu driver issue?

@ngreve
Copy link
Author

ngreve commented Nov 3, 2022

running the official binary with a sc file in the same directory.

Unfortunately this didn't helped either.

Just to confirm, this is on the non-mono version, and the web export prints v4.0.beta4.official.e6751549c?

non-mono version and yes, it prints v4.0.beta4.official.e6751549c:
image

https://nico-g.itch.io/godot-bug-testing?secret=QyWWf5yhEeVCqjMq1imFUYBmuA
itch.io is showing me this error now:
image

But I did enable SharedBufferArray support:
image

This is the exported project:
index.zip

Could this be a gpu driver issue?

.... I am open for ideas on how to test it. Additionally Ive updated my system information in the OP

@akien-mga
Copy link
Member

itch's SharedArrayBuffer support only works in Chrome I think, so if the above test was in Firefox it may be why.

@ngreve
Copy link
Author

ngreve commented Nov 3, 2022

Thanks! I got it running with Chromium. But unfortunately the issue is still there for me.

image

(Btw, the uploaded project was created with the self-contained feature and a fresh project)

EDIT: As I said earlier, It feels like the web export stopped working roughly 2 weeks ago. I have taken a look at the mesa drivers in the arch linux repository. The package says, it was last updated on "2022-10-14". That would also match your suspicion about a faulty GPU driver ... Maybe there is a problem with the mesa drivers.

@ngreve
Copy link
Author

ngreve commented Nov 3, 2022

I've managed to install an older version (mesa-22.1.7) of the mesa drivers from my package cache.

Even though the capsule in the web version is not lighted properly, it is at least there now.
image

The error messages also disappeared.

So, the problems are probably caused by a faulty GPU driver of some sort.

@dzil123
Copy link
Contributor

dzil123 commented Nov 4, 2022

What is the first broken mesa version? There's a few versions in between 22.1.7 and 22.2.1: https://archive.archlinux.org/packages/m/mesa/

@ngreve
Copy link
Author

ngreve commented Nov 4, 2022

I've now tested 22.2.0-2 and 22.2.0-1, both are broken for me. 22.2.0-1 even partially broke my window manager (gnome); missing letters all over the place.

22.1.7 is the last version that works

Iv'e also tested the mesa-git package, which has the version:

$ glxinfo | grep Mesa
client glx vendor string: Mesa Project and SGI
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.0.0-devel (git-40bd7b4307)
OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.0.0-devel (git-40bd7b4307)
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.0.0-devel (git-40bd7b4307)

The error also occurs with version 23.0.0

EDIT 1: Correction of version numbers

EDIT 2: Upgraded to 22.2.2. The issue is still present.

EDIT 3: Upgraded to 22.2.3. The issue is still present.

@akien-mga

This comment was marked as resolved.

@ngreve

This comment was marked as resolved.

@AntonioDell
Copy link
Contributor

AntonioDell commented Dec 2, 2022

I have a similar problem with Godot 4 Beta 7. The only difference for me is that I do not get spammed with messages after the initial error.
It happens on Pop_OS! 22.04 with Firefox and Chrome.

EDIT: removed link to project website, since I need to revert to a previous godot version.

@ngreve
Copy link
Author

ngreve commented Dec 7, 2022

I've just compiled the newest version from master v4.0.beta.custom_build [a7937fe]. And it seems to get better ...

image

I do see the capsule now, but there are still errors in the console output

Current system information:

KERNEL: 6.0.11-arch1-1
GPU: AMD Radeon RX 6900 XT (navi21, LLVM 14.0.6, DRM 3.48, 6.0.11-arch1-1)
GPU DRIVER: 4.6 Mesa 22.2.3
Browser: Firefox 108.0b9

@AntonioDell
Copy link
Contributor

I can confirm that Godot 4 beta 8 solved the gray screen issue I was experiencing with Godot 4 beta 7.

@clayjohn
Copy link
Member

The remaining issues reported here should be fixed by #69634 and #69901

Since you are building from master can you confirm @ngreve?

@ngreve
Copy link
Author

ngreve commented Dec 12, 2022

Can not confirm.
I've built v4.0.beta.custom_build [ba4bd7f] and the error outputs from my last post are still there, so no difference for me.
Tested with Firefox and Chromium.

@AntonioDell
Copy link
Contributor

My project is 2D only, since the screenshot from your comment shows a 3D object, maybe this is a hint to the discrepancies?

@ngreve
Copy link
Author

ngreve commented Dec 14, 2022

The issue also appears to me with an empty 2DNode as the main scene.
Just to clarify: The out of bounds error is gone since v4.0.beta.custom_build[a7937fe]. Since then the capsule from the minimal project is rendered and visible.
The only error I get at this point is this USER ERROR: SceneShaderGLES3: Fragment shader compilation failed: error. I can not tell how crucial that is.
I've put a random shader on the capsule - a little bit metallic, blueish color and and red emission. When I put the web project (left) and the native project (right) side by side, you can definitely see a difference. But I can not tell if this is expected behavior, or if that's caused by the the Fragment shader compilation failed:
image

@clayjohn
Copy link
Member

The issue also appears to me with an empty 2DNode as the main scene. Just to clarify: The out of bounds error is gone since v4.0.beta.custom_build[a7937fe]. Since then the capsule from the minimal project is rendered and visible. The only error I get at this point is this USER ERROR: SceneShaderGLES3: Fragment shader compilation failed: error. I can not tell how crucial that is. I've put a random shader on the capsule - a little bit metallic, blueish color and and red emission. When I put the web project (left) and the native project (right) side by side, you can definitely see a difference. But I can not tell if this is expected behavior, or if that's caused by the the Fragment shader compilation failed: image

Are you using the gl_compatibility renderer in both cases?

The fragment shader error is very interesting I can see the shader printout from your original post says that MAX_LIGHT_DATA_STRUCTS is 0. This can only happen two ways:

  1. You set it to 0 in your project settings (it is set to 32 in the MRP) or
  2. Your GPU reports a maximum uniform block size of less than 64 (16384 is the bare minimum for any compliant OpenGL driver).

In either case it is getting set to a value that it should never be set to and we will need to figure out why. Would you be okay compiling and running a custom build that prints a bunch more debug info?

Also would be useful to test from a more up-to-date build as a7937fe does not include #69901 which is the PR I think may help

@ngreve
Copy link
Author

ngreve commented Dec 16, 2022

Also would be useful to test from a more up-to-date build

The post of #68180 (comment) was done using the newest available version from master at this time. And I tested it again with the now newest version v4.0.beta.custom_build [2e657e5] and the issue is still there.

You set it to 0 in your project settings (it is set to 32 in the MRP) or

Where can I check that?

Are you using the gl_compatibility renderer in both cases?

Good point, I didn't
But I did now:
image
image
Again, on the left side the web project, the right side shows the native project. Still very different.

Would you be okay compiling and running a custom build that prints a bunch more debug info?

Sure, but someone has to tell me what I should do and where I should do it.

@akien-mga akien-mga changed the title Godot 4 beta4 - Exported Web Project does not work Exported Web Project does not work on Linux with Mesa 22.2+ Feb 22, 2023
@akien-mga akien-mga modified the milestones: 4.0, 4.x Feb 22, 2023
@akien-mga
Copy link
Member

Is this still reproducible in 4.0 RC 3 or later?

@turnercore
Copy link

I'm getting console errors and extremely long load times (if it ever starts) right out of the box on RC4. This is with a project that is just one scene with the godot icon in it. This is on the Arc browser on MacOS (although I also tried other browsers with similar results).

I haven't tested on Windows or Linux versions of Godot, when I get back where I can get to my VM I can try it on other builds to see if it's better.

Screenshot of Arc

web-export-RC4.log

@clayjohn
Copy link
Member

I'm getting console errors and extremely long load times (if it ever starts) right out of the box on RC4. This is with a project that is just one scene with the godot icon in it. This is on the Arc browser on MacOS (although I also tried other browsers with similar results).

I haven't tested on Windows or Linux versions of Godot, when I get back where I can get to my VM I can try it on other builds to see if it's better.

Screenshot of Arc

web-export-RC4.log

You seem to be experiencing #70691. Which is a macOS specific issue. This issue is Linux/mesa specific.

@inbouto
Copy link

inbouto commented May 6, 2023

I'm having the same issue, on archlinux, with a 6700XT and up-to-date drivers, when using spotlights and omnilights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants