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 793428 - Errors when loading an XCF with a saved selection mask
Errors when loading an XCF with a saved selection mask
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other Linux
: Normal blocker
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2018-02-13 14:43 UTC by Jehan
Modified: 2018-02-13 18:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jehan 2018-02-13 14:43:00 UTC
So we've got a regression since the following commit:

commit d0ae244fe85a502446fe9c7b82afdf1b89498966
Author: Ell <ell_se@yahoo.com>
Date:   Sat Feb 10 05:26:26 2018 -0500

    app: invalidate channel boundary upon buffer "changed" signal
    
    Have GimpChannel connect to the drawable buffer's "changed" signal,
    so that we can invalidate the channel's boundary whenever the
    buffer contents change.  Currently, the calls to
    gimp_drawable_invalidate_boundary() dispersed throughout the code
    are not enough.
    
    Moreover, invalidate both the boundary and the bounds in
    gimp_channel_invalidate_boundary(), since both are necessary when
    the buffer changes.

We have a XCF which outputs many CRITICALs about a drawable not being a drawable upon loading.
Then later trying to work on anything selection-related outputs more CRITICALs. And in some point we even got a crash.

Backtrace on loading:

GNU Image Manipulation Program version 2.9.9
git-describe: GIMP_2_9_8-248-g80bb12492a
C compiler:
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
    OFFLOAD_TARGET_NAMES=nvptx-none
    OFFLOAD_TARGET_DEFAULT=1
    Target: x86_64-redhat-linux
    Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
    Thread model: posix
    gcc version 7.3.1 20180130 (Red Hat 7.3.1-2) (GCC)
   
using GEGL version 0.3.29 (compiled against version 0.3.29)
using GLib version 2.54.3 (compiled against version 2.54.3)
using GdkPixbuf version 2.36.11 (compiled against version 2.36.11)
using GTK+ version 2.24.32 (compiled against version 2.24.32)
using Pango version 1.40.13 (compiled against version 1.40.13)
using Fontconfig version 2.12.6 (compiled against version 2.12.6)
using Cairo version 1.15.10 (compiled against version 1.15.10)

> GIMP-Error: gimp_drawable_invalidate_boundary: assertion 'GIMP_IS_DRAWABLE (drawable)' failed

