Bug 347615

Summary: Crash when closing a secondary view of a document in a secondary window
Product: [Applications] krita Reporter: Jonathan Ringstad <jwringstad>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: halla, lamentisimo
Priority: NOR Keywords: drkonqi
Version First Reported In: 2.9.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: backtrace from crash

Description Jonathan Ringstad 2015-05-12 15:17:11 UTC
Application: krita (2.9.4)
KDE Platform Version: 4.14.7
Qt Version: 4.8.6
Operating System: Linux 4.0.1-1-ARCH x86_64
Distribution: "Arch Linux"

-- Information about the crash:
- What I was doing when the application crashed:
1. Open two documents, untitled, unsaved, modified.
2. Create a secondary window, put it on secondary screen
3. In secondary window, open a view of one of the two existing documents with no name
4. Close the view that was just created
5. Krita may crash

If the crash does not occur immediately, try creating yet another view in the newly opened window -- that seems to reproduce the crash 100% of the time.

The crash can be reproduced sometimes.

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

Thread 11 (Thread 0x7fb283076700 (LWP 15172)):
#0  0x00007fb2a91bf9af in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fb2aeba4866 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb2aeba069b in QSemaphore::acquire(int) () from /usr/lib/libQtCore.so.4
#3  0x00007fb2ab9dc30e in ?? () from /usr/lib/libkritaimage.so.14
#4  0x00007fb2ab9dc737 in ?? () from /usr/lib/libkritaimage.so.14
#5  0x00007fb2aeba430f in ?? () from /usr/lib/libQtCore.so.4
#6  0x00007fb2a91ba374 in start_thread () from /usr/lib/libpthread.so.0
#7  0x00007fb2ae34827d in clone () from /usr/lib/libc.so.6

Thread 10 (Thread 0x7fb281873700 (LWP 15173)):
#0  0x00007fb2a91bf9af in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fb2aeba4866 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb2aeba0ad3 in QSemaphore::tryAcquire(int, int) () from /usr/lib/libQtCore.so.4
#3  0x00007fb2ab9f6e5a in KisTileDataSwapper::run() () from /usr/lib/libkritaimage.so.14
#4  0x00007fb2aeba430f in ?? () from /usr/lib/libQtCore.so.4
#5  0x00007fb2a91ba374 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007fb2ae34827d in clone () from /usr/lib/libc.so.6

Thread 9 (Thread 0x7fb28cfc4700 (LWP 15175)):
#0  0x00007fb2a91bf9af in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fb2aeba4866 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb2afbd7075 in ?? () from /usr/lib/libQtGui.so.4
#3  0x00007fb2aeba430f in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007fb2a91ba374 in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007fb2ae34827d in clone () from /usr/lib/libc.so.6

Thread 8 (Thread 0x7fb282875700 (LWP 15176)):
#0  0x00007fb2ae3411b3 in select () from /usr/lib/libc.so.6
#1  0x00007fb2aecdb0e1 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/libQtCore.so.4
#2  0x00007fb2aece0b8f in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/libQtCore.so.4
#3  0x00007fb2aece1054 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007fb2aecad9a1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007fb2aecadd05 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007fb2aeba1aa9 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007fb2aec8e263 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007fb2aeba430f in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007fb2a91ba374 in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007fb2ae34827d in clone () from /usr/lib/libc.so.6

Thread 7 (Thread 0x7fb253fff700 (LWP 18044)):
#0  0x00007fb2a91bfd58 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fb2aeba4844 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb2aeb97b25 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007fb2aeba430f in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007fb2a91ba374 in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007fb2ae34827d in clone () from /usr/lib/libc.so.6

Thread 6 (Thread 0x7fb25d977700 (LWP 18045)):
#0  0x00007fb2a91bfd58 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fb2aeba4844 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb2aeb97b25 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007fb2aeba430f in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007fb2a91ba374 in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007fb2ae34827d in clone () from /usr/lib/libc.so.6

