Bug 274671

Summary: Gimp crash when draw a line with Brush
Product: [Fedora] Fedora Reporter: Francesco <guidolinprimo>
Component: libX11Assignee: Søren Sandmann Pedersen <sandmann>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: kem, madko, nphilipp, zaitcev
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-03 04:49:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Crash stack trace of gimp --sync none

Description Francesco 2007-09-02 19:53:20 UTC
Description of problem:
I start Gimp and create a new image, then select Brush and click on the image
area to draw a line, and then gimp exit.

Version-Release number of selected component (if applicable):
gimp-2.4.0-0.rc1.1.fc8

How reproducible:
Every time

Steps to Reproduce:
1. Start Gimp
2. Create new image
3. Select Brush and draw a line. Crash.
  
Additional info:
This is the output from the console:

[francesco@localhost ~]$ gimp --sync
Gtk-Message: Failed to load module "gnomebreakpad": libgnomebreakpad.so: cannot
open shared object file: No such file or directory

(gimp:3197): Gtk-WARNING **: Debug: missing action debug-menu

Gdk-ERROR **: The program 'gimp' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 30179 error_code 3 request_code 39 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
aborting...
gimp: terminated: Abortito

(script-fu:3198): LibGimpBase-WARNING **: script-fu: gimp_wire_read(): error

Comment 1 Pete Zaitcev 2007-09-03 18:18:39 UTC
Bug-buddy doesn't fire for some reason. Usually it means that the program
intercepts SIGABRT and SIGSEGV, can this be cancelled in gimp?

I can catch the abort() with gdb, but it always happens under a grab,
and so gdb must run from text console. I do not know how to save
a trace in such a case.

Comment 2 Francesco 2007-09-04 18:14:38 UTC
(In reply to comment #1)
> Bug-buddy doesn't fire for some reason. Usually it means that the program
> intercepts SIGABRT and SIGSEGV, can this be cancelled in gimp?

In file gimp-2.4.0-rc1/app/main.c, line 636, there is this function:

static void gimp_init_signal_handlers (void)
{
  /* Handle fatal signals */
  /* these are handled by gimp_terminate() */
  gimp_signal_private (SIGHUP,  gimp_sigfatal_handler, 0);
  gimp_signal_private (SIGINT,  gimp_sigfatal_handler, 0);
  gimp_signal_private (SIGQUIT, gimp_sigfatal_handler, 0);
  gimp_signal_private (SIGABRT, gimp_sigfatal_handler, 0);
  gimp_signal_private (SIGTERM, gimp_sigfatal_handler, 0);

  if (stack_trace_mode != GIMP_STACK_TRACE_NEVER)
    {
      /* these are handled by gimp_fatal_error() */
      gimp_signal_private (SIGBUS,  gimp_sigfatal_handler, 0);
      gimp_signal_private (SIGSEGV, gimp_sigfatal_handler, 0);
      gimp_signal_private (SIGFPE,  gimp_sigfatal_handler, 0);
    }
  gimp_signal_private (SIGPIPE, SIG_IGN, 0);
  gimp_signal_private (SIGCHLD, SIG_DFL, SA_RESTART);
}

I changed this line:
gimp_signal_private (SIGABRT, gimp_sigfatal_handler, 0);

to:
gimp_signal_private (SIGABRT, SIG_DFL, 0);

in order to ignore SIGABRT, but bug buddy doesn't fire anyway.

Comment 3 Nils Philippsen 2007-09-05 07:15:32 UTC
All, please try gimp-2.4.0-0.rc2.1.fc8, it shouldn't have that problem anymore.

About the SEGV handling, you might want to try this option on the cmdline:

  --stack-trace-mode=<mode>      Debug in case of a crash (never|query|always)


Comment 4 Pete Zaitcev 2007-09-07 22:48:36 UTC
I regret to inform, gimp-2.4.0-0.rc2.1.fc8 does not fix the crash.

However, I captured a backtrace of gimp --sync, using gdb|tee.


Comment 5 Pete Zaitcev 2007-09-07 22:50:19 UTC
Created attachment 190571 [details]
Crash stack trace of gimp --sync

Comment 6 Nils Philippsen 2007-09-08 09:01:30 UTC
Hm, just verified this here on x86_64. Errors in gimp_int_combobox_set_active()
shouldn't realistically SIGABRT -- this functions just finds an entry in the
GtkComboBox this widget is derived from and runs _set_active() there. I'd say
it's likely a bug in gtk/gdk or even X. Changing the component to gtk2.

Comment 7 Nils Philippsen 2007-09-15 10:01:58 UTC
I just tried it out with gtk2-2.12.0-1.fc8, to no avail.

Comment 9 Adam Jackson 2007-09-17 14:34:41 UTC
Built that patch into rawhide as libX11-1.1.2-3.fc8.  Can someone test that and
verify that it's the right fix?

Comment 10 Edouard Bourguignon 2007-09-17 17:31:43 UTC
great that works for me (tested on i386)
thanks

Comment 11 Francesco 2007-09-19 13:30:34 UTC
Ok, I upgrade to libX11-1.1.2-3.fc8 and now Gimp works!
(Tested on AthlonXP)