Bug 32780 - Gimp crash when copy and paste a piece of png
Summary: Gimp crash when copy and paste a piece of png
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL: https://www.kensan.it/tmp/Screenshot_...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-25 02:42 CET by Sandro kensan
Modified: 2024-03-25 20:50 CET (History)
2 users (show)

See Also:
Source RPM: gimp-2.10.36-1.mga9.src.rpm
CVE:
Status comment:


Attachments

Description Sandro kensan 2024-01-25 02:42:10 CET
I was copy (ctrl-c) and paste (ctrl-v) a piece of image png from a screenshot when suddendly for three times Gimp crashed.

Can you select and copy a long rectangular piece orizontally?

Follow the text from the gimp crash debug:

<!-- Copy-paste this whole debug data to report to developers -->


```
GNU Image Manipulation Program version 2.10.36
git-describe: GIMP_2_10_36
Build: unknown rev 0 for linux
# C compiler #
	Using built-in specs.
	COLLECT_GCC=gcc
	COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-mageia-linux/12/lto-wrapper
	Target: x86_64-mageia-linux
	Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib64 --with-pkgversion='Mageia 12.3.0-3.mga9' --with-bugurl=https://bugs.mageia.org/ --mandir=/usr/share/man --infodir=/usr/share/info --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,d --enable-linker-build-id --build=x86_64-mageia-linux --host=x86_64-mageia-linux --with-cpu=generic --with-system-zlib --enable-threads=posix --with-linker-hash-style=gnu --enable-shared --enable-long-long --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-ssp --disable-libssp --disable-libffi --disable-werror --with-isl --with-python-dir=/lib/python3.10/site-packages --enable-lto --with-gcc-major-version-only
	Thread model: posix
	Supported LTO compression algorithms: zlib zstd
	gcc version 12.3.0 (Mageia 12.3.0-3.mga9) 

# Libraries #
using babl version 0.1.102 (compiled against version 0.1.102)
using GEGL version 0.4.42 (compiled against version 0.4.42)
using GLib version 2.76.3 (compiled against version 2.76.3)
using GdkPixbuf version 2.42.10 (compiled against version 2.42.10)
using GTK+ version 2.24.33 (compiled against version 2.24.33)
using Pango version 1.50.14 (compiled against version 1.50.14)
using Fontconfig version 2.14.2 (compiled against version 2.14.2)
using Cairo version 1.17.6 (compiled against version 1.17.6)

```
> fatal error: Segmentation fault

