Bug#737590: gnome-control-center: crashes when moving to "Background" applet

Gagou gagou.jobin at hispeed.ch
Wed Apr 16 19:12:29 UTC 2014


Just for information:

The bug was introduced by the commit
0e037561c325def364f93871abf4d5294ce61802 on Oct 10, 2012
(https://github.com/GNOME/gnome-control-center/commit/0e037561c325def364f93871abf4d5294ce61802#diff-4253d68594c0375c66352c8859f33117)

And was corrected by 04f1094cc5c27197d53fa8ebcf6e6e640c1d5a72 on Sep 08,
2013
(https://github.com/GNOME/gnome-control-center/commit/04f1094cc5c27197d53fa8ebcf6e6e640c1d5a72)

To sum up:

Before the first commit, the background preview in the background panel
was created by these steps:
- Load the background picture (GdkPixbuf).
- Do a screenshot of the whole Desktop (GdkPixbuf).
- Transform the screenshot GdkPixbuf into surface and cairo_t.
- Remove (clear) the "workarea" from the screenshot (cairo_t).
- Convert the resulting surface into a GdkPixbuf.
- Merge background picture and the screenshot-whitout-workarea.

Someone wrote about a possible improvment in the case of contiguous
workarea like in Gnome-Shell case. So the steps after the first commit
was:
- Load the background picture (GdkPixbuf).
- In case of workarea contiguous...
   - Compute the non-workarea geometry based on monitor and workarea
geometry.
   - Do a ScreenshotArea of the non-workarea instead of the whole
Desktop.
   - Convert the ScreenshotArea into surface and cairo_t.
   - Convert the resulting surface into a GdkPixbuf.
   - Merge background picture and the screenshot-only-non-workarea.
- In case of workarea non-contiguous...
   - Same as before commit.

The only problem was the conversion of the surface into a GdkPixbuf. The
surface geometry was based on the screenshot geometry (in fact, a
ScreenshotArea with smaller geometry (example: if monitor geometry is
1920x1080, the non-workarea is 1920x27)) but the GdkPixbuf was based on
the monitor geometry. This difference produced a segfault when the
function responsible of the conversion was trying to access the surface
pixels data based on the monitor gemoetry.

The second commit resolve this problem.



More information about the pkg-gnome-maintainers mailing list