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 322978 - Segfault when closing image while saving it
Segfault when closing image while saving it
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.2.x
Other Linux
: High major
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-12-02 00:39 UTC by Ari Pollak
Modified: 2008-01-15 13:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ari Pollak 2005-12-02 00:39:59 UTC
From http://bugs.debian.org/339115 (I personally can't reproduce this, but other
people on #gimp like akk have been able to):

opening an image (postscript in this case), choosing to save it as a TIFF image,
and closing the image I'm saving while the TIFF image options dialog is
up (and then clicking save) causes a crash.  Here's the backtrace:

[moise@mole music/mix/tex]$ LD_LIBRARY_PATH=/usr/lib/debug gdb gimp
GNU gdb 6.3.90_20051119-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library
"/lib/tls/libthread_db.so.1".

(gdb) run cd.ps
Starting program: /usr/bin/gimp cd.ps
[Thread debugging using libthread_db enabled]
[New Thread -1217997120 (LWP 23036)]

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 23036)

  • #0 IA__g_type_check_instance_cast
    at gtype.c line 3161
  • #1 gimp_dialog_set_sensitive
    at gimpwidgets-utils.c line 729
  • #2 gimp_file_dialog_set_sensitive
    at gimpfiledialog.c line 374
  • #3 file_save_dialog_response
    at file-save-dialog.c line 154
  • #4 IA__g_cclosure_marshal_VOID__INT
    at gmarshal.c line 216
  • #5 IA__g_closure_invoke
    at gclosure.c line 492
  • #6 signal_emit_unlocked_R
    at gsignal.c line 2485
  • #7 IA__g_signal_emit_valist
    at gsignal.c line 2244
  • #8 IA__g_signal_emit
    at gsignal.c line 2288
  • #9 IA__gtk_dialog_response
    at gtkdialog.c line 860
  • #10 action_widget_activated
    at gtkdialog.c line 559
  • #11 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #12 IA__g_closure_invoke
    at gclosure.c line 492
  • #13 signal_emit_unlocked_R
    at gsignal.c line 2485
  • #14 IA__g_signal_emit_valist
    at gsignal.c line 2244
  • #15 IA__g_signal_emit
    at gsignal.c line 2288
  • #16 IA__gtk_button_clicked
    at gtkbutton.c line 786
  • #17 gtk_real_button_released
    at gtkbutton.c line 1298
  • #18 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #19 g_type_class_meta_marshal
    at gclosure.c line 569
  • #20 IA__g_closure_invoke
    at gclosure.c line 492
  • #21 signal_emit_unlocked_R
    at gsignal.c line 2415
  • #22 IA__g_signal_emit_valist
    at gsignal.c line 2244
  • #23 IA__g_signal_emit
    at gsignal.c line 2288
  • #24 IA__gtk_button_released
    at gtkbutton.c line 778
  • #25 gtk_button_button_release
    at gtkbutton.c line 1214
  • #26 _gtk_marshal_BOOLEAN__BOXED
  • #27 g_type_class_meta_marshal
    at gclosure.c line 569
  • #28 IA__g_closure_invoke
    at gclosure.c line 492
  • #29 signal_emit_unlocked_R
    at gsignal.c line 2523
  • #30 IA__g_signal_emit_valist
    at gsignal.c line 2254
  • #31 IA__g_signal_emit
    at gsignal.c line 2288
  • #32 gtk_widget_event_internal
    at gtkwidget.c line 3631
  • #33 IA__gtk_propagate_event
    at gtkmain.c line 2191
  • #34 IA__gtk_main_do_event
    at gtkmain.c line 1429
  • #35 gdk_event_dispatch
    at gdkevents-x11.c line 2259
  • #36 IA__g_main_context_dispatch
    at gmain.c line 1934
  • #37 g_main_context_iterate
    at gmain.c line 2565
  • #38 IA__g_main_loop_run
    at gmain.c line 2769
  • #39 app_run
    at app_procs.c line 376
  • #40 main
    at main.c line 473

Comment 1 weskaggs 2006-05-18 20:06:03 UTC
The problem is that if you close the image while the file save plug-in is running, it causes the dialog to be destroyed, which causes the line 

    gimp_file_dialog_set_sensitive (dialog, TRUE);

at the end of the function file_save_dialog_response() to blow up.
Fixed by adding a callback

  g_signal_connect (dialog, "destroy",
                    G_CALLBACK (gtk_widget_destroyed),
                    &dialog);

and then checking whether "dialog" is NULL.  I will wait for
approval before backporting.

For HEAD:
2006-05-18  Bill Skaggs  <weskaggs@primate.ucdavis.edu>

	* app/dialogs/file-save-dialog.c: make sure dialog has
	not been destroyed when setting sensitive; fixes 
	bug #322978.
Comment 2 weskaggs 2006-05-19 20:48:47 UTC
Now applied to the 2.2 branch as well.  Resolving as FIXED.