Stack trace:
```
/lib64/libgimpbase-2.0.so.0(gimp_stack_trace_print+0x408)[0x7fb84070d108]
/usr/bin/gimp-2.10[0x49fbc2]
/usr/bin/gimp-2.10[0x49ff96]
/usr/bin/gimp-2.10[0x4a05a9]
/lib64/libc.so.6(+0x36960)[0x7fb83f4f1960]
/usr/bin/gimp-2.10(gimp_temp_buf_get_data+0x0)[0x7d82d0]
/usr/bin/gimp-2.10[0x7b9f33]
/usr/bin/gimp-2.10(gimp_viewable_get_preview+0x125)[0x7e0dd5]
/usr/bin/gimp-2.10[0x7e0ece]
/usr/bin/gimp-2.10(gimp_viewable_get_pixbuf+0x125)[0x7e11c5]
/usr/bin/gimp-2.10[0x65f87f]
/usr/bin/gimp-2.10[0x65da43]
/usr/bin/gimp-2.10(gimp_view_renderer_draw+0xdb)[0x65ea4b]
/usr/bin/gimp-2.10[0x659d36]
/lib64/libgtk-x11-2.0.so.0(+0x1316f7)[0x7fb8403316f7]
/lib64/libgobject-2.0.so.0(g_closure_invoke+0xa1)[0x7fb83f8d11a1]
/lib64/libgobject-2.0.so.0(+0x28955)[0x7fb83f8e3955]
/lib64/libgobject-2.0.so.0(g_signal_emit_valist+0x7ea)[0x7fb83f8e9d1a]
/lib64/libgobject-2.0.so.0(g_signal_emit+0x82)[0x7fb83f8ea682]
/lib64/libgtk-x11-2.0.so.0(+0x246fb4)[0x7fb840446fb4]
/lib64/libgtk-x11-2.0.so.0(gtk_container_propagate_expose+0x184)[0x7fb8402b85e4]
/usr/bin/gimp-2.10[0x666e85]
/lib64/libgtk-x11-2.0.so.0(+0xb7113)[0x7fb8402b7113]
/lib64/libgtk-x11-2.0.so.0(+0x1316f7)[0x7fb8403316f7]
/lib64/libgobject-2.0.so.0(g_closure_invoke+0xa1)[0x7fb83f8d11a1]
/lib64/libgobject-2.0.so.0(+0x28955)[0x7fb83f8e3955]
/lib64/libgobject-2.0.so.0(g_signal_emit_valist+0x7ea)[0x7fb83f8e9d1a]
/lib64/libgobject-2.0.so.0(g_signal_emit+0x82)[0x7fb83f8ea682]
/lib64/libgtk-x11-2.0.so.0(+0x246fb4)[0x7fb840446fb4]
/lib64/libgtk-x11-2.0.so.0(gtk_container_propagate_expose+0x184)[0x7fb8402b85e4]
/lib64/libgtk-x11-2.0.so.0(+0xb7113)[0x7fb8402b7113]
/lib64/libgtk-x11-2.0.so.0(+0x241edf)[0x7fb840441edf]
/lib64/libgtk-x11-2.0.so.0(+0x1316f7)[0x7fb8403316f7]
/lib64/libgobject-2.0.so.0(g_closure_invoke+0x160)[0x7fb83f8d1260]
/lib64/libgobject-2.0.so.0(+0x28955)[0x7fb83f8e3955]
/lib64/libgobject-2.0.so.0(g_signal_emit_valist+0x7ea)[0x7fb83f8e9d1a]
/lib64/libgobject-2.0.so.0(g_signal_emit+0x82)[0x7fb83f8ea682]
/lib64/libgtk-x11-2.0.so.0(+0x246fb4)[0x7fb840446fb4]
/lib64/libgtk-x11-2.0.so.0(gtk_main_do_event+0x648)[0x7fb840330518]
/lib64/libgdk-x11-2.0.so.0(+0x43e1f)[0x7fb8407c6e1f]
/lib64/libgdk-x11-2.0.so.0(+0x43dc3)[0x7fb8407c6dc3]
/lib64/libgdk-x11-2.0.so.0(+0x43dc3)[0x7fb8407c6dc3]
/lib64/libgdk-x11-2.0.so.0(+0x43dc3)[0x7fb8407c6dc3]
/lib64/libgdk-x11-2.0.so.0(+0x3fa5d)[0x7fb8407c2a5d]
/lib64/libgdk-x11-2.0.so.0(gdk_window_process_all_updates+0x151)[0x7fb8407c34c1]
/lib64/libgdk-x11-2.0.so.0(+0x40519)[0x7fb8407c3519]
/lib64/libgdk-x11-2.0.so.0(+0x1e893)[0x7fb8407a1893]
/lib64/libglib-2.0.so.0(+0x5440e)[0x7fb83f7c740e]
/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x149)[0x7fb83f7cb689]
/lib64/libglib-2.0.so.0(+0x58a18)[0x7fb83f7cba18]
/lib64/libglib-2.0.so.0(g_main_loop_run+0x6f)[0x7fb83f7cbcbf]
/usr/bin/gimp-2.10(app_run+0x30c)[0x49f3ec]
/usr/bin/gimp-2.10(main+0x323)[0x49ed53]
/lib64/libc.so.6(+0x236b7)[0x7fb83f4de6b7]
/lib64/libc.so.6(__libc_start_main+0x85)[0x7fb83f4de775]
/usr/bin/gimp-2.10(_start+0x21)[0x49eeb1]

```
sturmvogel 2024-01-25 05:23:44 CET

Source RPM: (none) => gimp-2.10.36-1.mga9.src.rpm

Comment 1 Lewis Smith 2024-01-26 21:38:58 CET
I have tried in vain to reproduce your fault, but Gimp has become a stranger to me due to accumulated changes.
I did master copying & pasting various rectangular selections, including a relatively long thin one from the left side of the screen to the right side.

