GNOME Bugzilla – Bug 565001
Text-Tool crashes when edit a 2.4.2 version xcf
Last modified: 2010-03-10 19:06:44 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
Created attachment 124930 [details] 2.6.3 text tool crashes when editing this xcf created with 2.4.2
I can't reproduce this, looks like we need more detailed step-by-step instructions.
(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.
Thanks, I can reproduce this now on Linux as well.
Seems to work fine with GIMP from SVN trunk though.
I don't seem to be able to reproduce this with GIMP 2.6.
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.
I can reproduce this with Linux (Ubuntu 8.10) and GIMP from SVN trunk.
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.
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.
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(-)
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(-)
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.
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(-)
*** Bug 569171 has been marked as a duplicate of this bug. ***