stride icon indicating copy to clipboard operation
stride copied to clipboard

[Linux] Error while compiling GLSL shader. []

Open Jklawreszuk opened this issue 1 year ago • 6 comments

Release Type: Official Release

Version: 4.1.0.1805+

Platform(s): Linux

Describe the bug

It is not possible to play any game during runtime because of error : Error while compiling GLSL shader. []

To Reproduce Steps to reproduce the behavior:

  1. Run GameStudio
  2. Create new project based on SpaceEscape template
  3. Add Linux platform
  4. Go to Linux platform project and build It to test executable on Linux
  5. Run

Expected behavior The application should work flawlessly

Log and callstacks stacktrace.txt

Additional context What interesting though, You can run without any issues OpenGL app on Windows, so it might be easy to solve once you find the cause of the problem. This issue will be updated as my investigation continues.

Jklawreszuk avatar Oct 14 '24 07:10 Jklawreszuk

I found another way to reproduce the error:

  1. create a project from an empty template - select HDR and Level 11
  2. remove skybox and leave only two elements for Main Scene - camera and light.
  3. import any custom model (for testing purposes I used royality free Train kit from Kenney).

Jklawreszuk avatar Oct 17 '24 04:10 Jklawreszuk

Another use case:

1 . create a project from an empty template 2. remove skybox and leave only two elements for Main Scene - camera and light.

  1. this time import only spritesheet (download any image from the internet or create by yourself) and add it to the scene

Works

Jklawreszuk avatar Oct 17 '24 04:10 Jklawreszuk

Conclusion : Both Procedural and Imported models may share a common code that is flawed

Edit: Error occurs for MeshRenderFeature

Jklawreszuk avatar Oct 17 '24 04:10 Jklawreszuk

Okay...That's new.

Another use case 1 . create a project from an empty template, but this time don't check the HDR option and use LDR instead - also pick lowest API level - Level 9 2. remove skybox and leave only two elements for Main Scene - camera and light. 3. import any model - procedural cube for example

Works!

Jklawreszuk avatar Oct 20 '24 00:10 Jklawreszuk

Those steps sound like a similar issue to the mobile issue steps https://github.com/stride3d/stride/issues/2485

You might be able to just uncheck Generate mipmaps if Im right? I dont know how much that info actually helps you but if its true it may be useful.

Doprez avatar Oct 20 '24 00:10 Doprez

I'm not sure if this is the case because my test projects don't contain any materials at all 😕

Jklawreszuk avatar Oct 20 '24 07:10 Jklawreszuk

I compared the shader scripts and on both Windows and Linux they are the same Edit: Only difference I didn't noticed is GL.CreateProgram return 0. Also, SDL.MakeCurrent fails...

Jklawreszuk avatar Oct 22 '24 05:10 Jklawreszuk

Another progress, I was able to capture SDL error:

INFO: Unable to make EGL context current (call to eglMakeCurrent failed, reporting an error of EGL_BAD_ACCESS) -1

Jklawreszuk avatar Oct 23 '24 03:10 Jklawreszuk

Huh...Good news ! Looks like I have managed to making it work! Bad news is that there is something wrong with wayland Setting following env variable to X11 fixed an issue:

export SDL_VIDEODRIVER=x11 

Jklawreszuk avatar Oct 23 '24 03:10 Jklawreszuk

According to one of the SDL contributors, it seems that SDL_EG_MakeCurrent is limited to a single context for wayland. See https://github.com/libsdl-org/SDL/issues/9072 for more details. I propose as temp workaroud to set X11 as a drvier until someone fixes it in SDL repo or we should adapt our rendering system. Perhabs someone smarter than me could figure out

Jklawreszuk avatar Apr 05 '25 18:04 Jklawreszuk