Stack trace:
[New LWP 10553]
[New LWP 10554]
[New LWP 10795]
[New LWP 17805]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f82a0dc33a7 in waitpid () from /lib64/libpthread.so.0
  • #0 waitpid
  • #1 gimp_print_stack_trace
    at gimputils.c line 1169
  • #2 gui_message
  • #3 gimp_show_message
  • #4 gimp_message_log_func
  • #5 g_logv
  • #6 g_log
  • #7 g_closure_invoke
  • #8 signal_emit_unlocked_R
  • #9 g_signal_emit_valist
  • #10 g_signal_emit
  • #11 gegl_buffer_emit_changed_signal
    at gegl-buffer.c line 1202
  • #12 _gegl_buffer_set_with_flags
    at gegl-buffer-access.c line 824
  • #13 gegl_buffer_set
    at gegl-buffer-access.c line 1843
  • #14 xcf_load_tile_rle
    at xcf-load.c line 2222
  • #15 xcf_load_level
    at xcf-load.c line 2002
  • #16 xcf_load_buffer
    at xcf-load.c line 1887
  • #17 xcf_load_channel
    at xcf-load.c line 1774
  • #18 xcf_load_image
    at xcf-load.c line 501
  • #19 xcf_load_stream
    at xcf.c line 315
  • #20 xcf_load_invoker
    at xcf.c line 432
  • #21 gimp_plug_in_procedure_execute
    at gimppluginprocedure.c line 411
  • #22 gimp_procedure_execute
    at gimpprocedure.c line 421
  • #23 gimp_pdb_execute_procedure_by_name_args
    at gimppdb.c line 322
  • #24 gimp_pdb_execute_procedure_by_name
    at gimppdb.c line 451
  • #25 file_open_image
    at file-open.c line 210
  • #26 file_open_with_proc_and_display
    at file-open.c line 516
  • #27 file_open_dialog_open_image
    at file-open-dialog.c line 200
  • #28 file_open_dialog_response
    at file-open-dialog.c line 157
  • #29 g_closure_invoke
  • #30 signal_emit_unlocked_R
  • #31 g_signal_emit_valist
  • #32 g_signal_emit
  • #33 g_closure_invoke
  • #34 signal_emit_unlocked_R
  • #35 g_signal_emit_valist
  • #36 g_signal_emit
  • #37 button_activate_timeout
  • #38 gdk_threads_dispatch
  • #39 g_timeout_dispatch
  • #40 g_main_context_dispatch
  • #41 g_main_context_iterate.isra
  • #42 g_main_loop_run
  • #43 app_run
    at app.c line 353
  • #44 main
    at main.c line 517
  • #0 waitpid
  • #1 gimp_print_stack_trace
    at gimputils.c line 1169
  • #2 gui_message
  • #3 gimp_show_message
  • #4 gimp_message_log_func
  • #5 g_logv
  • #6 g_log
  • #7 g_closure_invoke
  • #8 signal_emit_unlocked_R
  • #9 g_signal_emit_valist
  • #10 g_signal_emit
  • #11 gegl_buffer_emit_changed_signal
    at gegl-buffer.c line 1202
  • #12 _gegl_buffer_set_with_flags
    at gegl-buffer-access.c line 824
  • #13 gegl_buffer_set
    at gegl-buffer-access.c line 1843
  • #14 xcf_load_tile_rle
    at xcf-load.c line 2222
  • #15 xcf_load_level
    at xcf-load.c line 2002
  • #16 xcf_load_buffer
    at xcf-load.c line 1887
  • #17 xcf_load_channel
    at xcf-load.c line 1774
  • #18 xcf_load_image
    at xcf-load.c line 501
  • #19 xcf_load_stream
    at xcf.c line 315
  • #20 xcf_load_invoker
    at xcf.c line 432
  • #21 gimp_plug_in_procedure_execute
    at gimppluginprocedure.c line 411
  • #22 gimp_procedure_execute
    at gimpprocedure.c line 421
  • #23 gimp_pdb_execute_procedure_by_name_args
    at gimppdb.c line 322
  • #24 gimp_pdb_execute_procedure_by_name
    at gimppdb.c line 451
  • #25 file_open_image
    at file-open.c line 210
  • #26 file_open_with_proc_and_display
    at file-open.c line 516
  • #27 file_open_dialog_open_image
    at file-open-dialog.c line 200
  • #28 file_open_dialog_response
    at file-open-dialog.c line 157
  • #29 g_closure_invoke
  • #30 signal_emit_unlocked_R
  • #31 g_signal_emit_valist
  • #32 g_signal_emit
  • #33 g_closure_invoke
  • #34 signal_emit_unlocked_R
  • #35 g_signal_emit_valist
  • #36 g_signal_emit
  • #37 button_activate_timeout
  • #38 gdk_threads_dispatch
  • #39 g_timeout_dispatch
  • #40 g_main_context_dispatch
  • #41 g_main_context_iterate.isra
  • #42 g_main_loop_run
  • #43 app_run
    at app.c line 353
  • #44 main
    at main.c line 517
  • #0 waitpid
  • #1 gimp_print_stack_trace
    at gimputils.c line 1169
  • #2 gui_message
  • #3 gimp_show_message
  • #4 gimp_message_log_func
  • #5 g_logv
  • #6 g_log
  • #7 g_closure_invoke
  • #8 signal_emit_unlocked_R
  • #9 g_signal_emit_valist
  • #10 g_signal_emit
  • #11 gegl_buffer_emit_changed_signal
    at gegl-buffer.c line 1202
  • #12 _gegl_buffer_set_with_flags
    at gegl-buffer-access.c line 824
  • #13 gegl_buffer_set
    at gegl-buffer-access.c line 1843
  • #14 xcf_load_tile_rle
    at xcf-load.c line 2222
  • #15 xcf_load_level
    at xcf-load.c line 2002
  • #16 xcf_load_buffer
    at xcf-load.c line 1887
  • #17 xcf_load_channel
    at xcf-load.c line 1774
  • #18 xcf_load_image
    at xcf-load.c line 501
  • #19 xcf_load_stream
    at xcf.c line 315
  • #20 xcf_load_invoker
    at xcf.c line 432
  • #21 gimp_plug_in_procedure_execute
    at gimppluginprocedure.c line 411
  • #22 gimp_procedure_execute
    at gimpprocedure.c line 421
  • #23 gimp_pdb_execute_procedure_by_name_args
    at gimppdb.c line 322
  • #24 gimp_pdb_execute_procedure_by_name
    at gimppdb.c line 451
  • #25 file_open_image
    at file-open.c line 210
  • #26 file_open_with_proc_and_display
    at file-open.c line 516
  • #27 file_open_dialog_open_image
    at file-open-dialog.c line 200
  • #28 file_open_dialog_response
    at file-open-dialog.c line 157
  • #29 g_closure_invoke
  • #30 signal_emit_unlocked_R
  • #31 g_signal_emit_valist
  • #32 g_signal_emit
  • #33 g_closure_invoke
  • #34 signal_emit_unlocked_R
  • #35 g_signal_emit_valist
  • #36 g_signal_emit
  • #37 button_activate_timeout
  • #38 gdk_threads_dispatch
  • #39 g_timeout_dispatch
  • #40 g_main_context_dispatch
  • #41 g_main_context_iterate.isra
  • #42 g_main_loop_run
  • #43 app_run
    at app.c line 353
  • #44 main
    at main.c line 517

