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

[Linux] SDL: MakeCurrent returns sometimes EGL_BAD_ACCESS error on Wayland #2487

Open
Jklawreszuk opened this issue Oct 14, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@Jklawreszuk
Copy link
Collaborator

Jklawreszuk commented Oct 14, 2024

Release Type: Official Release

Version: 4.1.0.1805+

Platform(s): Linux, Fedora

Describe the bug

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

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
Described bug exists only for Wayland. If you switch to X11 by setting following variable

export SDL_VIDEODRIVER=x11

then problem does not occur.

@Jklawreszuk Jklawreszuk added the bug Something isn't working label Oct 14, 2024
@Jklawreszuk
Copy link
Collaborator Author

Jklawreszuk commented Oct 17, 2024

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
Copy link
Collaborator Author

Jklawreszuk commented Oct 17, 2024

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
Copy link
Collaborator Author

Jklawreszuk commented Oct 17, 2024

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

Edit: Error occurs for MeshRenderFeature

@Jklawreszuk
Copy link
Collaborator Author

Jklawreszuk commented Oct 20, 2024

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!

@Doprez
Copy link
Contributor

Doprez commented Oct 20, 2024

Those steps sound like a similar issue to the mobile issue steps #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.

@Jklawreszuk
Copy link
Collaborator Author

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

@Jklawreszuk
Copy link
Collaborator Author

Jklawreszuk commented Oct 22, 2024

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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 Jklawreszuk changed the title [Linux] Error while compiling GLSL shader. [] [Linux] SDL: Sometimes MakeCurrent returns (EGL_BAD_ACCESS) on Wayland Oct 23, 2024
@Jklawreszuk Jklawreszuk changed the title [Linux] SDL: Sometimes MakeCurrent returns (EGL_BAD_ACCESS) on Wayland [Linux] SDL: MakeCurrent returns sometimes EGL_BAD_ACCESS error on Wayland Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants