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 150194 - GIMP crashes when plug-in is closed after the image it was started from
GIMP crashes when plug-in is closed after the image it was started from
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other All
: Normal critical
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-08-15 16:41 UTC by Raphaël Quinet
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Raphaël Quinet 2004-08-15 16:41:14 UTC
This seems to be a new crash, apparently related to the new progress bar API in
GIMP 2.x.  If you start a plug-in on some image, then close the image while the
plug-in dialog is still open, then the GIMP will crash as soon as the plug-in
exits.

Try this for example with the gaussian blur plug-in and pretend that you close
the image by accident and then cancel the plug-in.  This results in an immediate
crash:

gimp: fatal error: Segmentation fault
gimp (pid:26133): [E]xit, [H]alt, show [S]tack trace or [P]roceed: s
  • #0 g_on_error_stack_trace
    from /prefix/lib/libglib-2.0.so.0
  • #1 g_on_error_query
    from /prefix/lib/libglib-2.0.so.0
  • #2 gimp_eek
  • #3 gimp_fatal_error
  • #4 gimp_sigfatal_handler
  • #5 <signal handler called>
  • #6 gimp_display_progress_is_active
  • #7 gimp_progress_is_active
  • #8 plug_in_progress_end
  • #9 plug_in_close
  • #10 plug_in_recv_message
  • #11 g_io_unix_dispatch
    from /prefix/lib/libglib-2.0.so.0
  • #12 g_main_dispatch
    from /prefix/lib/libglib-2.0.so.0
  • #13 g_main_context_dispatch
    from /prefix/lib/libglib-2.0.so.0
  • #14 g_main_context_iterate
    from /prefix/lib/libglib-2.0.so.0
  • #15 g_main_loop_run
    from /prefix/lib/libglib-2.0.so.0
  • #16 app_run
  • #17 main
  • #18 __libc_start_main
    from /lib/libc.so.6

Comment 1 Sven Neumann 2004-08-17 08:21:57 UTC
Let's hope I got this right and didn't introduce more subtle bugs...

2004-08-17  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-in.c: don't keep a strong reference to the
	GimpProgress object, instead use a weak reference and deal with
	the progress being destroyed while the plug-in is running.
	Fixes bug #150194.
Comment 2 Raphaël Quinet 2004-08-17 19:41:11 UTC
I tested it with various combinations of plug-ins; including some tests of
slow progress bars during which I closed the image.  Everything seemed to work
fine.  Thanks!
Comment 3 Michael Natterer 2004-08-30 15:00:49 UTC
Reopening :(  Will check in a different fix later...

2004-08-30  Michael Natterer  <mitch@gimp.org>

	Brought the PDB progress into a working state. Fixes bug #6010,
	addressed bugs #97266 and #135185 and unfortunately reopens bug
	#150194 (will fix that later).

	* libgimpbase/gimpbaseenums.h: added enum GimpProgressCommand.

	* app/core/gimppdbprogress.c
	* libgimp/gimpprogress.c: use the enum instead of integer
	constants for the different progress commands. Cleanup.

	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-in.c: switch bach to real refcouting for
	plug_in->progress (reopens bug #150194) and enabled the PDB
	progress code.

	* plug-ins/script-fu/script-fu-scripts.c: cleaned up the
	progress stuff and the script-fu interface a bit.

	* plug-ins/pygimp/gimpenums.py
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: regenerated.
Comment 4 Michael Natterer 2004-09-01 15:27:59 UTC
Fixed in CVS:

2004-09-01  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplay.c
	* app/widgets/gimpprogressdialog.c: gracefully handle progress
	calls after the widget is destroyed. Re-fixes bug #150194.