Bug 362675 - Krita crashed while saving [ probably due to trigger of autosave while save]
Summary: Krita crashed while saving [ probably due to trigger of autosave while save]
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-04 18:30 UTC by Raghavendra kamath
Modified: 2016-05-13 11:12 UTC (History)
1 user (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 Raghavendra kamath 2016-05-04 18:30:11 UTC
While i hit the save shortcut , krita instantly crashed and bug report wizrd fired up giveing the backtrace below :


Application: krita (krita), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ffa7c604840 (LWP 7924))]

Thread 6 (Thread 0x7ffa5ac6a700 (LWP 7926)):
#0  0x00007ffa73f8bc3d in poll () from /usr/lib/libc.so.6
#1  0x00007ffa6f3b80fc in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007ffa6f3b820c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007ffa74dbecab in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#4  0x00007ffa74d676fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#5  0x00007ffa74b90fe4 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#6  0x00007ffa701d4a55 in ?? () from /usr/lib/libQt5DBus.so.5
#7  0x00007ffa74b95de8 in ?? () from /usr/lib/libQt5Core.so.5
#8  0x00007ffa70885424 in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007ffa73f94cbd in clone () from /usr/lib/libc.so.6

Thread 5 (Thread 0x7ffa453cb700 (LWP 7928)):
#0  0x00007ffa7088b03f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007ffa74b96c8b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQt5Core.so.5
#2  0x00007ffa74b8fc3b in QSemaphore::acquire(int) () from /usr/lib/libQt5Core.so.5
#3  0x00007ffa7b1ad14d in KisTileDataPooler::waitForWork (this=0x7ffa7b67cb00 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /home/raghu/kf5/src/krita/libs/image/tiles3/kis_tile_data_pooler.cc:165
#4  KisTileDataPooler::run (this=0x7ffa7b67cb00 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /home/raghu/kf5/src/krita/libs/image/tiles3/kis_tile_data_pooler.cc:187
#5  0x00007ffa74b95de8 in ?? () from /usr/lib/libQt5Core.so.5
#6  0x00007ffa70885424 in start_thread () from /usr/lib/libpthread.so.0
#7  0x00007ffa73f94cbd in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7ffa44bca700 (LWP 7929)):
#0  0x00007ffa73f6461d in nanosleep () from /usr/lib/libc.so.6
#1  0x00007ffa74c4208d in ?? () from /usr/lib/libQt5Core.so.5
#2  0x00007ffa74b951f8 in QThread::msleep(unsigned long) () from /usr/lib/libQt5Core.so.5
#3  0x00007ffa7b1c704a in KisTileDataSwapper::run (this=0x7ffa7b67cb40 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder+64>) at /home/raghu/kf5/src/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:97
#4  0x00007ffa74b95de8 in ?? () from /usr/lib/libQt5Core.so.5
#5  0x00007ffa70885424 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007ffa73f94cbd in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7ffa3ffff700 (LWP 7930)):
#0  0x00007ffa7088b03f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007ffa74b96c8b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQt5Core.so.5
#2  0x00007ffa75cbd3a2 in ?? () from /usr/lib/libQt5Widgets.so.5
#3  0x00007ffa74b95de8 in ?? () from /usr/lib/libQt5Core.so.5
#4  0x00007ffa70885424 in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007ffa73f94cbd in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7ff9c73f6700 (LWP 9071)):
[KCrash Handler]
#5  KisKraSaver::saveBinaryData (this=0x7ff9f4035590, store=store@entry=0x19b31430, image=..., uri=..., external=external@entry=true, autosave=autosave@entry=false) at /home/raghu/kf5/src/krita/libs/ui/kra/kis_kra_saver.cpp:187
#6  0x00007ffa7bfe1285 in KisDocument::completeSaving (this=this@entry=0xb6d0930, store=store@entry=0x19b31430) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:1711
#7  0x00007ffa7bfe55f6 in KisDocument::saveNativeFormatCalligra (this=0xb6d0930, store=0x19b31430) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:952
#8  0x00007ffa7be763eb in std::function<bool ()>::operator()() const (this=0x196aad80) at /usr/include/c++/5.3.0/functional:2267
#9  QtConcurrent::StoredFunctorCall0<bool, std::function<bool ()> >::runFunctor() (this=0x196aad60) at /usr/include/qt/QtConcurrent/qtconcurrentstoredfunctioncall.h:54
#10 QtConcurrent::RunFunctionTask<bool>::run (this=0x196aad60) at /usr/include/qt/QtConcurrent/qtconcurrentrunbase.h:102
#11 0x00007ffa74b920d3 in ?? () from /usr/lib/libQt5Core.so.5
#12 0x00007ffa74b95de8 in ?? () from /usr/lib/libQt5Core.so.5
#13 0x00007ffa70885424 in start_thread () from /usr/lib/libpthread.so.0
#14 0x00007ffa73f94cbd in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffa7c604840 (LWP 7924)):
#0  0x00007ffa7088b03f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007ffa74b96c8b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQt5Core.so.5
#2  0x00007ffa74b91a55 in QThreadPoolPrivate::waitForDone(int) () from /usr/lib/libQt5Core.so.5
#3  0x00007ffa74b91cc1 in QThreadPool::waitForDone(int) () from /usr/lib/libQt5Core.so.5
#4  0x00007ffa74b91cfc in QThreadPool::~QThreadPool() () from /usr/lib/libQt5Core.so.5
#5  0x00007ffa74b91d39 in ?? () from /usr/lib/libQt5Core.so.5
#6  0x00007ffa73ee2c38 in __run_exit_handlers () from /usr/lib/libc.so.6
#7  0x00007ffa73ee2c85 in exit () from /usr/lib/libc.so.6
#8  0x00007ffa72cf36f5 in _XDefaultIOError () from /usr/lib/libX11.so.6
#9  0x00007ffa694894be in ?? () from /usr/lib/libQt5XcbQpa.so.5
#10 0x00007ffa72cf391e in _XIOError () from /usr/lib/libX11.so.6
#11 0x00007ffa72cf0c9f in ?? () from /usr/lib/libX11.so.6
#12 0x00007ffa72cf14c9 in _XFlush () from /usr/lib/libX11.so.6
#13 0x00007ffa72cf3fa5 in _XGetRequest () from /usr/lib/libX11.so.6
#14 0x00007ffa72cce579 in XChangeProperty () from /usr/lib/libX11.so.6
#15 0x00007ffa72cec4d2 in XSetTextProperty () from /usr/lib/libX11.so.6
#16 0x00007ffa694a0db3 in QXcbWindow::setWindowTitle(QString const&) () from /usr/lib/libQt5XcbQpa.so.5
#17 0x00007ffa752b741f in QWindow::setTitle(QString const&) () from /usr/lib/libQt5Gui.so.5
#18 0x00007ffa75abd269 in QWidgetPrivate::setWindowTitle_helper(QString const&) () from /usr/lib/libQt5Widgets.so.5
#19 0x00007ffa75ac7f56 in QWidget::setWindowTitle(QString const&) () from /usr/lib/libQt5Widgets.so.5
#20 0x00007ffa781e3345 in KMainWindow::setPlainCaption (caption=..., this=0xa872000) at /home/raghu/kf5/src/krita/libs/widgetutils/xmlgui/kmainwindow.cpp:426
#21 KMainWindow::setCaption (this=0xa872000, caption=..., modified=<optimized out>) at /home/raghu/kf5/src/krita/libs/widgetutils/xmlgui/kmainwindow.cpp:420
#22 0x00007ffa7c0029f1 in KisMainWindow::updateCaption (this=this@entry=0xa872000, caption=..., mod=<optimized out>) at /home/raghu/kf5/src/krita/libs/ui/KisMainWindow.cpp:753
#23 0x00007ffa7c003faa in KisMainWindow::updateCaption (this=0xa872000) at /home/raghu/kf5/src/krita/libs/ui/KisMainWindow.cpp:728
#24 0x00007ffa7c0301ba in KisView::slotSavingFinished (this=<optimized out>) at /home/raghu/kf5/src/krita/libs/ui/KisView.cpp:1004
#25 0x00007ffa7c099da5 in KisView::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7ffc608a4320) at /home/raghu/kf5/build/libs/ui/moc_KisView.cpp:157
#26 0x00007ffa74d95870 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#27 0x00007ffa7bfe1364 in KisDocument::completeSaving (this=this@entry=0xb6d0930, store=store@entry=0xf192ea0) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:1721
#28 0x00007ffa7bfe55f6 in KisDocument::saveNativeFormatCalligra (this=this@entry=0xb6d0930, store=store@entry=0xf192ea0) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:952
#29 0x00007ffa7bfe5d26 in KisDocument::saveNativeFormat (this=this@entry=0xb6d0930, file=...) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:911
#30 0x00007ffa7bfe76b5 in KisDocument::slotAutoSave (this=0xb6d0930) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:821
#31 0x00007ffa74d95870 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#32 0x00007ffa74da2808 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt5Core.so.5
#33 0x00007ffa74d96613 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#34 0x00007ffa75a8d68c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#35 0x00007ffa75a928f6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#36 0x00007ffa7bfd6507 in KisApplication::notify (this=<optimized out>, receiver=0xb730e60, event=0x7ffc608a4a10) at /home/raghu/kf5/src/krita/libs/ui/KisApplication.cpp:502
#37 0x00007ffa74d69518 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#38 0x00007ffa74dbdb8e in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5
#39 0x00007ffa74dbe0b1 in ?? () from /usr/lib/libQt5Core.so.5
#40 0x00007ffa6f3b7f07 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#41 0x00007ffa6f3b8160 in ?? () from /usr/lib/libglib-2.0.so.0
#42 0x00007ffa6f3b820c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#43 0x00007ffa74dbec8f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#44 0x00007ffa7be7615f in KisAsyncActionFeedback::runAction(std::function<bool ()>) (this=this@entry=0x7ffc608a4ca0, func=...) at /home/raghu/kf5/src/krita/libs/ui/kis_async_action_feedback.cpp:51
#45 0x00007ffa7bfe5c3c in KisDocument::saveNativeFormat (this=this@entry=0xb6d0930, file=...) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:909
#46 0x00007ffa7bfe66ae in KisDocument::saveFile (this=0xb6d0930) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:676
#47 0x00007ffa7bfe6e51 in KisDocument::save (this=this@entry=0xb6d0930) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:2132
#48 0x00007ffa7c00d8b5 in KisMainWindow::saveDocument (this=this@entry=0xa872000, document=0xb6d0930, saveas=saveas@entry=false, silent=silent@entry=false, specialOutputFlag=specialOutputFlag@entry=0) at /home/raghu/kf5/src/krita/libs/ui/KisMainWindow.cpp:1095
#49 0x00007ffa7c00e561 in KisMainWindow::slotFileSave (this=0xa872000) at /home/raghu/kf5/src/krita/libs/ui/KisMainWindow.cpp:1392
#50 0x00007ffa7c013036 in KisMainWindow::qt_static_metacall (_o=0xa872000, _c=<optimized out>, _id=<optimized out>, _a=0x7ffc608a5580) at /home/raghu/kf5/build/libs/ui/moc_KisMainWindow.cpp:318
#51 0x00007ffa74d95870 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#52 0x00007ffa75a843d2 in QAction::triggered(bool) () from /usr/lib/libQt5Widgets.so.5
#53 0x00007ffa75a86ef0 in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQt5Widgets.so.5
#54 0x00007ffa75a8784f in QAction::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#55 0x00007ffa75a8d68c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#56 0x00007ffa75a928f6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#57 0x00007ffa7bfd6507 in KisApplication::notify (this=<optimized out>, receiver=0xb539af0, event=0x7ffc608a58b0) at /home/raghu/kf5/src/krita/libs/ui/KisApplication.cpp:502
#58 0x00007ffa74d69518 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#59 0x00007ffa752de826 in QShortcutMap::dispatchEvent(QKeyEvent*) () from /usr/lib/libQt5Gui.so.5
#60 0x00007ffa752de8d9 in QShortcutMap::tryShortcut(QKeyEvent*) () from /usr/lib/libQt5Gui.so.5
#61 0x00007ffa75297716 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /usr/lib/libQt5Gui.so.5
#62 0x00007ffa752afa14 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib/libQt5Gui.so.5
#63 0x00007ffa752b4b65 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/libQt5Gui.so.5
#64 0x00007ffa75291d6b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
#65 0x00007ffa694bfe60 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#66 0x00007ffa6f3b7f07 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#67 0x00007ffa6f3b8160 in ?? () from /usr/lib/libglib-2.0.so.0
#68 0x00007ffa6f3b820c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#69 0x00007ffa74dbec8f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#70 0x00007ffa74d676fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#71 0x00007ffa74d6fb7c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#72 0x0000000000404956 in main (argc=1, argv=<optimized out>) at /home/raghu/kf5/src/krita/krita/main.cc:228

