Bug 374319 - SIGABRT exiting Krita after transformation of a pasted image from a secondary window (Krita 3.1.1 appimage - Ubuntu 14.04)
Summary: SIGABRT exiting Krita after transformation of a pasted image from a secondary...
Status: RESOLVED UPSTREAM
Alias: None
Product: frameworks-kimageformats
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.29.0
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Alex Merry
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-30 09:56 UTC by mvowada
Modified: 2018-02-14 18:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
(GDB Report) (3.87 KB, text/plain)
2016-12-30 09:57 UTC, mvowada
Details
(Video example of the steps) (3.01 MB, video/mp4)
2017-01-02 21:54 UTC, mvowada
Details
(GDB Report) (2.57 KB, text/plain)
2018-01-20 15:34 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvowada 2016-12-30 09:56:29 UTC
(Tested on Ubuntu 14.04.5 LTS - Unity 7.2.6, using Krita 3.1.1 appimage)
Steps to reproduce:

1) create a new document
2) open an image
3) copy an area of the image
4) switch to the new document
5) paste (CTRL + V)
6) transform the pasted area and apply
7) exit Krita.

Expected Results: exit Krita without crash.
Actual Results: SIGABRT signal at Krita exit.

(See also Bug 374317, not sure if it's related)
Comment 1 mvowada 2016-12-30 09:57:14 UTC
Created attachment 103087 [details]
(GDB Report)
Comment 2 mvowada 2016-12-30 10:05:37 UTC
(Link to the image that I saved and opened as local file in step 2: https://upload.wikimedia.org/wikipedia/commons/d/d3/Cascade_carieul_1280x960.jpg)
Comment 3 Phil Blackburn 2017-01-02 19:23:02 UTC
I'm unable to reproduce on Ubuntu 16.04 LTS with the most recent Krita source, gdb reports a clean exit. Was there any other intermediate step, or saving of images involved? How did you apply the changes in step 6?
Comment 4 mvowada 2017-01-02 21:54:33 UTC
Created attachment 103153 [details]
(Video example of the steps)

(In reply to Phil Blackburn from comment #3)
> Was there any other intermediate step, or
> saving of images involved? How did you apply the changes in step 6?

Hi Phil, here is a video showing the steps. Thanks for checking
Comment 5 Phil Blackburn 2017-01-03 01:49:10 UTC
Thanks a lot for the video. I'm still unable to reproduce as of git 132213b. Perhaps it's been fixed and one of the core devs can verify.
Comment 6 Halla Rempt 2017-01-03 08:31:42 UTC
On 14.04 and OpenSUSE Leap I can reproduce this -- the message QPrinter: Must construct a QCoreApplication before a QPrinter is also shown, which is kind of weird. I can also reproduce it with git master on OpenSUSE Leap running Gnome: 

#0  0x00007fffed21a0c7 in raise () at /lib64/libc.so.6
#1  0x00007fffed21b478 in abort () at /lib64/libc.so.6
#2  0x00007fffedec521e in  () at /home/boud/dev/deps/lib/libQt5Core.so.5
#3  0x00007ffff3c30760 in QPrinter::QPrinter(QPrinter::PrinterMode) () at /home/boud/dev/deps/lib/libQt5PrintSupport.so.5
#4  0x00007ffff3c308cc in QPrinter::QPrinter(QPrinter::PrinterMode) () at /home/boud/dev/deps/lib/libQt5PrintSupport.so.5
#5  0x00007fffd86672eb in EPSHandler::write(QImage const&) (this=0xa38e320, image=...)
    at /home/boud/dev/b/ext_frameworks/ext_kimageformats-prefix/src/ext_kimageformats/src/imageformats/eps.cpp:257
#6  0x00007fffee6bdc54 in QImageWriter::write(QImage const&) () at /home/boud/dev/deps/lib/libQt5Gui.so.5
#7  0x00007fffee69e336 in QImageData::doImageIO(QImage const*, QImageWriter*, int) const () at /home/boud/dev/deps/lib/libQt5Gui.so.5
#8  0x00007fffee69e4d6 in QImage::save(QIODevice*, char const*, int) const () at /home/boud/dev/deps/lib/libQt5Gui.so.5
#9  0x00007fffee66ecc9 in QInternalMimeData::renderDataHelper(QString const&, QMimeData const*) ()
    at /home/boud/dev/deps/lib/libQt5Gui.so.5
#10 0x00007fffe5d39cc5 in  () at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#11 0x00007fffe5d29db5 in  () at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#12 0x00007fffe5d2a515 in  () at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#13 0x00007fffe5d3173f in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) ()
    at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#14 0x00007fffe5d29161 in  () at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#15 0x00007fffe5d29284 in  () at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#16 0x00007fffe5d292d9 in  () at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#17 0x00007fffe5d2db61 in QXcbConnection::~QXcbConnection() () at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#18 0x00007fffe5d2e349 in QXcbConnection::~QXcbConnection() () at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#19 0x00007fffe5d34f7e in QXcbIntegration::~QXcbIntegration() () at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#20 0x00007fffe5d35069 in QXcbIntegration::~QXcbIntegration() () at /home/boud/dev/deps/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#21 0x00007fffee656c24 in QGuiApplicationPrivate::~QGuiApplicationPrivate() () at /home/boud/dev/deps/lib/libQt5Gui.so.5
#22 0x00007fffef097109 in QApplicationPrivate::~QApplicationPrivate() () at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#23 0x00007fffee0dcb86 in QObject::~QObject() () at /home/boud/dev/deps/lib/libQt5Core.so.5
#24 0x00007fffee0ac38e in QCoreApplication::~QCoreApplication() () at /home/boud/dev/deps/lib/libQt5Core.so.5
#25 0x00007fffee656a7f in QGuiApplication::~QGuiApplication() () at /home/boud/dev/deps/lib/libQt5Gui.so.5
#26 0x00007fffef098c7a in QApplication::~QApplication() () at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#27 0x00007ffff793b3de in QtSingleApplication::~QtSingleApplication() (this=0x7fffffffd590, __in_chrg=<optimized out>)
    at /home/boud/dev/krita/libs/ui/qtsingleapplication/qtsingleapplication.cpp:102
#28 0x00000000004050e3 in main(int, char**) (argc=1, argv=<optimized out>) at /home/boud/dev/krita/krita/main.cc:131

But the backtrace is entirely inside Qt and it seems to happen whenever there is something on the clipboard -- you only need to create a single document and select then copy something.
Comment 7 Halla Rempt 2017-01-03 08:55:24 UTC
Extra note: it only happens in Gnome or Unity (well, probably also in Mate and other gnome/gtk desktops). It seems to happen because the clipboard in those systems asks for the clip in eps format. This is a bug in the eps kimageformats plugin, not Krita.
Comment 8 Christoph Feck 2017-01-04 19:25:11 UTC
The QApplication is already running the destructor, still QInternalMimeData tries to save an image. If this cannot be avoided inside Qt, the image handlers need to detect that condition and not do any work that requires a working QApplication.
Comment 9 mvowada 2018-01-20 15:34:25 UTC
Created attachment 110017 [details]
(GDB Report)

(Confirming with Krita 4.0.0-beta1.1 on Ubuntu 14.04 Unity - I understand that probably it isn't an issue with Krita)
Comment 10 Christoph Feck 2018-02-14 18:01:12 UTC
This is probably fixed by http://code.qt.io/cgit/qt/qtbase.git/commit/src/plugins/platforms/xcb?id=f43c9697bcae997be3eb6db9504f3d7b64601148 available in Qt 5.6.3 or 5.9.x or newer.

If you can still reproduce it with these Qt versions, please add a comment.