xfdesktop crashes when showing a corrupt JPEG
Issue Description
When attempting to display a corrupted JPEG file, xfdesktop crashes.
Steps to Reproduce Issue
- Configure xfdesktop so that it will show a corrupted image. In my case, I set it to cycle through a wallpaper folder that contained a corrupted JPEG.
Expected Behavior
Either (a) it shows a partial image, or (b) it shows the default gradient/solid background.
Additional Information
Stack trace from the crash:
Thread 1 "xfdesktop" received signal SIGSEGV, Segmentation fault.
0x000055555558658c in render_finished (surface=0x0, width=-1, height=<optimized out>, error=0x5555560fda40, user_data=0x555557481310) at xfdesktop-backdrop-manager.c:855
855 ridata->callback(NULL, NULL, NULL, error, ridata->callback_user_data);
(gdb) bt
#0 0x000055555558658c in render_finished (surface=0x0, width=-1, height=<optimized out>, error=0x5555560fda40, user_data=0x555557481310)
at xfdesktop-backdrop-manager.c:855
#1 0x000055555558855b in image_data_error (image_data=<optimized out>, error=0x5555560fda40) at xfdesktop-backdrop-renderer.c:78
#2 0x0000555555588788 in file_input_stream_ready_cb (source_object=0x7fffd0000e20, res=<optimized out>, user_data=0x55555590adc0) at xfdesktop-backdrop-renderer.c:535
#3 0x00007ffff6ec1f4e in async_ready_callback_wrapper () at /usr/lib64/libgio-2.0.so.0
#4 0x00007ffff6ef7543 in g_task_return_now () at /usr/lib64/libgio-2.0.so.0
#5 0x00007ffff6ef757d in complete_in_idle_cb () at /usr/lib64/libgio-2.0.so.0
#6 0x00007ffff6cf0fc2 in g_main_dispatch () at /usr/lib64/libglib-2.0.so.0
#7 0x00007ffff6cf4487 in g_main_context_iterate_unlocked.isra () at /usr/lib64/libglib-2.0.so.0
#8 0x00007ffff6cf4ae0 in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#9 0x00007ffff6f27c0d in g_application_run () at /usr/lib64/libgio-2.0.so.0
#10 0x000055555557e416 in main (argc=1, argv=0x7fffffffd258) at main.c:64
I've also got a Valgrind log in case that's useful.
Environment & Versions
- OS distribution and version: Gentoo
- Overall Xfce version: 4.20.0
- xfdesktop version (git hash if not a release): Occurs in both 4.20.0 and 65df08d4
- Windowing system (X11/Wayland): X11