> GIMP-Error: gimp_drawable_invalidate_boundary: assertion 'GIMP_IS_DRAWABLE (drawable)' failed

> GIMP-Error: gimp_drawable_invalidate_boundary: assertion 'GIMP_IS_DRAWABLE (drawable)' failed

> GIMP-Error: gimp_drawable_invalidate_boundary: assertion 'GIMP_IS_DRAWABLE (drawable)' failed

> GIMP-Error: gimp_drawable_invalidate_boundary: assertion 'GIMP_IS_DRAWABLE (drawable)' failed

> GIMP-Error: gimp_drawable_invalidate_boundary: assertion 'GIMP_IS_DRAWABLE (drawable)' failed

> GIMP-Error: gimp_drawable_invalidate_boundary: assertion 'GIMP_IS_DRAWABLE (drawable)' failed

> GIMP-Error: gimp_drawable_invalidate_boundary: assertion 'GIMP_IS_DRAWABLE (drawable)' failed
Comment 1 Jehan 2018-02-13 14:44:26 UTC
Example of a stacktrace happening on a random selection action:

GNU Image Manipulation Program version 2.9.9
git-describe: GIMP_2_9_8-248-g80bb12492a
C compiler:
	Using built-in specs.
	COLLECT_GCC=gcc
	COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
	OFFLOAD_TARGET_NAMES=nvptx-none
	OFFLOAD_TARGET_DEFAULT=1
	Target: x86_64-redhat-linux
	Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
	Thread model: posix
	gcc version 7.3.1 20180130 (Red Hat 7.3.1-2) (GCC) 
	
using GEGL version 0.3.29 (compiled against version 0.3.29)
using GLib version 2.54.3 (compiled against version 2.54.3)
using GdkPixbuf version 2.36.11 (compiled against version 2.36.11)
using GTK+ version 2.24.32 (compiled against version 2.24.32)
using Pango version 1.40.13 (compiled against version 1.40.13)
using Fontconfig version 2.12.6 (compiled against version 2.12.6)
using Cairo version 1.15.10 (compiled against version 1.15.10)