Thread 5 (Thread 0x7fb26147c700 (LWP 18046)):
#0  0x00007fb2a91bfd58 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fb2aeba4844 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb2aeb97b25 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007fb2aeba430f in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007fb2a91ba374 in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007fb2ae34827d in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7fb25fa79700 (LWP 18049)):
#0  0x00007fb2a91bfd58 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fb2aeba4844 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb2aeb97b25 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007fb2aeba430f in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007fb2a91ba374 in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007fb2ae34827d in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7fb260c7b700 (LWP 18050)):
#0  0x00007fb2a91bf9af in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fb2aeba4866 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb2afbd7075 in ?? () from /usr/lib/libQtGui.so.4
#3  0x00007fb2aeba430f in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007fb2a91ba374 in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007fb2ae34827d in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fb26027a700 (LWP 18051)):
#0  0x00007fb2ae3411b3 in select () from /usr/lib/libc.so.6
#1  0x00007fb2aecdb0e1 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/libQtCore.so.4
#2  0x00007fb2aece0b8f in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/libQtCore.so.4
#3  0x00007fb2aece1054 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007fb2aecad9a1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007fb2aecadd05 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007fb2aeba1aa9 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007fb2aec8e263 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007fb2aeba430f in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007fb2a91ba374 in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007fb2ae34827d in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7fb2b0e2e7c0 (LWP 15164)):
[KCrash Handler]
#6  0x000000000715bd00 in ?? ()
#7  0x00007fb2b05c2ce7 in KisPaintingAssistantsDecoration::drawDecoration(QPainter&, QRectF const&, KisCoordinatesConverter const*, KisCanvas2*) () from /usr/lib/libkritaui.so.14
#8  0x00007fb2b04a9429 in KisCanvasDecoration::paint(QPainter&, QRectF const&, KisCoordinatesConverter const*, KisCanvas2*) () from /usr/lib/libkritaui.so.14
#9  0x00007fb2b049b325 in KisCanvasWidgetBase::drawDecorations(QPainter&, QRect const&) const () from /usr/lib/libkritaui.so.14
#10 0x00007fb2b06541ad in KisOpenGLCanvas2::renderDecorations(QPainter*) () from /usr/lib/libkritaui.so.14
#11 0x00007fb2b065582f in KisOpenGLCanvas2::paintGL() () from /usr/lib/libkritaui.so.14
#12 0x00007fb2ac2f6285 in QGLWidget::glDraw() () from /usr/lib/libQtOpenGL.so.4
#13 0x00007fb2ac2f5d6d in QGLWidget::paintEvent(QPaintEvent*) () from /usr/lib/libQtOpenGL.so.4
#14 0x00007fb2af71dc68 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#15 0x00007fb2ac2ffdd1 in QGLWidget::event(QEvent*) () from /usr/lib/libQtOpenGL.so.4
#16 0x00007fb2af6ca9fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#17 0x00007fb2af6d1458 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#18 0x00007fb2b073a8a7 in KisApplication::notify(QObject*, QEvent*) () from /usr/lib/libkritaui.so.14
#19 0x00007fb2aecaee4d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#20 0x00007fb2af71833d in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQtGui.so.4
#21 0x00007fb2af8e715d in QWidgetPrivate::repaint_sys(QRegion const&) () from /usr/lib/libQtGui.so.4
#22 0x00007fb2af70ca17 in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQtGui.so.4
#23 0x00007fb2af71dd38 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#24 0x00007fb2ac2ffdd1 in QGLWidget::event(QEvent*) () from /usr/lib/libQtOpenGL.so.4
#25 0x00007fb2af6ca9fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#26 0x00007fb2af6d1458 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#27 0x00007fb2b073a8a7 in KisApplication::notify(QObject*, QEvent*) () from /usr/lib/libkritaui.so.14
#28 0x00007fb2aecaee4d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#29 0x00007fb2aecb2211 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#30 0x00007fb2af76ea9c in ?? () from /usr/lib/libQtGui.so.4
#31 0x00007fb2aecad9a1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#32 0x00007fb2aecadd05 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0x00007fb2aecb32a9 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#34 0x00000000004026b6 in ?? ()
#35 0x00007fb2ae280800 in __libc_start_main () from /usr/lib/libc.so.6
#36 0x0000000000402bf9 in _start ()

Possible duplicates by query: bug 342101.

Reported using DrKonqi
Comment 1 Halla Rempt 2015-05-15 09:40:03 UTC
Hm, no, I didn't get any crash. I was able to close all modified, unamed views on all documents without being asked whether I wanted to save, though, which is also really bad.
Comment 2 Jonathan Ringstad 2015-05-15 09:43:48 UTC
If it doesn't repro immediately, try opening and closing views in the secondary window a few times. That tends to reproduce it 100% reliably for me.

I can recompile with debug symbols and attach a better trace.
Comment 3 Jonathan Ringstad 2015-05-15 10:18:37 UTC
Created attachment 92613 [details]
backtrace from crash
Comment 4 Jonathan Ringstad 2015-05-15 10:22:02 UTC
I noticed that when the assistant is turned off, the crash does not occur. The backtrace also seems to hint at the assistance being at fault.
Comment 5 Halla Rempt 2015-05-20 12:33:25 UTC
Hm, no, sorry -- I still haven't got the sequence right that reproduces the issue. Could you try to reproduce with debug symbols installed?
Comment 6 tokiedian 2015-11-05 16:56:32 UTC
I have an similar problem with krita in my windows 8.1. Make two documents in tab, switch krita to subwindow mode, click one subwindow then click the other and krita will crush.
Comment 7 Halla Rempt 2016-03-19 15:16:18 UTC
Okay, I can confirm with current git master.
Comment 8 tokiedian 2016-04-17 16:57:23 UTC
I've confirmed the bug has resolved in 3.0 alpha1 (2.99.89) on ,my windows 8.1.
Comment 9 Halla Rempt 2016-04-17 17:43:35 UTC
yay!