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 565001 - Text-Tool crashes when edit a 2.4.2 version xcf
Text-Tool crashes when edit a 2.4.2 version xcf
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
2.6.3
Other All
: Normal critical
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
: 569171 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-12-18 14:56 UTC by Ruediger Dehmel
Modified: 2010-03-10 19:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
2.6.3 text tool crashes when editing this xcf created with 2.4.2 (21.11 KB, application/gimp)
2008-12-18 15:06 UTC, Ruediger Dehmel
Details

Description Ruediger Dehmel 2008-12-18 14:56:42 UTC
Please describe the problem:
See example

Steps to reproduce:
1. load example xcf file, this file whas original created with 2.4.2 (Windows)
2. Select Text Layer, select Text-Tool, click at the Text.



Actual results:
The Text-Layer gets big,
the text moves away and some times the programm eats up all memory and is not responding.

Expected results:
Nothing

Does this happen every time?
Yes, with this xcf file.

Other information:
No
Comment 1 Ruediger Dehmel 2008-12-18 15:06:01 UTC
Created attachment 124930 [details]
2.6.3 text tool crashes when editing this xcf created with 2.4.2
Comment 2 Martin Nordholts 2008-12-18 17:07:36 UTC
I can't reproduce this, looks like we need more detailed step-by-step instructions.
Comment 3 Ruediger Dehmel 2008-12-19 11:30:27 UTC
(In reply to comment #2)
> I can't reproduce this, looks like we need more detailed step-by-step
> instructions.
> 

1. Windows GIMP-2.6.3 installed (seperate windows for tools, layer and image)
2. download and open the hello.xcf
3. select (click) the text layer in the layer window (I see a frame around the text)
4. select (click) the text-tool in the tools window
5. one click on the text in the image window. Now the image window is active, the resize line are visible and the text-tool shows the font, size and color of the text.
5. next click on the text in the image window to open the text editor.
6. the text editor comes up (with the text in int) - but the text layer frame lines in the image window gets big, the resize lines are in the upper left corner with original size and the top horizontal line runs out of the right edge of the window, same for the left vertical line down. the text is no longer visible.
Comment 4 Martin Nordholts 2008-12-20 15:38:51 UTC
Thanks, I can reproduce this now on Linux as well.
Comment 5 Sven Neumann 2008-12-27 15:18:34 UTC
Seems to work fine with GIMP from SVN trunk though.
Comment 6 Sven Neumann 2008-12-27 15:30:57 UTC
I don't seem to be able to reproduce this with GIMP 2.6.
Comment 7 Martin Nordholts 2009-01-04 18:34:38 UTC
As far as I can see this problem is due to an incomplete Text Tool implementation. When clicking on the text the second time the tool changes mode from 'automatically sized rectangle' to 'manually sized rectangle'. The cached size of the text in GimpTextLayout::extents is way too large. Trunk also has the same broken caching, but instead of clicking on the text a second time one just makes the rectangle slightly bigger.
Comment 8 tobias 2009-01-27 20:31:19 UTC
I can reproduce this with Linux (Ubuntu 8.10) and GIMP from SVN trunk.
Comment 9 Martin Nordholts 2009-08-22 09:51:37 UTC
I'm still able to get weird behaviour in git master (which have had many changes to the text tool) with this step-by-step:

1. Open hello.xcf
2. Select the layer and click on the layer in the image window with the text tool
3. Grab the lower-left handle and resize the layer a few pixels downwards

Expected result
The text layer is resized accordingly

Actual result:
The text layer boundaries becomes huge

We really need to fix this for GIMP 2.8, but let's keep it on the 2.6 milestone list for now.
Comment 10 Michael Natterer 2010-02-21 13:26:42 UTC
There is no broken caching going on here. The problem is that box-width
and box-height are in *units* not in pixels. But the new rectangle-based
text tool sets the *pixel* size of the rectangle as FIXED size. These
values need to be converted to units or they can end up at insanely small
or large (as in this case) pixel sizes.
Comment 11 Michael Natterer 2010-02-21 13:33:01 UTC
Fixed in 2-6:

commit ded453fc885bd58e2d2f2d2c15eb14d27d7bc338
Author: Michael Natterer <mitch@gimp.org>
Date:   Sun Feb 21 14:31:15 2010 +0100

    Bug 565001 - Text-Tool crashes when edit a 2.4.2 version xcf
    
    Convert the rectangle size from pixels to units before setting it as
    box-width and box-height on the text object.

 app/tools/gimptexttool.c |   49 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 45 insertions(+), 4 deletions(-)
Comment 12 Michael Natterer 2010-02-21 13:34:41 UTC
And in master:

commit 41a277f040f1b6b00b500bdd9d8fdff86a98267a
Author: Michael Natterer <mitch@gimp.org>
Date:   Sun Feb 21 14:33:33 2010 +0100

    Bug 565001 - Text-Tool crashes when edit a 2.4.2 version xcf
    
    Convert the rectangle size from pixels to units before setting it as
    box-width and box-height on the text object.

 app/tools/gimptexttool.c |   50 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 46 insertions(+), 4 deletions(-)
Comment 13 Michael Natterer 2010-03-02 14:10:29 UTC
Small glitch in the fix fixed:

commit 18e3c7240bae097b96c50a09876e1e2f5042637b
Author: Michael Natterer <mitch@gimp.org>
Date:   Tue Mar 2 15:08:37 2010 +0100

    Bug 565001 - Text-Tool crashes when edit a 2.4.2 version xcf
    
    Need to convert to text->box_unit, not text->unit.
Comment 14 Michael Natterer 2010-03-02 14:25:15 UTC
Same fix for the fix in master:

commit 6d4f2c3431e8d3c229ecd3ac5952b287d10983fb
Author: Michael Natterer <mitch@gimp.org>
Date:   Tue Mar 2 15:24:17 2010 +0100

    Bug 565001 - Text-Tool crashes when edit a 2.4.2 version xcf
    
    Need to convert to text->box_unit, not text->unit.

 app/tools/gimptexttool.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
Comment 15 Michael Natterer 2010-03-10 19:06:44 UTC
*** Bug 569171 has been marked as a duplicate of this bug. ***