-
-
Notifications
You must be signed in to change notification settings - Fork 682
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
internal/graphicsdriver/opengl/gl: Wayland + EGL causes crash #3152
Comments
Does a regular GLFW application work?
|
Yes, floating cube does appear, eventually, both gl21 and gl41
|
Just checked v2.7.10 - it worked. A bit of manual bisecting later:
Given the contents of the commit, tried switching back to 2.7.10, and running I know absolutely nothing about this, but I tried to
then tried inserting // Try OpenGL ES first. Some machines like Android and Raspberry Pi might work only with OpenGL ES.
for _, name := range []string{"libGLESv2_nvidia.so.2", "libGLESv2.so", ... but it crashed anyway. |
Oh I see, so there is an issue somewhere when you use OpenGL ES instead of OpenGL... |
Ebitengine requires OpenGL ES 3.0 and above. What is your OpenGL ES version? You can check this by glxinfo | grep "OpenGL ES" |
output of
I also tried |
Hmm, let me think more... |
Would it be possible to use a debugger and see where the crash happens? |
Go's debugger or C's? If C - I don't know how (never used C) I just went back in time to november 2022 (f6f7ed3), the first time |
I guess gdb should work.
You mean it crashed with |
With, running If I manually edit master version to avoid using ES, then main also works. Only ES crashes. |
If you are not familiar with debuggers, don't worry. I'll try to think another way |
Sure, thanks. I might add an option to force non-es gl later. |
I'm unfamiliar with debuggers beyond pressing a single button in my IDE) I wanna try gdb though |
So I've installed
and eventually
Though I think this is mostly useless. |
Thank you for trying! What about the backtrace |
Now with backtrace:
It partially matches gnif/LookingGlass#112 (comment), which I found just by googling for |
Thanks! There might be a hint around EGL. See also: #292 (comment) |
Aha, Wayland is actually not tested well. |
glfw/glfw#2536 also seems a similar issue, but probably different. |
@MonstraG Could you try glxinfo | grep GLX_EXT_create_context_es2_profile ? If this extension exists, we can use GLX instead of EGL and we can fix this by doing so. |
|
Thanks. I'll try to fix this tomorrow. |
Use GLX when possible. EGL with an X window might not work well on Wayland unfortunately. Updates #3152
Use GLX when possible. EGL with an X window might not work well on Wayland unfortunately. Updates #3152
Woohoo, "Hello, World!" was finally rendered on my screen! Let's just hope it won't break in anyone else's environment. |
Thank you for confirming!
I believe this is a relatively safe change. I'll cherry-pick to 0.8. |
Use GLX when possible. EGL with an X window might not work well on Wayland unfortunately. Closes #3152
Ebitengine Version
tried
2.8.3
and
v2.9.0-alpha.3.0.20241103104718-1014e4536557
Operating System
Go Version (
go version
)go version go1.23.2 linux/amd64
What steps will reproduce the problem?
go run github.com/hajimehoshi/ebiten/v2/examples/rotate@latest
What is the expected result?
runs
What happens instead?
Anything else you feel useful to add?
I probably need to give some more details about my environment, but I'm not sure which.
All dependencies are installed via
gcc
was installed already.The text was updated successfully, but these errors were encountered: