Closed KlipperKyle closed 4 years ago
I've got yet another crash case here while running mate-screenshot under AwesomeWM. Here are steps to reproduce the crash on latest mate-utils git master:
mate-screenshot -i
The backtrace follows:
(gdb) run -i
Starting program: /usr/local/bin/mate-screenshot -i
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffed996700 (LWP 17105)]
Detaching after fork from child process 17106.
[New Thread 0x7fffecf87700 (LWP 17107)]
[New Thread 0x7fffe7fff700 (LWP 17108)]
Program received signal SIGSEGV, Segmentation fault.
screenshot_get_pixbuf (window=0x63fb40 [GdkWindow], window@entry=0x63fc60 [GdkWindow], rectangle=0x0, include_pointer=1,
include_border=<optimized out>, include_mask=include_mask@entry=0) at screenshot-utils.c:956
956 *dest_pixels++ = *src_pixels++;
(gdb) bt
#0 0x000000000040bb34 in screenshot_get_pixbuf (window=0x63fb40 [GdkWindow],
window@entry=0x63fc60 [GdkWindow], rectangle=0x0, include_pointer=1, include_border=<optimized out>, include_mask=include_mask@entry=0) at screenshot-utils.c:956
#1 0x0000000000409847 in check_file_done (rectangle=<optimized out>, window=0x63fc60 [GdkWindow], initial_uri=0x7fffdc001520 "file:///tmp/Screenshot at 2016-06-28 14-34-53.png") at mate-screenshot.c:898
#2 0x0000000000409847 in check_file_done (user_data=0x729840) at mate-screenshot.c:955
#3 0x00007ffff63f1a2f in mainloop_proxy_func (data=0x7fffdc001320) at gioscheduler.c:200
#4 0x00007ffff505e7aa in g_main_context_dispatch (context=0x641d00) at gmain.c:3109
#5 0x00007ffff505e7aa in g_main_context_dispatch (context=context@entry=0x641d00) at gmain.c:3708
#6 0x00007ffff505eaf8 in g_main_context_iterate (context=0x641d00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3779
#7 0x00007ffff505edca in g_main_loop_run (loop=0x680f90) at gmain.c:3973
#8 0x00007ffff6d34997 in IA__gtk_main () at gtkmain.c:1268
#9 0x000000000040804f in main (argc=1, argv=0x7fffffffe438) at mate-screenshot.c:1456
Note the same mate-screenshot works just fine under ratpoison and openbox on the same system and produces picture files just as expected.
can you try if https://github.com/mate-desktop/mate-utils/commit/9a5f07e008367db8676586551e71357443a2aa21 fixes this issue?
I'm really sorry. I threw away my Arch Linux environment some time ago.
This can be closed?
If I try to use mate-screenshot outside of the MATE environment (i.e. barebones window manager), mate-screenshot segfaults if I tell it to take a screenshot of only one window.
This happens when specifying -w (window), or -i (interactive) and selecting "Window". This only happens when mate-screenshot tries to grab the window border (-b option). If I tell mate-screenshot to exclude the window border, then it works fine.
System info: x86_64, Arch Linux, mate-utils 1.12.0-1. The barebones environment is Window Maker.
Workaround: tell mate-screenshot to not snapshot the border (-B option).