Bug 397422 - TIFF export + flatten image = crash (flatpak)
Summary: TIFF export + flatten image = crash (flatpak)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 4.1.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-13 15:31 UTC by Peter Eszlari
Modified: 2018-09-18 18:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eszlari 2018-08-13 15:31:42 UTC
If I try to export to TIFF and "Flatten the image" is activated, Krita crashes.

original bug report: https://github.com/flathub/org.kde.krita/issues/7

backtrace:

#0  __GI_raise (sig=sig@entry=6) at /usr/src/debug/glibc/2.24-r0/git/sysdeps/unix/sysv/linux/raise.c:58
#1  0x000000313083447a in __GI_abort () at /usr/src/debug/glibc/2.24-r0/git/stdlib/abort.c:89
#2  0x00007fffee78aa6a in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1842
#3  0x00007fffee78b6a8 in QMessageLogger::fatal (this=this@entry=0x7fff7e60b590, msg=msg@entry=0x7fffeea297c0 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:880
#4  0x00007fffee785c09 in qt_assert_x (where=where@entry=0x7fffeea37ced "QCoreApplication::sendEvent", what=<optimized out>, file=file@entry=0x7fffeea37c78 "kernel/qcoreapplication.cpp", line=line@entry=576) at global/qglobal.cpp:3196
#5  0x00007fffee962f4e in QCoreApplicationPrivate::checkReceiverThread (receiver=receiver@entry=0x7fff8400e560) at kernel/qcoreapplication.cpp:570
#6  0x00007fffef31f980 in QApplication::notify (this=0x7fffffffda00, receiver=receiver@entry=0x7fff8400e560, e=e@entry=0x7fff7e60b910) at kernel/qapplication.cpp:2947
#7  0x00007ffff766c397 in KisApplication::notify (this=<optimized out>, receiver=0x7fff8400e560, event=0x7fff7e60b910) at /run/build/krita/libs/ui/KisApplication.cpp:626
#8  0x00007fffee9634dc in QCoreApplication::notifyInternal2 (receiver=0x7fff8400e560, event=event@entry=0x7fff7e60b910) at kernel/qcoreapplication.cpp:1048
#9  0x00007fffee99a252 in QCoreApplication::sendEvent (event=0x7fff7e60b910, receiver=<optimized out>) at kernel/qcoreapplication.h:234
#10 QObjectPrivate::setParent_helper (this=this@entry=0x7fff8400e120, o=o@entry=0x0) at kernel/qobject.cpp:2023
#11 0x00007fffee99abec in QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1034
#12 0x00007ffff5fbc509 in KisImageAnimationInterface::~KisImageAnimationInterface (this=0x7fff84003010, __in_chrg=<optimized out>) at /run/build/krita/libs/image/kis_image_animation_interface.cpp:119
#13 0x00007ffff5fc88d9 in KisImage::KisImagePrivate::~KisImagePrivate (this=0x7fff8400a510, __in_chrg=<optimized out>) at /run/build/krita/libs/image/kis_image.cc:183
#14 KisImage::~KisImage (this=0x7fff8400e560, __in_chrg=<optimized out>) at /run/build/krita/libs/image/kis_image.cc:263
#15 0x00007ffff5fc8b19 in KisImage::~KisImage (this=0x7fff8400e560, __in_chrg=<optimized out>) at /run/build/krita/libs/image/kis_image.cc:265
#16 0x00007fff8818e298 in KisSharedPtr<KisImage>::deref (sp=<synthetic pointer>, t=0x7fff8400e560) at ../libs/global/kis_shared_ptr.h:214
#17 KisSharedPtr<KisImage>::deref (this=<synthetic pointer>) at ../libs/global/kis_shared_ptr.h:221
#18 KisSharedPtr<KisImage>::~KisSharedPtr (this=<synthetic pointer>, __in_chrg=<optimized out>) at ../libs/global/kis_shared_ptr.h:109
#19 KisTIFFExport::convert (this=0x1275fdc0, document=<optimized out>, configuration=...) at /run/build/krita/plugins/impex/tiff/kis_tiff_export.cc:79
#20 0x00007ffff7694500 in KisImportExportManager::doExportImpl (this=this@entry=0x126b9220, location=..., filter=..., exportConfiguration=...) at /run/build/krita/libs/ui/KisImportExportManager.cpp:622
#21 0x00007ffff76945f8 in KisImportExportManager::doExport (this=0x126b9220, location=..., filter=..., exportConfiguration=..., alsoAsKra=<optimized out>) at /run/build/krita/libs/ui/KisImportExportManager.cpp:586
#22 0x00007ffff7699c2d in std::__invoke_impl<KisImportExportFilter::ConversionStatus, KisImportExportFilter::ConversionStatus (KisImportExportManager::* const&)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), KisImportExportManager*&, QString&, QSharedPointer<KisImportExportFilter>&, KisPinnedSharedPtr<KisPropertiesConfiguration>&, bool&> (__t=@0x12896838: 0x126b9220, __f=
    @0x12896800: (KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(KisImportExportManager * const, const QString &, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool)) 0x7ffff7694590 <KisImportExportManager::doExport(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool)>) at /usr/include/c++/6.2.0/functional:235