> GIMP-Error: gimp_drawable_invalidate_boundary: assertion 'GIMP_IS_DRAWABLE (drawable)' failed

Stack trace:
[New LWP 10553]
[New LWP 10554]
[New LWP 10795]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f82a0dc33a7 in waitpid () from /lib64/libpthread.so.0
  • #0 waitpid
  • #1 gimp_print_stack_trace
    at gimputils.c line 1169
  • #2 gui_message
  • #3 gimp_show_message
  • #4 gimp_message_log_func
  • #5 g_logv
  • #6 g_log
  • #7 g_closure_invoke
  • #8 signal_emit_unlocked_R
  • #9 g_signal_emit_valist
  • #10 g_signal_emit
  • #11 gegl_buffer_emit_changed_signal
    at gegl-buffer.c line 1202
  • #12 _gegl_buffer_iterator_stop
    at gegl-buffer-iterator.c line 557
  • #13 gegl_buffer_iterator_next
    at gegl-buffer-iterator.c line 697
  • #14 gegl_buffer_clear2
    at gegl-buffer-access.c line 2440
  • #15 gegl_buffer_clear
    at gegl-buffer-access.c line 2544
  • #16 gimp_channel_real_clear
    at gimpchannel.c line 1239
  • #17 select_none_cmd_callback
    at select-commands.c line 92
  • #18 g_closure_invoke
  • #19 signal_emit_unlocked_R
  • #20 g_signal_emit_valist
  • #21 g_signal_emit
  • #22 _gtk_action_emit_activate
  • #23 closure_accel_activate
  • #24 g_closure_invoke
  • #25 signal_emit_unlocked_R
  • #26 g_signal_emit_valist
  • #27 g_signal_emit
  • #28 gtk_accel_group_activate
  • #29 gtk_accel_groups_activate
  • #30 gtk_window_activate_key
  • #31 gimp_window_key_press_event
    at gimpwindow.c line 229
  • #32 _gtk_marshal_BOOLEAN__BOXED
  • #33 g_closure_invoke
  • #34 signal_emit_unlocked_R
  • #35 g_signal_emit_valist
  • #36 g_signal_emit
  • #37 gtk_widget_event_internal
  • #38 gtk_propagate_event
  • #39 gtk_main_do_event
  • #40 gdk_event_dispatch
  • #41 g_main_context_dispatch
  • #42 g_main_context_iterate.isra
  • #43 g_main_loop_run
  • #44 app_run
    at app.c line 353
  • #45 main
    at main.c line 517

Comment 2 Jehan 2018-02-13 14:45:08 UTC
Then stacktrace on a segfault on another selection action:

GNU Image Manipulation Program version 2.9.9
git-describe: GIMP_2_9_8-248-g80bb12492a
C compiler:
	Using built-in specs.
	COLLECT_GCC=gcc
	COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
	OFFLOAD_TARGET_NAMES=nvptx-none
	OFFLOAD_TARGET_DEFAULT=1
	Target: x86_64-redhat-linux
	Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
	Thread model: posix
	gcc version 7.3.1 20180130 (Red Hat 7.3.1-2) (GCC) 
	
using GEGL version 0.3.29 (compiled against version 0.3.29)
using GLib version 2.54.3 (compiled against version 2.54.3)
using GdkPixbuf version 2.36.11 (compiled against version 2.36.11)
using GTK+ version 2.24.32 (compiled against version 2.24.32)
using Pango version 1.40.13 (compiled against version 1.40.13)
using Fontconfig version 2.12.6 (compiled against version 2.12.6)
using Cairo version 1.15.10 (compiled against version 1.15.10)

> fatal error: Segmentation fault

