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 793360 - Error when copy-pasting and then trying to do . . . something
Error when copy-pasting and then trying to do . . . something
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other Linux
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2018-02-10 21:58 UTC by Elle Stone
Modified: 2018-02-10 23:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Elle Stone 2018-02-10 21:58:33 UTC
The following lines came from the new automatic bug report popup. Normally I would drag-n-drop the new layer instead of copy-pasting, but I don't know how to drag-n-drop in SWM, so I've been copy-pasting. Usually first I make a blank layer and then "anchor" the pasted stuff to the blank layer. This time I tried one of the other options in the Edit menu, maybe "Paste in place". Truthfully I don't understand the various ways to copy something from one image and paste it into another.

Anyway, here's the content of the bug report popup:


GNU Image Manipulation Program version 2.9.9
git-describe: GIMP_2_9_8-413-g0ac29c0b61
C compiler:
	Using built-in specs.
	COLLECT_GCC=gcc
	COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/6.4.0/lto-wrapper
	Target: x86_64-pc-linux-gnu
	Configured with: /var/tmp/portage/sys-devel/gcc-6.4.0-r1/work/gcc-6.4.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/6.4.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.4.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.4.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.4.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/6.4.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 6.4.0-r1 p1.3' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --with-multilib-list=m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto --without-isl --enable-libsanitizer --enable-default-pie --enable-default-ssp
	Thread model: posix
	gcc version 6.4.0 (Gentoo 6.4.0-r1 p1.3) 
	
using GEGL version 0.3.29 (compiled against version 0.3.29)
using GLib version 2.55.0 (compiled against version 2.55.0)
using GdkPixbuf version 2.36.11 (compiled against version 2.36.11)
using GTK+ version 2.24.31 (compiled against version 2.24.31)
using Pango version 1.40.14 (compiled against version 1.40.14)
using Fontconfig version 2.12.4 (compiled against version 2.12.4)
using Cairo version 1.14.8 (compiled against version 1.14.8)


> GIMP-Error: file gimp-edit.c: line 249 (gimp_edit_paste_get_layer): should not be reached

Stack trace:
[New LWP 2444]
[New LWP 2445]
[New LWP 2731]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f9dd82a655c in waitpid () from /lib64/libpthread.so.0
  • #0 waitpid
    from /lib64/libpthread.so.0
  • #1 gimp_print_stack_trace
    at gimputils.c line 1166
  • #2 gimp_message_log_func
  • #3 g_logv
    at gmessages.c line 1370
  • #4 g_log
  • #5 gimp_edit_paste_get_layer
    at gimp-edit.c line 249
  • #6 gimp_edit_paste
    at gimp-edit.c line 539
  • #7 edit_paste
    at edit-commands.c line 587
  • #8 g_closure_invoke
    at gclosure.c line 804
  • #9 signal_emit_unlocked_R
    at gsignal.c line 3635
  • #10 g_signal_emit_valist
    at gsignal.c line 3391
  • #11 g_signal_emit
    at gsignal.c line 3447
  • #12 g_closure_invoke
    at gclosure.c line 804
  • #13 signal_emit_unlocked_R
    at gsignal.c line 3565
  • #14 g_signal_emit_valist
    at gsignal.c line 3391
  • #15 g_signal_emit
    at gsignal.c line 3447
  • #16 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #17 g_closure_invoke
    at gclosure.c line 804
  • #18 signal_emit_unlocked_R
    at gsignal.c line 3565
  • #19 g_signal_emit_valist
    at gsignal.c line 3391
  • #20 g_signal_emit
    at gsignal.c line 3447
  • #21 gtk_widget_activate
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #22 gtk_menu_shell_activate_item
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #23 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #24 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #25 g_closure_invoke
    at gclosure.c line 804
  • #26 signal_emit_unlocked_R
    at gsignal.c line 3673
  • #27 g_signal_emit_valist
    at gsignal.c line 3401
  • #28 g_signal_emit
    at gsignal.c line 3447
  • #29 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #30 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #31 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #32 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #33 g_main_dispatch
    at gmain.c line 3182
  • #34 g_main_context_dispatch
    at gmain.c line 3847
  • #35 g_main_context_iterate
    at gmain.c line 3920
  • #36 g_main_loop_run
    at gmain.c line 4116
  • #37 app_run
    at app.c line 353
  • #38 main
    at main.c line 517

Comment 1 Jehan 2018-02-10 22:55:00 UTC
Confirmed. This was happening with any of the "in place" pasting variant when copying a full layer (without any active selection; with selections, the code path was different).

Now fixed.

commit da3baa1cabd16cdcb1ed2695dd5013ca1de1a563 (HEAD -> master, origin/master, origin/HEAD)
Author: Jehan <jehan@girinstud.io>
Date:   Sat Feb 10 23:46:58 2018 +0100

    Bug 793360 - Error when copy-pasting in place a full layer.
    
    In a switch(), not all paste type were listed (the new "In Place"
    versions in particular were missing), therefore we were hitting a
    g_return_val_if_reached() error.

 app/core/gimp-edit.c | 3 +++
 1 file changed, 3 insertions(+)
Comment 2 Jehan 2018-02-10 23:03:04 UTC
I realized there was also another piece of code to fix, even though this one was not raising any error:

commit a5bc153343469f64f1ac4438f210dbdd49dbc7fa (HEAD -> master, origin/master, origin/HEAD)
Author: Jehan <jehan@girinstud.io>
Date:   Sat Feb 10 23:57:45 2018 +0100

    app: fix a second switch with missing paste types.
    
    Completing previous commit, the next switch was not raising any error,
    but I believe the new "in place" variants of paste as floating selection
    also have to be processed for mask removal.