Reproducible: Always Krita receives a segfault when opening a document which has a file layer. This doesn't happen in the 3.1 branch. Steps to Reproduce: 1. Create a new document 2. Add a file layer 3. Save and close document 4. Open document Output, including backtrace: QObject: Cannot create children for a parent that is in a different thread. (Parent is QStatusBar(0x69ca070), parent's thread is QThread(0xa888f0), current thread is QThread(0x2542c30) QCoreApplication::postEvent: Unexpected null receiver QObject::killTimer: Timers cannot be stopped from another thread QObject::startTimer: Timers cannot be started from another thread QObject: Cannot create children for a parent that is in a different thread. (Parent is QStatusBar(0x69ca070), parent's thread is QThread(0xa888f0), current thread is QThread(0x2542c30) QLayout: Attempting to add QLayout "" to QStatusBar "", which already has a layout QObject::killTimer: Timers cannot be stopped from another thread QObject::startTimer: Timers cannot be started from another thread Thread 1 "krita" received signal SIGSEGV, Segmentation fault. 0x00007ffff68d9bfc in QLayout::widgetEvent(QEvent*) () from /opt/Qt-5.6/lib/libQt5Widgets.so.5 (gdb) bt #0 0x00007ffff68d9bfc in QLayout::widgetEvent(QEvent*) () from /opt/Qt-5.6/lib/libQt5Widgets.so.5 #1 0x00007ffff68b7d9a in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/Qt-5.6/lib/libQt5Widgets.so.5 #2 0x00007ffff68bd306 in QApplication::notify(QObject*, QEvent*) () from /opt/Qt-5.6/lib/libQt5Widgets.so.5 #3 0x00007ffff78ae0c7 in KisApplication::notify (this=<optimized out>, receiver=0x69ca070, event=0x7fffc4082310) at src/krita/libs/ui/KisApplication.cpp:550 #4 0x00007ffff5f3a298 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /opt/Qt-5.6/lib/libQt5Core.so.5 #5 0x00007ffff5f3c15a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /opt/Qt-5.6/lib/libQt5Core.so.5 #6 0x00007ffff5f8f173 in ?? () from /opt/Qt-5.6/lib/libQt5Core.so.5 #7 0x00007fffefa8f197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #8 0x00007fffefa8f3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #9 0x00007fffefa8f49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #10 0x00007ffff5f8f57f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/Qt-5.6/lib/libQt5Core.so.5 #11 0x00007ffff78dd1ff in runActionImpl<KisImportExportFilter::ConversionStatus>(std::function<KisImportExportFilter::ConversionStatus ()>) (func=...) at src/krita/libs/ui/kis_async_action_feedback.cpp:52 #12 0x00007ffff78dba99 in KisAsyncActionFeedback::runAction(std::function<KisImportExportFilter::ConversionStatus ()>) (this=this@entry=0x7fffffffc7e0, func=...) at src/krita/libs/ui/kis_async_action_feedback.cpp:61 #13 0x00007ffff78d79ed in KisImportExportManager::convert (this=0x7d74750, direction=direction@entry=KisImportExportManager::Import, location=..., realLocation=..., mimeType=..., showWarnings=showWarnings@entry=false, exportConfiguration=...) at src/krita/libs/ui/KisImportExportManager.cpp:264 #14 0x00007ffff78d7c9b in KisImportExportManager::importDocument (this=<optimized out>, location=..., mimeType=...) at src/krita/libs/ui/KisImportExportManager.cpp:88 #15 0x00007ffff78bd890 in KisDocument::openFile (this=this@entry=0x7cc5c80) at src/krita/libs/ui/KisDocument.cpp:1088 #16 0x00007ffff78be3a2 in KisDocument::openUrlInternal (this=this@entry=0x7cc5c80, url=...) at src/krita/libs/ui/KisDocument.cpp:1489 #17 0x00007ffff78be7a0 in KisDocument::openUrl (this=this@entry=0x7cc5c80, _url=..., flags=flags@entry=KisDocument::OPEN_URL_FLAG_NONE) at src/krita/libs/ui/KisDocument.cpp:994 #18 0x00007ffff78dfcf0 in KisMainWindow::openDocumentInternal (this=this@entry=0x69f49c0, url=..., newdoc=0x7cc5c80, newdoc@entry=0x0) at src/krita/libs/ui/KisMainWindow.cpp:772 #19 0x00007ffff78e7115 in KisMainWindow::openDocument (this=this@entry=0x69f49c0, url=...) at src/krita/libs/ui/KisMainWindow.cpp:754 #20 0x00007ffff78e7638 in KisMainWindow::slotFileOpen (this=0x69f49c0) at src/krita/libs/ui/KisMainWindow.cpp:1348 #21 0x00007ffff78ef214 in KisMainWindow::qt_static_metacall (_o=0x69f49c0, _c=<optimized out>, _id=<optimized out>, _a=0x7fffffffd0c0) at builds/krita_standard/libs/ui/moc_KisMainWindow.cpp:310 #22 0x00007ffff5f66b61 in QMetaObject::activate(QObject*, int, int, void**) () from /opt/Qt-5.6/lib/libQt5Core.so.5 #23 0x00007ffff68ae8c2 in QAction::triggered(bool) () from /opt/Qt-5.6/lib/libQt5Widgets.so.5 #24 0x00007ffff68b13e0 in QAction::activate(QAction::ActionEvent) () from /opt/Qt-5.6/lib/libQt5Widgets.so.5 #25 0x00007ffff68b1d54 in QAction::event(QEvent*) () from /opt/Qt-5.6/lib/libQt5Widgets.so.5 #26 0x00007ffff68b7dcc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/Qt-5.6/lib/libQt5Widgets.so.5 #27 0x00007ffff68bd306 in QApplication::notify(QObject*, QEvent*) () from /opt/Qt-5.6/lib/libQt5Widgets.so.5 #28 0x00007ffff78ae0c7 in KisApplication::notify (this=<optimized out>, receiver=0x7a49680, event=0x7fffffffd400) at src/krita/libs/ui/KisApplication.cpp:550 #29 0x00007ffff5f3a298 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /opt/Qt-5.6/lib/libQt5Core.so.5 #30 0x00007ffff62ab426 in QShortcutMap::dispatchEvent(QKeyEvent*) () from /opt/Qt-5.6/lib/libQt5Gui.so.5 #31 0x00007ffff62ab4d9 in QShortcutMap::tryShortcut(QKeyEvent*) () from /opt/Qt-5.6/lib/libQt5Gui.so.5 #32 0x00007ffff62630e6 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /opt/Qt-5.6/lib/libQt5Gui.so.5 #33 0x00007ffff627b1c4 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /opt/Qt-5.6/lib/libQt5Gui.so.5 #34 0x00007ffff62802c5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /opt/Qt-5.6/lib/libQt5Gui.so.5 #35 0x00007ffff625dcbb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/Qt-5.6/lib/libQt5Gui.so.5 #36 0x00007fffe676aa00 in ?? () from /opt/Qt-5.6/plugins/platforms/../../lib/libQt5XcbQpa.so.5 #37 0x00007fffefa8f197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #38 0x00007fffefa8f3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #39 0x00007fffefa8f49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #40 0x00007ffff5f8f57f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/Qt-5.6/lib/libQt5Core.so.5 #41 0x00007ffff5f37fea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/Qt-5.6/lib/libQt5Core.so.5 #42 0x00007ffff5f406ac in QCoreApplication::exec() () from /opt/Qt-5.6/lib/libQt5Core.so.5 #43 0x0000000000405225 in main (argc=1, argv=<optimized out>) at src/krita/krita/main.cc:269
I just did a bisect: 7604cb70cdf52f3d1fafa13cb1aab295385f4c88 is the first bad commit commit 7604cb70cdf52f3d1fafa13cb1aab295385f4c88 Author: Dmitry Kazakov <dimula73@gmail.com> Date: Fri Apr 14 16:54:43 2017 +0300 Implement feedback when exporting the image
Git commit 3c37f43d9a4f2dc82fa67deaa22fa7b71c61a718 by Boudewijn Rempt. Committed on 25/04/2017 at 09:10. Pushed by rempt into branch 'master'. We cannot load images outside the GUI thread because of all the qobjects that can be created. Besides, the spinning bar dialog is the wrong approach to feedback, especially if the statusbar progressbar is still present, but Krita should be giving progress feedback in the statusbar. M +0 -5 libs/ui/KisImportExportManager.cpp https://commits.kde.org/krita/3c37f43d9a4f2dc82fa67deaa22fa7b71c61a718