Summary: | Krita crashed while saving [ probably due to trigger of autosave while save] | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Raghavendra kamath <raghu> |
Component: | Usability | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | griffinvalley |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/krita/1082ada7268ef49c4acf5d717075a63c0d3bdb12 | Version Fixed In: |
Description
Raghavendra kamath
2016-05-04 18:30:11 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 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 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 |