Reproducible: Couldn't Reproduce
Comment 1 wolthera 2016-05-05 12:17:56 UTC
https://phabricator.kde.org/T2430
Comment 2 Dmitry Kazakov 2016-05-06 08:54:15 UTC
Git commit 5ab2ed2f7b19d8be57f9408f88614c282f0abaa0 by Dmitry Kazakov.
Committed on 06/05/2016 at 08:54.
Pushed by dkazakov into branch 'master'.

Fix a crash when saving the image when autosave it ready to save

The crash happened because autosave decided to save at
the moment of time when the user has been saving the
image itself. And given that we save the image in a
background thread, autosave could easily do it.

Now SafeSignalLocker blocks not only the image, but also
a special lock that guard KisDocument from entering the
saving code twice.
Fixes T2430

M  +20   -0    libs/global/kis_global.h
A  +63   -0    libs/image/kis_image_barrier_lock_adapter.h     [License: GPL (v2+)]
M  +83   -68   libs/ui/KisDocument.cpp
M  +6    -6    libs/ui/KisDocument.h

http://commits.kde.org/krita/5ab2ed2f7b19d8be57f9408f88614c282f0abaa0
Comment 3 Raghavendra kamath 2016-05-08 12:44:46 UTC
this bug is still alive in 3.0.
if it matters my image is quiet big it is 5k by 7k 


