GNOME Bugzilla – Bug 712773
tile-backend doesn't seem to work
Last modified: 2013-11-28 20:50:38 UTC
Using GIMP with a low image-chache size (eg 100MB) and with a large image (eg 3k x 3k), it will likely crash inside GEGL (or do something else crazy) After several tries, GEGL doesn't segfault in the same place... The current hypothesis is that the tile-backend doesn't work as it should. I don't have much information currently, attaching a stack trace won't really help since it changes each time, but I fill the bug so we don't forget it.
As suggested by Massimo, trying: diff --git a/gegl/buffer/gegl-buffer-linear.c b/gegl/buffer/gegl-buffer-linear.c index b57ab6f..ed5066b 100644 --- a/gegl/buffer/gegl-buffer-linear.c +++ b/gegl/buffer/gegl-buffer-linear.c @@ -45,6 +45,7 @@ gegl_buffer_linear_new2 (const GeglRectangle *extent, "tile-width", rowstride, "tile-height", extent->height, "format", format, + "path", "RAM", NULL); g_object_set_data (G_OBJECT (buffer), "is-linear", (void*)0xf00); GIMP still crashes while painting... Though, this time, it crashes always at the same place:
+ Trace 232824
Also it sometimes behaves strangely: painting seems to make gegl lose tiles as they became transparent. Also, applying a gegl filter makes the image disappear forever (even with canceling)
Created attachment 261348 [details] tiles lost When zoomed at 50%, and with the "path", "RAM", it doesn't always crashes, the screenshot attached shows what happens, something like losing tiles.
Created attachment 262931 [details] [review] proposed patch these are two patches trying to fix the crashes and the artifacts: 1) creating the linear buffer in RAM explicitely mark the tile as not yet stored (a new tile is by default considered stored) 2) when inserting a tile in the cache explicitely initialize tile's members used when the tile is successively stored by the backend
Review of attachment 262931 [details] [review]: It fixes the issue here. Now it works flawlessly with a low image-cache size. Nice :)
Fixed in master, thanks! commit 9a13353487a8e19f30ab9806a68188a303657ff2 Author: Massimo Valentini <mvalentini@src.gnome.org> Date: Thu Nov 28 18:45:02 2013 +0100 gegl: use RAM backend for linear buffers gegl/buffer/gegl-buffer-linear.c | 41 ++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit 9d2b618ea925e132668bb8b43bbb3c4cef19ec2b Author: Massimo Valentini <mvalentini@src.gnome.org> Date: Thu Nov 28 18:23:34 2013 +0100 gegl: initialize tile's members before inserting in the cache gegl/buffer/gegl-tile-handler-cache.c | 5 +++++ 1 file changed, 5 insertions(+)