#23 std::__invoke<KisImportExportFilter::ConversionStatus (KisImportExportManager::* const&)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), KisImportExportManager*&, QString&, QSharedPointer<KisImportExportFilter>&, KisPinnedSharedPtr<KisPropertiesConfiguration>&, bool&> (__fn=
    @0x12896800: (KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(KisImportExportManager * const, const QString &, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool)) 0x7ffff7694590 <KisImportExportManager::doExport(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool)>) at /usr/include/c++/6.2.0/functional:260
#24 std::_Mem_fn_base<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), true>::operator()<KisImportExportManager*&, QString&, QSharedPointer<KisImportExportFilter>&, KisPinnedSharedPtr<KisPropertiesConfiguration>&, bool&> (this=0x12896800) at /usr/include/c++/6.2.0/functional:613
#25 std::_Bind<std::_Mem_fn<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool)> (KisImportExportManager*, QString, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool)>::__call<KisImportExportFilter::ConversionStatus, , 0ul, 1ul, 2ul, 3ul, 4ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul>) (
    __args=<optimized out>, this=0x12896800) at /usr/include/c++/6.2.0/functional:943
#26 std::_Bind<std::_Mem_fn<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool)> (KisImportExportManager*, QString, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool)>::operator()<, KisImportExportFilter::ConversionStatus>() (this=0x12896800) at /usr/include/c++/6.2.0/functional:1002
#27 QtConcurrent::StoredFunctorCall0<KisImportExportFilter::ConversionStatus, std::_Bind<std::_Mem_fn<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool)> (KisImportExportManager*, QString, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool)> >::runFunctor() (this=0x128967e0)
    at /usr/include/QtConcurrent/qtconcurrentstoredfunctioncall.h:60
#28 QtConcurrent::RunFunctionTask<KisImportExportFilter::ConversionStatus>::run (this=0x128967e0) at /usr/include/QtConcurrent/qtconcurrentrunbase.h:108
#29 0x00007fffee79943a in QThreadPoolThread::run (this=0x1278e430) at thread/qthreadpool.cpp:101
#30 0x00007fffee7a35f3 in QThreadPrivate::start (arg=0x1278e430) at thread/qthread_unix.cpp:367
#31 0x0000003131007444 in start_thread (arg=0x7fff7e60c700) at /usr/src/debug/glibc/2.24-r0/git/nptl/pthread_create.c:456
#32 0x00000031308e827f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Comment 1 Halla Rempt 2018-08-13 17:58:04 UTC
Hm... This does show a real problem, but I'm not sure where we have a sig/slot connection in different threads:

QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
QMetaObject::indexOfSignal: signal selectionChanged() from KoSelectedShapesProxy redefined in KisSelectedShapesProxy
QMetaObject::indexOfSignal: signal selectionChanged() from KoSelectedShapesProxy redefined in KisSelectedShapesProxy
ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 0x0xa2832b0. Receiver '' (of type 'KisImage') was created in thread 0x0x25d9930", file kernel/qcoreapplication.cpp, line 58

However... _Why_ is Qt built with asserts enabled? That shouldn't be done in release builds, should it?
Comment 2 Peter Eszlari 2018-08-13 18:16:12 UTC
> However... _Why_ is Qt built with asserts enabled? That shouldn't be done in release builds, should it?

You will have to ask Aleix Pol, the maintainer of the KDE runtime for flatpak.
Comment 3 Halla Rempt 2018-08-13 18:17:34 UTC
I will. Tomorrow -- since we're now both in Vienna, for Akademy.
Comment 4 Albert Astals Cid 2018-09-18 18:01:49 UTC
It seems meanwhile that this has been fixed (or so says the flathub bug)