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 322182 - gimp crash made with text tool's editor
gimp crash made with text tool's editor
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
2.2.x
Other Windows
: Normal critical
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-11-22 23:13 UTC by dudo
Modified: 2008-01-15 13:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description dudo 2005-11-22 23:13:20 UTC
Steps to reproduce:
OS: Windows 2000, XP; gimp 2.2.9.; gtk+ 2.6.9. I use BlackBox (bblean 1.16)
Window Manager (WM) for Windows, but I was able to reproduce it with the
standard MS's Explorer WM (with minor differencies, but this happend the same: )

1. Have an image with a text layer, all saved (as xcf, psd... whatever The GIMP
is able to save layers with)
2. Then re-open the text layer to change the text content
3. close the image window with "x" (or ALT+F4) - the editor should stay open
4. Reopen the image again and do the point 2) again
5. gimp should crash

If not, I have achieved the crash also by this:
- do points 1) 2) 3) as stated above and close gimp
- do points 1) 2) 3) as stated above and do point 4) except not to repeat the
second point, but just call up the text tool editor at the image.

To notice: I had more crashes with the BlackBox WM than the MS Explorer WM...

Anyway: I think it just needs to be asured that the text tool editor (and
alikes) would close after the image window close, as it DOES when you would be
confronted with the "Save changes" when closing a changed, unsaved image (or
dirty as you say?) - the text tool editor closes and a crash won't occur.


Stack trace:


Other information:
Comment 1 dudo 2005-11-22 23:15:41 UTC
I have all binaries (gimp, gtk) from gimp.org/windows - automated installer.
Comment 2 Sven Neumann 2005-11-24 11:04:08 UTC
There's code to destroy the text tool editor dialog when the image the text tool
is working on is being closed. I cannot reproduce the problem here, the editor
dialog closes with the image.
Comment 3 Michael Schumacher 2005-11-24 12:52:46 UTC
I can't reproduce this either. The text editor window doesn't stay open in step 3.
Comment 4 dudo 2005-11-25 01:35:22 UTC
Hmm. It happens for me every time, independently on two different desktops. The
key situation is, as you wrote... "the image the text tool is working on", must
not have a "changed" flag when it is to be closed AND the text tool must have
the text layer's text in it before the image close.

I rewrote the bug reproduction here again (text follows after this paragraph)
for any case and I will also ask to reproduce this bug a colleague of mine who
is a developer (he uses GIMP occasionaly for image editing). My english is most
possibly not enough accurate, I do apologize....

The trick is, you have to open an existing image file (e.g. xcf) and the image
has e.g. a background layer and a text layer already at this time, so when you
would immediately close the image, it closes without any exit dialog, because
there hasn't been made any further changes at this time current reopening.

And at this state, when you open such a pre-made image file (xcf, psd..) and
double-click on the text layer (text layer listed in "layers" dialog) the text
editor pops up with the layer's text in it to edit - I think this is the key
situation needed - (the image hasn't been marked so far as changed by opening
only an existing text layer in this manner), you will close the image display
window with the text layer's text still in the popped out GIMP text editor. And
this editor should stay popped out after the close of the image window.

Now If you would do the point 4) and 5) as stated above (or the other "also
crash" techniques - do not reproduce points 1) 2) 3), only the action after them
), the GIMP will crash.

===
Sorry for the mess :) . I will post the outcome (as my colleague will try this
too) tonight.
Comment 5 Michael Schumacher 2005-11-25 13:30:38 UTC
"double-click on the text layer (text layer listed in "layers" dialog)" is the
key to this - I can reproduce it when opening the text layer from the layers
dialog, but not when opening it from the image window.

Happens in 2.3.5 was well.
Comment 6 dudo 2005-11-26 00:53:20 UTC
yes, that are the right words! I have tested it this way too now. For my case, I
almost always (or always) reopen the text layer from the "layers" dialog,
because I usually have more than one text layer or - simply said - more of any
kind of layers and in this scheme it is not effective to select a text layer to
work with and then double-click with the text tool on it in the image window to
edit it; so I am used to to reopen a text layer from the "layers" dialog to edit
it, in any case.

My colleague had a free day as I have learned today ... but I was sure we would
have it sooner or later.
Comment 7 Michael Natterer 2006-05-13 22:55:57 UTC
Fixed in CVS:

2006-05-14  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_set_layer): find a
	suitable display and fully set up the tool (just as the vector
	tool does). Fixes bug #322182.

	(gimp_text_tool_button_press): chain up to activate the tool.

	(gimp_text_tool_set_drawable): removed redundant check.