Megapixels version 1.0.1 stops during startup with below error -
(megapixels:13784): Gdk-WARNING **: 06:42:00.590: The program 'megapixels' received an X Window System error. This probably reflects a bug in the program. The error was 'GLXBadFBConfig'. (Details: serial 221 error_code 167 request_code 152 (GLX) minor_code 0) (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.)
It was diagnosed to be an issue with GTK+ 4: https://todo.sr.ht/~martijnbraam/Megapixels/51
Since sxmo now has stable builds, it is recommended that users that depend on daily driving their pinephone use pmOS stable + sxmo.
I said it was not our bug since ~cnx said:
It was diagnosed to be an issue with GTK+ 4
Reading the original thread, I see the user could not run gtk4-demo. I was able to run gtk4-demo on my pinephone with sxmo+pmOS stable. The only code in sxmo that could cause this error is here: https://git.sr.ht/~mil/sxmo-utils/tree/master/item/configs If you find something, let me know.
By the way, the error says "To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior". I can suggest changing the environmental variable so we can debug this issue better.
I tried to debug this a bit today. I'm not experienced with debugging C or C++ programs. I did have to debug it with the gtk4.0-demo because I didn't find debug symbols for megapixels. Unfortunately I had to do this on the phone rather than via SSH, which obviously is a PITA. Via SSH it would quite before the actual errors occur with "Unable to init Broadway server: Could not connect: No such file or directory". So here's what I did.
export GDK_SYNCHRONIZE=1 gdb gtk4-demo b gdk_x_error run
Then it breaks on ../gdk/x11/gdkmain-x11.c:217 and once more on ../gdk/x11/gdkmain-x11.c:225. I looked up the source on https://github.com/GNOME/gtk/blob/gtk-4-2/gdk/x11/gdkmain-x11.c and the line numbers don't really match up. error_display is 0x0, which may or may not be a sane value. Other variables I tried are ?
No clue, so I'd appreciate it if someone could tell me how to do this in a sane fashion.
After a recent GTK+4 update on Hương Tràm, this bug was fixed. Megapixels still crashes, but for a different reason: https://todo.sr.ht/~martijnbraam/Megapixels/52