After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 569171 - gimp freeze with apparent memory leak on textbox opening
gimp freeze with apparent memory leak on textbox opening
Status: RESOLVED DUPLICATE of bug 565001
Product: GIMP
Classification: Other
Component: Tools
2.6.3
Other All
: Normal critical
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-01-26 10:29 UTC by Corentin Barbu
Modified: 2010-03-10 19:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test example, double click with text tool on text box and gimp freeze (202.61 KB, image/x-xcf)
2009-01-26 14:08 UTC, Corentin Barbu
Details
Valgrind Logfile (3.29 KB, text/plain)
2009-01-30 10:50 UTC, tobias
Details

Description Corentin Barbu 2009-01-26 10:29:19 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.
Comment 1 Corentin Barbu 2009-01-26 10:35:24 UTC
Sorry, I had forgotten to put the gimp version and severity mark.
Comment 2 Michael Schumacher 2009-01-26 11:44:44 UTC
Duplicate of bug 565001?
Comment 3 Corentin Barbu 2009-01-26 14:08:43 UTC
Created attachment 127255 [details]
test example, double click with text tool on text box and gimp freeze
Comment 4 tobias 2009-01-27 20:15:12 UTC
I can reproduce this bug and just run gimp in valgrind and made this log.
Comment 5 tobias 2009-01-27 20:32:52 UTC
Apropos, I used GIMP from SVN trunk on Linux (Ubuntu 8.10).
Comment 6 tobias 2009-01-30 10:50:55 UTC
Created attachment 127526 [details]
Valgrind  Logfile
Comment 7 Agri 2009-03-21 21:26:41 UTC
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?
Comment 8 Corentin Barbu 2009-03-22 07:24:54 UTC
Yes I think it is an other bug you can signal the link in the new bug issue
Comment 9 Sven Neumann 2009-03-22 10:55:12 UTC
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?
Comment 10 Corentin Barbu 2009-03-24 18:07:15 UTC
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 :-)
Comment 11 Corentin Barbu 2009-03-24 18:09:14 UTC
Just for a reminder, I've reproduced it on 2 machines and 2 OS and tobias reproduced it also.
Comment 12 Massimo 2009-07-01 15:59:16 UTC
(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,
Comment 13 Michael Schumacher 2009-07-01 18:54:16 UTC
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.
Comment 14 Sven Neumann 2009-07-01 20:45:51 UTC
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.
Comment 15 Michael Schumacher 2009-07-28 08:32:23 UTC
Massimo, how about a git-based patch?
Comment 16 Massimo 2009-07-28 17:44:22 UTC
(In reply to comment #15)
> Massimo, how about a git-based patch?

Not from me.
Sorry
Comment 17 Massimo 2010-03-10 16:25:22 UTC
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
Comment 18 Michael Natterer 2010-03-10 19:06:44 UTC
Thanks, resolving as duplicate.

*** This bug has been marked as a duplicate of bug 565001 ***