Bug 116943 - gimp crashes when using the magic wand auto select tool
Summary: gimp crashes when using the magic wand auto select tool
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gimp
Version: 2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-26 17:22 UTC by Don Himelrick
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-05 12:42:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Last 500 lines of strace (34.02 KB, text/plain)
2004-02-26 17:23 UTC, Don Himelrick
no flags Details
Lastt 20 lines of strace that you requested (1.63 KB, text/plain)
2004-02-26 20:55 UTC, Don Himelrick
no flags Details
output from LANG=C grep ' = 3$' <yourfilehere> | LANG=C egrep -v 'read|write' (4.39 KB, text/plain)
2004-02-26 21:46 UTC, Don Himelrick
no flags Details
grep of connect|socket (661 bytes, text/plain)
2004-02-27 15:11 UTC, Don Himelrick
no flags Details
last 1000 lines of strace (103.76 KB, text/plain)
2004-10-04 15:46 UTC, Don Himelrick
no flags Details
grep of strace for socket|connect (1.51 KB, text/plain)
2004-10-04 15:48 UTC, Don Himelrick
no flags Details

Description Don Himelrick 2004-02-26 17:22:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115

Description of problem:
When using the magic wand "Select contiguous regions"  tool to select
a region in the upper right quadrant of my picture, gimp crashes.  It
has done this since RH 8.0, which was what I was running when I first
scanned the picture that demonstrates the problem.

Version-Release number of selected component (if applicable):
gimp-1.2.5-1

How reproducible:
Always

Steps to Reproduce:
1.Select magic wand tool
2.Click in reddish-pink area in upper right of picture
3.
    

Actual Results:  Crash

Expected Results:  Should select a region matching the color I clicked on.

Additional info:

Comment 1 Don Himelrick 2004-02-26 17:23:40 UTC
Created attachment 98078 [details]
Last 500 lines of strace

Here is an strace of gimp when it crashed.

Comment 2 Don Himelrick 2004-02-26 17:25:41 UTC
I can send the picture that allows me reproduce this everytime,
however it is like 13 or 14 Megs.   Let me know if you want me attach
it to this bug.

Comment 3 Nils Philippsen 2004-02-26 18:17:45 UTC
This is very strange because I never experienced this for as long as I
can remember and I regularly work on really large files (up to
~100MB). In fact just yesterday I used the magic wand tool on an ~18MB
full resolution scan of one of my slides, it worked as expected.

Please attach a bzipped _complete_ strace as I cannot see what the
file descriptor the gimp fails on with -EPIPE is connected to.

Comment 4 Nils Philippsen 2004-02-26 18:19:40 UTC
Forgot: run it like this:

strace -Ff -s 80 -o gimp-strace.out gimp <...>

This might get mighty big, so please tell me if the bzipped strace
file exceeds 2MB, then I have to think about something else.

Comment 5 Nils Philippsen 2004-02-26 18:39:18 UTC
I just tried this on the largest image available to me (5313 x 3542
pixels, 197MB size in mem) and it worked as expected.

Comment 6 Don Himelrick 2004-02-26 20:03:51 UTC
Wow, the uncompressed file was 300MB.  After 30 minutes of bzipping,
it came out at 2.2MB.  Do you want me to attach it?

Comment 7 Nils Philippsen 2004-02-26 20:42:27 UTC
Amazing, but no -- bugzilla will refuse it, it's too large... ;-). 

We'll have to do it differently. Please give only the last 20 lines or
so, I'll tell you what to do then.

Comment 8 Nils Philippsen 2004-02-26 20:44:54 UTC
BTW, just curious -- what did you do? I straced selecting my file
exactly with the same strace command and it was only like 14.5MB
uncompressed. I did:

- start the gimp
- load the file via File/Open Recent
- choose the magic wand tool
- click in the image to select something
- end the gimp

Comment 9 Don Himelrick 2004-02-26 20:55:02 UTC
Created attachment 98086 [details]
Lastt 20 lines of strace that you requested

Here's the strace.  Yup, thats how I created the trace, only after I select
something with the wand, I get the hourgall cursor for a while then poof.  Gimp
dies.

Comment 10 Nils Philippsen 2004-02-26 21:15:20 UTC
Please run this on your strace file and give me the output:

LANG=C egrep -20 '^[0-9]+ socket.* = 3$' <yourfilehere>

