GNOME Bugzilla – Bug 569171
gimp freeze with apparent memory leak on textbox opening
Last modified: 2010-03-10 19:06:44 UTC
Hi, I'm working on ubuntu 8.10, editing one of the text box of my picture make the gimp to freeze, "top" in a console shows an infinite memory size increase for gimp (reaching easily 1.3 G). Launching gimp in a terminal allow to to see (after killing gimp) : gimp: terminated: Complété (script-fu:22017): LibGimpBase-WARNING **: script-fu: gimp_wire_read(): error Processus arrêté It have been reproduce on the same computer after a reboot and on an other computer with the same configuration, and on the later windows version (without apparent memory leak). To be able to reproduce the bug, I think you need the file that make it freeze. I would be glad to share it but doesn't seems to be possible here, so I put it on a http server : http://gala.univ-perp.fr/~cbarbu/Affiche.xcf You've only to double click on the text box with the text editing tool to make it freeze.
Sorry, I had forgotten to put the gimp version and severity mark.
Duplicate of bug 565001?
Created attachment 127255 [details] test example, double click with text tool on text box and gimp freeze
I can reproduce this bug and just run gimp in valgrind and made this log.
Apropos, I used GIMP from SVN trunk on Linux (Ubuntu 8.10).
Created attachment 127526 [details] Valgrind Logfile
Got the same message on stdout while choosing a pic by mouse in the "open file" dialog. I suppose this happens when gimp is trying to create preview of a pic. Gimp successfully opens a pic if i just type in a filename. gimp version 2.6.6. P.S. Should I submit a "new" bug about that?
Yes I think it is an other bug you can signal the link in the new bug issue
Agri, your problem is totally unrelated. Please do not post further comments to this bug report. I can't reproduce the problem reported by Corentin. Is there something special about your system? Are you perhaps using GIMP on a 64bit system?
No I'm not on 64 bits, as most of people here have reproduced the bug (and I've also on other files) I seems it's your system wich is special :-)
Just for a reminder, I've reproduced it on 2 machines and 2 OS and tobias reproduced it also.
(In reply to comment #3) > Created an attachment (id=127255) [edit] > test example, double click with text tool on text box and gimp freeze The file mentioned above is an image with a moderately high resolution (30 dots/mm) and that has set an initially unused property (box-unit) of a text layer to millimiters. I've not found any code that sets it to something else than its default value. Anyway it's read from the file and once the dimensions of the box are known it is used to compute the dimensions of the area of the rendered text. When setting the dimensions of this box it is sufficient to set the corresponding units, to avoid the excessive allocation. That's what the following patch is supposed to do. Massimo --- gimp-2.6.6/app/tools/gimptexttool.c 2009-06-26 07:25:59.000000000 +0200 +++ app/tools/gimptexttool.c 2009-07-01 17:16:26.000000000 +0200 @@ -912,6 +933,7 @@ "box-mode", GIMP_TEXT_BOX_FIXED, "box-width", (gdouble) (x2 - x1), "box-height", (gdouble) (y2 - y1), + "box-unit", GIMP_UNIT_PIXEL, NULL); gimp_item_translate (item, x1 - item->offset_x, @@ -1309,6 +1331,7 @@ "box-mode", GIMP_TEXT_BOX_FIXED, "box-width", (gdouble) (x2 - x1), "box-height", (gdouble) (y2 - y1), + "box-unit", GIMP_UNIT_PIXEL, NULL); gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TEXT,
If you do attach patches to bug reports instead of including them in comments, and mark the patch check box when doing so, they will be marked with patch marks in the bug lists.
Even better if you do your changes in your local git clone and create the patches using 'git format-patch'. That makes it a lot easier for us to apply them and your name will appear as author of the change.
Massimo, how about a git-based patch?
(In reply to comment #15) > Massimo, how about a git-based patch? Not from me. Sorry
This bug should be marked as a duplicate of Bug 565001 - Text-Tool crashes when edit a 2.4.2 version xcf In fact it is fixed after these two commits: http://git.gnome.org/browse/gimp/commit/?h=gimp-2-6&id=ded453fc885bd58e2d2f2d2c15eb14d27d7bc338 http://git.gnome.org/browse/gimp/commit/?h=gimp-2-6&id=18e3c7240bae097b96c50a09876e1e2f5042637b
Thanks, resolving as duplicate. *** This bug has been marked as a duplicate of bug 565001 ***