GNOME Bugzilla – Bug 322182
gimp crash made with text tool's editor
Last modified: 2008-01-15 13:02:35 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:
I have all binaries (gimp, gtk) from gimp.org/windows - automated installer.
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.
I can't reproduce this either. The text editor window doesn't stay open in step 3.
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.
"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.
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.
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.