this is the backtrace

Application: krita (krita), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f180daae840 (LWP 9939))]

Thread 6 (Thread 0x7f17ec10f700 (LWP 9941)):
#0  0x00007f1805430abd in poll () from /usr/lib/libc.so.6
#1  0x00007f180085d0fc in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f180085d20c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f1806267cab in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#4  0x00007f18062106fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#5  0x00007f1806039fe4 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#6  0x00007f1801679a55 in ?? () from /usr/lib/libQt5DBus.so.5
#7  0x00007f180603ede8 in ?? () from /usr/lib/libQt5Core.so.5
#8  0x00007f1801d2a474 in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007f1805439acd in clone () from /usr/lib/libc.so.6

Thread 5 (Thread 0x7f17d68df700 (LWP 9943)):
#0  0x00007f1801d3009f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f180603fc8b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQt5Core.so.5
#2  0x00007f1806038c3b in QSemaphore::acquire(int) () from /usr/lib/libQt5Core.so.5
#3  0x00007f180c65614d in KisTileDataPooler::waitForWork (this=0x7f180cb25b00 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /home/raghu/kf5/src/krita/libs/image/tiles3/kis_tile_data_pooler.cc:165
#4  KisTileDataPooler::run (this=0x7f180cb25b00 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /home/raghu/kf5/src/krita/libs/image/tiles3/kis_tile_data_pooler.cc:187
#5  0x00007f180603ede8 in ?? () from /usr/lib/libQt5Core.so.5
#6  0x00007f1801d2a474 in start_thread () from /usr/lib/libpthread.so.0
#7  0x00007f1805439acd in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7f17d60de700 (LWP 9944)):
#0  0x00007f180540977d in nanosleep () from /usr/lib/libc.so.6
#1  0x00007f18060eb08d in ?? () from /usr/lib/libQt5Core.so.5
#2  0x00007f180603e1f8 in QThread::msleep(unsigned long) () from /usr/lib/libQt5Core.so.5
#3  0x00007f180c67004a in KisTileDataSwapper::run (this=0x7f180cb25b40 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder+64>) at /home/raghu/kf5/src/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:97
#4  0x00007f180603ede8 in ?? () from /usr/lib/libQt5Core.so.5
#5  0x00007f1801d2a474 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007f1805439acd in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7f17d58dd700 (LWP 9946)):
#0  0x00007f1801d3009f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f180603fc8b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQt5Core.so.5
#2  0x00007f18071663a2 in ?? () from /usr/lib/libQt5Widgets.so.5
#3  0x00007f180603ede8 in ?? () from /usr/lib/libQt5Core.so.5
#4  0x00007f1801d2a474 in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007f1805439acd in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7f16e7f5f700 (LWP 11322)):
[KCrash Handler]
#5  KisKraSaver::saveBinaryData (this=0x35a2d000, store=store@entry=0x28164550, image=..., uri=..., external=external@entry=true, autosave=autosave@entry=true) at /home/raghu/kf5/src/krita/libs/ui/kra/kis_kra_saver.cpp:187
#6  0x00007f180d48ada5 in KisDocument::completeSaving (this=this@entry=0xb150060, store=store@entry=0x28164550) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:1711
#7  0x00007f180d48ee96 in KisDocument::saveNativeFormatCalligra (this=0xb150060, store=0x28164550) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:952
#8  0x00007f180d31ff9b in std::function<bool ()>::operator()() const (this=0x36f84470) at /usr/include/c++/5.3.0/functional:2267
#9  QtConcurrent::StoredFunctorCall0<bool, std::function<bool ()> >::runFunctor() (this=0x36f84450) at /usr/include/qt/QtConcurrent/qtconcurrentstoredfunctioncall.h:54
#10 QtConcurrent::RunFunctionTask<bool>::run (this=0x36f84450) at /usr/include/qt/QtConcurrent/qtconcurrentrunbase.h:102
#11 0x00007f180603b0d3 in ?? () from /usr/lib/libQt5Core.so.5
#12 0x00007f180603ede8 in ?? () from /usr/lib/libQt5Core.so.5
#13 0x00007f1801d2a474 in start_thread () from /usr/lib/libpthread.so.0
#14 0x00007f1805439acd in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f180daae840 (LWP 9939)):
#0  0x00007f1801d3009f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f180603fc8b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQt5Core.so.5
#2  0x00007f180603aa55 in QThreadPoolPrivate::waitForDone(int) () from /usr/lib/libQt5Core.so.5
#3  0x00007f180603acc1 in QThreadPool::waitForDone(int) () from /usr/lib/libQt5Core.so.5
#4  0x00007f180603acfc in QThreadPool::~QThreadPool() () from /usr/lib/libQt5Core.so.5
#5  0x00007f180603ad39 in ?? () from /usr/lib/libQt5Core.so.5
#6  0x00007f1805387be8 in __run_exit_handlers () from /usr/lib/libc.so.6
#7  0x00007f1805387c35 in exit () from /usr/lib/libc.so.6
#8  0x00007f18041986f5 in _XDefaultIOError () from /usr/lib/libX11.so.6
#9  0x00007f17fa92e4be in ?? () from /usr/lib/libQt5XcbQpa.so.5
#10 0x00007f180419891e in _XIOError () from /usr/lib/libX11.so.6
#11 0x00007f1804195c9f in ?? () from /usr/lib/libX11.so.6
#12 0x00007f18041964c9 in _XFlush () from /usr/lib/libX11.so.6
#13 0x00007f17ee953d33 in ?? () from /usr/lib/libGLX_nvidia.so.0
#14 0x00007f17f3df84d2 in ?? () from /usr/lib/qt/plugins/xcbglintegrations/libqxcb-glx-integration.so
#15 0x00007f1806796109 in QOpenGLContext::swapBuffers(QSurface*) () from /usr/lib/libQt5Gui.so.5
#16 0x00007f1806a1837b in ?? () from /usr/lib/libQt5Gui.so.5
#17 0x00007f1806a18b53 in QPlatformBackingStore::composeAndFlush(QWindow*, QRegion const&, QPoint const&, QPlatformTextureList*, QOpenGLContext*, bool) () from /usr/lib/libQt5Gui.so.5
#18 0x00007f17fa94ea77 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#19 0x00007f1806f40b64 in ?? () from /usr/lib/libQt5Widgets.so.5
#20 0x00007f1806f4195e in ?? () from /usr/lib/libQt5Widgets.so.5
#21 0x00007f1806f441dd in ?? () from /usr/lib/libQt5Widgets.so.5
#22 0x00007f1806f443bf in ?? () from /usr/lib/libQt5Widgets.so.5
#23 0x00007f1806f6282f in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQt5Widgets.so.5
#24 0x00007f1806f7ab28 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#25 0x00007f180708d0db in QMainWindow::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#26 0x00007f180968ff3a in KMainWindow::event (this=this@entry=0xa4822d0, ev=ev@entry=0x7fffd613f7d0) at /home/raghu/kf5/src/krita/libs/widgetutils/xmlgui/kmainwindow.cpp:780
#27 0x00007f18096cfaf9 in KXmlGuiWindow::event (this=0xa4822d0, ev=0x7fffd613f7d0) at /home/raghu/kf5/src/krita/libs/widgetutils/xmlgui/kxmlguiwindow.cpp:125
#28 0x00007f1806f3668c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#29 0x00007f1806f3b8f6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#30 0x00007f180d480057 in KisApplication::notify (this=<optimized out>, receiver=0xa4822d0, event=0x7fffd613f7d0) at /home/raghu/kf5/src/krita/libs/ui/KisApplication.cpp:502
#31 0x00007f1806212518 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#32 0x00007f1806f44ba5 in ?? () from /usr/lib/libQt5Widgets.so.5
#33 0x00007f1806f4592d in ?? () from /usr/lib/libQt5Widgets.so.5
#34 0x00007f1806f65268 in QWidget::repaint(QRect const&) () from /usr/lib/libQt5Widgets.so.5
#35 0x00007f18070d6586 in QStatusBar::hideOrShow() () from /usr/lib/libQt5Widgets.so.5
#36 0x00007f180d5434b5 in KisView::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7fffd613fa70) at /home/raghu/kf5/build/libs/ui/moc_KisView.cpp:149
#37 0x00007f180623e870 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#38 0x00007f180d491087 in KisDocument::slotAutoSave (this=0xb150060) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:828
#39 0x00007f180623e870 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#40 0x00007f180624b808 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt5Core.so.5
#41 0x00007f180623f613 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#42 0x00007f1806f3668c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#43 0x00007f1806f3b8f6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#44 0x00007f180d480057 in KisApplication::notify (this=<optimized out>, receiver=0xb2dd790, event=0x7fffd613ff50) at /home/raghu/kf5/src/krita/libs/ui/KisApplication.cpp:502
#45 0x00007f1806212518 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#46 0x00007f1806266b8e in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5
#47 0x00007f18062670b1 in ?? () from /usr/lib/libQt5Core.so.5
#48 0x00007f180085cf07 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#49 0x00007f180085d160 in ?? () from /usr/lib/libglib-2.0.so.0
#50 0x00007f180085d20c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#51 0x00007f1806267c8f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#52 0x00007f180d31fd0f in KisAsyncActionFeedback::runAction(std::function<bool ()>) (this=this@entry=0x7fffd61401e0, func=...) at /home/raghu/kf5/src/krita/libs/ui/kis_async_action_feedback.cpp:51
#53 0x00007f180d48f4dc in KisDocument::saveNativeFormat (this=this@entry=0xb150060, file=...) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:909
#54 0x00007f180d48ff4e in KisDocument::saveFile (this=0xb150060) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:676
#55 0x00007f180d4906f1 in KisDocument::save (this=this@entry=0xb150060) at /home/raghu/kf5/src/krita/libs/ui/KisDocument.cpp:2132
#56 0x00007f180d4b7195 in KisMainWindow::saveDocument (this=this@entry=0xa4822d0, document=0xb150060, saveas=saveas@entry=false, silent=silent@entry=false, specialOutputFlag=specialOutputFlag@entry=0) at /home/raghu/kf5/src/krita/libs/ui/KisMainWindow.cpp:1095
#57 0x00007f180d4b7e41 in KisMainWindow::slotFileSave (this=0xa4822d0) at /home/raghu/kf5/src/krita/libs/ui/KisMainWindow.cpp:1392
#58 0x00007f180d4bc916 in KisMainWindow::qt_static_metacall (_o=0xa4822d0, _c=<optimized out>, _id=<optimized out>, _a=0x7fffd6140ac0) at /home/raghu/kf5/build/libs/ui/moc_KisMainWindow.cpp:318
#59 0x00007f180623e870 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#60 0x00007f1806f2d3d2 in QAction::triggered(bool) () from /usr/lib/libQt5Widgets.so.5
#61 0x00007f1806f2fef0 in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQt5Widgets.so.5
#62 0x00007f1806f3084f in QAction::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#63 0x00007f1806f3668c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#64 0x00007f1806f3b8f6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#65 0x00007f180d480057 in KisApplication::notify (this=<optimized out>, receiver=0xb14e100, event=0x7fffd6140df0) at /home/raghu/kf5/src/krita/libs/ui/KisApplication.cpp:502
#66 0x00007f1806212518 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#67 0x00007f1806787826 in QShortcutMap::dispatchEvent(QKeyEvent*) () from /usr/lib/libQt5Gui.so.5
#68 0x00007f18067878d9 in QShortcutMap::tryShortcut(QKeyEvent*) () from /usr/lib/libQt5Gui.so.5
#69 0x00007f1806740716 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /usr/lib/libQt5Gui.so.5
#70 0x00007f1806758a14 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib/libQt5Gui.so.5
#71 0x00007f180675db65 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/libQt5Gui.so.5
#72 0x00007f180673ad6b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
#73 0x00007f17fa964e60 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#74 0x00007f180085cf07 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#75 0x00007f180085d160 in ?? () from /usr/lib/libglib-2.0.so.0
#76 0x00007f180085d20c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#77 0x00007f1806267c8f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#78 0x00007f18062106fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#79 0x00007f1806218b7c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#80 0x0000000000404956 in main (argc=1, argv=<optimized out>) at /home/raghu/kf5/src/krita/krita/main.cc:228
Comment 4 Dmitry Kazakov 2016-05-13 11:12:16 UTC
Git commit 1082ada7268ef49c4acf5d717075a63c0d3bdb12 by Dmitry Kazakov.
Committed on 13/05/2016 at 11:12.
Pushed by dkazakov into branch 'master'.

Fix some crashes/inconsistencies while saving the document

1) Deny double entry into the saving process
2) Don't try to save if the user has closed the waiting
   progress dialog. Otherwise it may cause a crash.
3) Make the saving progress bar modal. Otherwise it hides behind
   Krita window and the user sees a locked-up canvas.

Fixes T2430

M  +5    -4    libs/global/kis_global.h
M  +4    -4    libs/ui/KisDocument.cpp
M  +19   -0    libs/ui/KisMainWindow.cpp
M  +4    -1    libs/ui/dialogs/kis_delayed_save_dialog.cpp
M  +1    -1    libs/ui/kis_async_action_feedback.cpp

http://commits.kde.org/krita/1082ada7268ef49c4acf5d717075a63c0d3bdb12