Segfault when trying to make a screenshot of a window
Was reported a while ago at https://bugs.launchpad.net/ubuntu/+source/gnome-screenshot/+bug/1625773
I am using custom DE without GNOME or many of its components.
I can make screenshots of the part of the screen, but when making screenshot of individual windows I'm getting a segfault like this:
** Message: 12:43:56.644: Unable to use GNOME Shell's builtin screenshot interface, resorting to fallback X11.
Thread 1 "gnome-screensho" received signal SIGSEGV, Segmentation fault.
Downloading source file /usr/src/gnome-screenshot-41.0-2build2/obj-x86_64-linux-gnu/../src/screenshot-backend-x11.c
screenshot_backend_x11_get_pixbuf (backend=<optimized out>, rectangle=0x0) at ../src/screenshot-backend-x11.c:479
479 *dest_pixels++ = *src_pixels++;
(gdb) bt
#0 screenshot_backend_x11_get_pixbuf (backend=<optimized out>, rectangle=0x0) at ../src/screenshot-backend-x11.c:479
#1 0x0000555555560184 in screenshot_get_pixbuf (rectangle=0x0) at ../src/screenshot-utils.c:66
#2 finish_take_screenshot (self=0x55555557fac0) at ../src/screenshot-application.c:486
#3 take_screenshot_timeout (user_data=0x55555557fac0) at ../src/screenshot-application.c:539
#4 0x00007ffff7d69522 in g_timeout_dispatch (source=source@entry=0x5555556770f0, callback=<optimized out>, user_data=<optimized out>) at ../../../glib/gmain.c:4989
#5 0x00007ffff7d6848e in g_main_dispatch (context=0x5555555827c0) at ../../../glib/gmain.c:3344
#6 0x00007ffff7dc7717 in g_main_context_dispatch_unlocked (context=0x5555555827c0) at ../../../glib/gmain.c:4152
#7 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x5555555827c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4217
#8 0x00007ffff7d67a53 in g_main_context_iteration (context=context@entry=0x5555555827c0, may_block=may_block@entry=1) at ../../../glib/gmain.c:4282
#9 0x00007ffff71d588d in g_application_run (application=application@entry=0x55555557fac0, argc=argc@entry=2, argv=argv@entry=0x7fffffffe448) at ../../../gio/gapplication.c:2712
#10 0x000055555555c21e in main (argc=2, argv=0x7fffffffe448) at ../src/gnome-screenshot.c:47
Currently running Ubuntu 24.04.