Stack trace:
[New LWP 10553]
[New LWP 10554]
[New LWP 10795]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f82a0dc33a7 in waitpid () from /lib64/libpthread.so.0
  • #0 waitpid
  • #1 gimp_print_stack_trace
    at gimputils.c line 1169
  • #2 gimp_eek
    at errors.c line 298
  • #3 gimp_fatal_error
    at errors.c line 155
  • #4 gimp_sigfatal_handler
    at signals.c line 168
  • #5 <signal handler called>
  • #6 g_type_check_instance_cast
  • #7 gimp_channel_buffer_changed
    at gimpchannel.c line 1526
  • #8 g_closure_invoke
  • #9 signal_emit_unlocked_R
  • #10 g_signal_emit_valist
  • #11 g_signal_emit
  • #12 gegl_buffer_emit_changed_signal
    at gegl-buffer.c line 1202
  • #13 _gegl_buffer_iterator_stop
    at gegl-buffer-iterator.c line 557
  • #14 gegl_buffer_iterator_next
    at gegl-buffer-iterator.c line 697
  • #15 gegl_buffer_clear2
    at gegl-buffer-access.c line 2440
  • #16 gegl_buffer_clear
    at gegl-buffer-access.c line 2544
  • #17 gimp_channel_real_clear
    at gimpchannel.c line 1246
  • #18 gimp_channel_select_scan_convert
    at gimpchannel-select.c line 241
  • #19 gimp_channel_select_polygon
    at gimpchannel-select.c line 284
  • #20 gimp_free_select_tool_real_select
    at gimpfreeselecttool.c line 493
  • #21 gimp_free_select_tool_commit
    at gimpfreeselecttool.c line 247
  • #22 g_closure_invoke
  • #23 signal_emit_unlocked_R
  • #24 g_signal_emit_valist
  • #25 g_signal_emit
  • #26 gimp_tool_widget_real_key_press
    at gimptoolwidget.c line 286
  • #27 gimp_display_shell_canvas_tool_events_internal
    at gimpdisplayshell-tool-events.c line 1265
  • #28 gimp_display_shell_canvas_tool_events
    at gimpdisplayshell-tool-events.c line 321
  • #29 _gtk_marshal_BOOLEAN__BOXED
  • #30 g_closure_invoke
  • #31 signal_emit_unlocked_R
  • #32 g_signal_emit_valist
  • #33 g_signal_emit
  • #34 gtk_widget_event_internal
  • #35 gtk_window_propagate_key_event
  • #36 gimp_window_key_press_event
    at gimpwindow.c line 189
  • #37 _gtk_marshal_BOOLEAN__BOXED
  • #38 g_closure_invoke
  • #39 signal_emit_unlocked_R
  • #40 g_signal_emit_valist
  • #41 g_signal_emit
  • #42 gtk_widget_event_internal
  • #43 gtk_propagate_event
  • #44 gtk_main_do_event
  • #45 gdk_event_dispatch
  • #46 g_main_context_dispatch
  • #47 g_main_context_iterate.isra
  • #48 g_main_loop_run
  • #49 app_run
    at app.c line 353
  • #50 main
    at main.c line 517

Comment 3 Jehan 2018-02-13 14:46:06 UTC
Obviously a 2.10 blocker.
Comment 4 Ell 2018-02-13 18:31:52 UTC
Argh, good catch!  Fixed in master:

commit 38d4aa81214d41225e43b08b3fd5b06176e9f798
Author: Ell <ell_se@yahoo.com>
Date:   Tue Feb 13 13:16:30 2018 -0500

    Bug 793428 - Errors when loading an XCF with a saved selection mask
    
    Since commit d0ae244fe85a502446fe9c7b82afdf1b89498966, which
    connects GimpChannel instances to their buffer's "changed" signal,
    the XCF loading code that steals a channel's buffer when converting
    it to a selection mask (which happens when loading an XCF with a
    saved selection mask) is unsafe, since fails to perform the
    necessary cleanup and setup of the buffer in the old and new
    channel objects, respectively.
    
    Perform the buffer transfer using the new
    gimp_drawable_steal_buffer(), which does the same thing in a safe
    manner.

 app/xcf/xcf-load.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)