Can you describe very exactly every step you do to produce the fault?

CC: (none) => lewyssmith

Comment 2 Sandro kensan 2024-01-26 22:45:28 CET
Thank you Lewis for dealing with this bug. I uploaded to my server the file Screenshot_20240125_022223.xcf where it is marked with a dotted rectangle the area where I just tried to select and then when I press ctrl-c gimp immediately closes.

If the same thing doesn't happen to you then it is probably a problem with my Gimp configuration alone. So you can close the bug. If it does happen to you then there is a problem.

TY.

I don't know where to put the link, so I put here:
https://www.kensan.it/tmp/Screenshot_20240125_022223.xcf

Sorry if it is the wrong place, move to the correct location if you want.
Comment 3 katnatek 2024-01-27 02:18:02 CET
Can't reproduce the issue with the sample file
Comment 4 Sandro kensan 2024-01-27 17:18:27 CET
It is evidently a problem with my software-hardware configuration.
Comment 5 Morgan Leijström 2024-01-27 18:30:46 CET
You may better ask a GIMP forum.
Here is a similar but old issue
https://www.gimp-forum.net/Thread-Gimp-2-10-crashing-every-time-I-try-to-cut-or-copy

CC: (none) => fri

Comment 6 Sandro kensan 2024-01-27 19:11:42 CET
TY. The link is useful, there might be a chance to solve the Gimp crash.
Comment 7 Lewis Smith 2024-01-27 21:20:03 CET
(In reply to Sandro kensan from comment #2)
> I uploaded to my server the file
> Screenshot_20240125_022223.xcf where it is marked with a dotted rectangle
> the area where I just tried to select and then when I press ctrl-c gimp
> immediately closes.
Thank you for the specific example.
Curiously, viewing the file with ImageMagick does not show the selection, while opening it in Gimp does - the famous marching ants. Its private xcf format must preserve such detail.
Ctrl/C the given selection clearly does it, and Ctrl/V puts it down, and it can be moved in all directions, even beyond the image boundary.

So like katnatek, I cannot reproduce the fault.

That link in comment 5 is interesting, and hopefully points to a reason.
Please say what desktop you are using; and if possible, try another one.
Comment 8 Sandro kensan 2024-01-28 02:02:56 CET
(In reply to Lewis Smith from comment #7)

> Ctrl/C the given selection clearly does it, and Ctrl/V puts it down, and it
> can be moved in all directions, even beyond the image boundary.
> 
> So like katnatek, I cannot reproduce the fault.

I guessed as much.

> That link in comment 5 is interesting, and hopefully points to a reason.
> Please say what desktop you are using; and if possible, try another one.

I use KDE and have tried to change some KDE clipboard configuration but without success.
Comment 9 Lewis Smith 2024-01-29 20:17:34 CET
Have you checked the possible culprits cited in that comment 5 link?

And if you have space, install a small desktop like LXDE of Xfce (task-...) and see what happens under that. It will do no harm, but do not try to remove it later.
Comment 10 sturmvogel 2024-03-25 12:25:47 CET
Same as bug 33011
Comment 11 Lewis Smith 2024-03-25 20:19:42 CET
If it is, when we get confirmation of that fix, we will need to offer
gimp-2.10.36-3 as a Megeia 9 update on this bug.

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=33011

Comment 12 Sandro kensan 2024-03-25 20:34:18 CET
(In reply to Lewis Smith from comment #11)
> If it is, when we get confirmation of that fix, we will need to offer
> gimp-2.10.36-3 as a Megeia 9 update on this bug.

Nice!

I just now tried the bug again and again the crash occurred as soon as I selected and pressed ctrl-c.

$ rpm -q gimp
gimp-2.10.36-1.mga9

https://www.kensan.it/tmp/Screenshot_20240125_022223.xcf

I selected the rectangle that appears as dashed in the image.
Comment 13 Lewis Smith 2024-03-25 20:50:55 CET
Thank you for trying the new version - if with no joy..
I cannot get a crash with the example image; or at all.
Need to wait for the other bug to be tried.

Note You need to log in before you can comment on or make changes to this bug.