Comment 11 Nils Philippsen 2004-02-26 21:16:33 UTC
ahh and maybe (I'm in for double comments today, eh?) this as well:

LANG=C grep ' = 3$' <yourfilehere> | egrep -v 'read|write'

Comment 12 Nils Philippsen 2004-02-26 21:19:42 UTC
Just noticed this is FC1 -- been a bit obsessed with gimp-2.0pre for
the upcoming FC2 lately...

I could reproduce this in gimp-1.2.5 also, finally I'm getting somewhere.

Comment 13 Nils Philippsen 2004-02-26 21:31:01 UTC
You didn't run strace with '-Ff', did you? I'm missing the PIDs at the
beginning of the lines. Anyway, doesn't hurt, just do the greps like this:

LANG=C egrep '^(socket|connect)' <yourfilehere>

LANG=C grep ' = 3$' <yourfilehere> | LANG=C egrep -v 'read|write'

Comment 14 Don Himelrick 2004-02-26 21:46:37 UTC
Created attachment 98090 [details]
output from   LANG=C grep ' = 3$' <yourfilehere> | LANG=C egrep -v 'read|write'

This is the only grep I got any output from.   I did an

strace -Ff -s 80 -o gimp-strace.out gimp

to get the 300 + meg trace.

Comment 15 Nils Philippsen 2004-02-27 07:12:38 UTC
Ahh, now your file has PIDs in it -- just run 

LANG=C egrep 'socket|connect' <yourfilehere>

then.

Comment 16 Don Himelrick 2004-02-27 15:11:00 UTC
Created attachment 98102 [details]
grep of connect|socket

Here is the output of the grep you asked for.

Comment 17 Nils Philippsen 2004-02-27 15:21:40 UTC
OK it seems that channel 3 -- which is the connection to the X server
-- gets a -EPIPE upon a write. I'm not quite sure whether the real
problem is on the X server side (which shouldn't just close the
channel) or on the toolkit/app side (which maybe shouldn't send so
much data at once or should reconnect on the -EPIPE).

Mike can you please comment on this?

Comment 20 Nils Philippsen 2004-10-04 14:05:25 UTC
Don, can you reproduce this on an up2date FC2 or FC3?

Comment 21 Don Himelrick 2004-10-04 14:58:53 UTC
Yes, I just tried on FC2 and although it takes more time to get gimp
to crash, it does still crash.  The first time or two that I use the
magic wand, all works as expected.  However it does crash after the
first couple of applicatins of the magic wand.  On gimp 1.?, it never
even finished the first magic wand selection, so I'm not entirely sure
that it is exactly the same bug.  Should I do an strace like in
comment 14 and 15 above?


Comment 22 Nils Philippsen 2004-10-04 15:16:21 UTC
Yes, do it like described, but attach only the last ~100k or so
(should suffice) of the "unfiltered" strace output and the (complete
if not too big) output of the grepped stace. Thanks.

Which versions of gimp and xorg-x11 do you use?

Comment 23 Don Himelrick 2004-10-04 15:38:30 UTC
[dchimelr@himelrick dchimelr]$ strace -Ff -s 80 -o gimp-strace.out gimp

(script-fu:17647): LibGimpBase-WARNING **: script-fu: wire_read(): error
[dchimelr@himelrick dchimelr]$ 


I got this when I ran gimp.  I'll attach the strace output next.

Comment 24 Don Himelrick 2004-10-04 15:45:46 UTC
Here are the versions....

gimp-2.0.4-0.fc2.1
xorg-x11-6.7.0-9

Comment 25 Don Himelrick 2004-10-04 15:46:57 UTC
Created attachment 104724 [details]
last 1000 lines of strace

Comment 26 Don Himelrick 2004-10-04 15:48:08 UTC
Created attachment 104725 [details]
grep of strace for socket|connect

Comment 27 Nils Philippsen 2004-10-04 16:10:42 UTC
Can you please try this with gimp-2.0.5-0.fc2.1, available from
updates-testing --
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/2/
-- as well? Just to verify whether this problem is there in the latest
pending update. Thanks.

Comment 28 Don Himelrick 2004-10-04 16:28:31 UTC
Well, after 5 minutes of magic-wanding, it did not crash.   The magic
wand seems to work a little better and faster now as well.  So after a
quick test, it seems to be fixed in the pending update.


Comment 29 Nils Philippsen 2004-10-05 12:42:07 UTC
Good to hear that they seem to have it fixed upstream. I'll close this
bug for now, if you ever encounter it again, don't hesitate to reopen it.


Note You need to log in before you can comment on or make changes to this bug.