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

Gtk/OpenGL backend crashes on nVidia 460 series #21

Closed
philstopford opened this issue Jan 11, 2021 · 19 comments · Fixed by #23
Closed

Gtk/OpenGL backend crashes on nVidia 460 series #21

philstopford opened this issue Jan 11, 2021 · 19 comments · Fixed by #23

Comments

@philstopford
Copy link
Contributor

Trying to run the test under a variety of Linux distributions and drivers, I see a fail of the form :

{{{
(TestEtoVeldrid.Gtk:5684): Gdk-ERROR **: 17:36:39.434: The program 'TestEtoVeldrid.Gtk' received an X Window System error.
This probably reflects a bug in the program.
The error was 'GLXBadContextTag'.
(Details: serial 446 error_code 162 request_code 151 (GLX) minor_code 26)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
}}}

forcing Vulkan avoids this, but there are some issues there as well

@cwensley
Copy link
Member

@philstopford Thanks for reporting the issue.

Do you have a way to reproduce this so I can test it?

@philstopford
Copy link
Contributor Author

I used the Veldrid test application, altering the target framework to net5.0 from net472;netcoreapp3.1
In the attached, I forced the backend for Gtk to Vulkan

test_vulkan.zip

Video :

vulkan_test.mp4

@philstopford
Copy link
Contributor Author

Removing the forced use of Vulkan in the MainForm.cs under test/TestEtoVeldrid, the GLX error is then obtained:

opengl_fail.mp4

@cwensley
Copy link
Member

@philstopford thanks for the info! what distro/version and graphics drivers are you using? Do other OpenGL applications work? I cannot replicate the OpenGL issue with Ubuntu 20.10 running in a VM, and Vulcan doesn't work at all for me due to missing drivers.

@philstopford
Copy link
Contributor Author

philstopford commented Jan 11, 2021

This has been seen under Linux Mint 20, Ubuntu 20.10. I don't see it on my other machine that only has an Intel 7600U (620 graphics) in it, for the same operating systems.

I've tried with various nVidia drivers (460 series being the latest available under the environments).

glxgears runs OK.

@cwensley
Copy link
Member

glxgears runs OK.

Hmm.. I wonder if there's a Gtk+ or GtkSharp example that we could try as well that uses the GLArea control. At least to rule out anything to do with Veldrid.

@philstopford
Copy link
Contributor Author

I can build and run the Veldrid samples without issue, for net5.0, under Linux.

@cwensley
Copy link
Member

... those do not use Gtk as far as I can tell. They use SDL2 to create the window.

@philstopford
Copy link
Contributor Author

Makes me wonder about picoe/Eto.OpenTK#30 now :D

@cwensley
Copy link
Member

@philstopford could you give https://github.com/ebassi/glarea-example a try? (I just compiled it, using Flatpak didn't work) It should be the same as what we do to get the OpenGL backend going. I'm seeing the same behaviour when resizing where the window flickers, but I still don't see any crashes.

@philstopford
Copy link
Contributor Author

philstopford commented Jan 12, 2021

simplescreenrecorder-2021-01-12_13.16.00.mp4

OK. Needed to install a whole bunch of developer packages. Built and running without issue. No crash, no black panel, resizes without flickering.

@cwensley
Copy link
Member

cwensley commented Jan 14, 2021

@philstopford awesome, good to know that works for you so we should be able to get this working. The only difference I see is when the Veldrid initialization is done (during the first render vs. realize with the glarea app), which might have something to do with it. I'll make some changes in a PR so you can test it out.

@philstopford
Copy link
Contributor Author

@cwensley : just wondering when you might have time for the PR? Just curious, not intended to be read any other way :)

@philstopford
Copy link
Contributor Author

@cwensley
Copy link
Member

@philstopford hm, thanks but it looks like your testing Vulkan (which I didn't change). Could you test with OpenGL?

@cwensley cwensley changed the title net 5.0 default test issue - GLX failure on nVidia 460 series (and earlier) Gtk/OpenGL backend crashes on nVidia 460 series Jan 21, 2021
@philstopford
Copy link
Contributor Author

philstopford commented Jan 21, 2021

OpenGL throws a GLX error and dies (as above).

simplescreenrecorder-2021-01-21_10.29.06.mp4

@cwensley
Copy link
Member

@philstopford thanks, I'll look into it further. I am also updating Eto.OpenTK to use GLArea so once I get that going we can perhaps see if it is something Veldrid is doing.

@philstopford
Copy link
Contributor Author

@cwensley : did you manage to dig further?

@Beyley
Copy link

Beyley commented Dec 24, 2021

I tested on my machine (GTX 1050ti with latest nvidia drivers) and i get the same GL error

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

Successfully merging a pull request may close this issue.

3 participants