Bug 262941

Summary: Crash when opening a small png (could not reproduce on next attempt)
Product: [Applications] krita Reporter: Tim Richardson <tim>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: animtim, bugs_kde_org2, enrico_guarnieri, halla, sven.langkamp
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Tim Richardson 2011-01-12 13:08:22 UTC
Application: krita (2.3.0)
KDE Platform Version: 4.4.5 (KDE 4.4.5)
Qt Version: 4.6.3
Operating System: Linux 2.6.37-0.slh.2-aptosid-686 i686
Distribution: Debian GNU/Linux 6.0 (squeeze)

-- Information about the crash:
I opened a very small .png file from my local directory.
The next attempt to open the file succeeded. 


The crash can be reproduced some of the time.

 -- Backtrace:
Application: Krita (krita), signal: Segmentation fault
[Current thread is 1 (Thread 0xb47ad720 (LWP 5204))]

Thread 3 (Thread 0xb07a9b70 (LWP 5213)):
#0  0xb7803424 in __kernel_vsyscall ()
#1  0xb571af7f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb7775e0d in pthread_cond_wait () from /lib/i686/cmov/libc.so.6
#3  0xb664ffb7 in wait (this=0xaa95dcc, mutex=0xaa95dc8, time=4294967295) at thread/qwaitcondition_unix.cpp:87
#4  QWaitCondition::wait (this=0xaa95dcc, mutex=0xaa95dc8, time=4294967295) at thread/qwaitcondition_unix.cpp:159
#5  0xb664b9d2 in QSemaphore::acquire (this=0xac7a5e0, n=1) at thread/qsemaphore.cpp:142
#6  0xb27d9233 in ?? () from /usr/lib/libkritaimage.so.8
#7  0xb27d9493 in ?? () from /usr/lib/libkritaimage.so.8
#8  0xb664efbe in QThreadPrivate::start (arg=0xac7a5d8) at thread/qthread_unix.cpp:248
#9  0xb5716955 in start_thread () from /lib/i686/cmov/libpthread.so.0
#10 0xb7768e7e in clone () from /lib/i686/cmov/libc.so.6

Thread 2 (Thread 0xaffa8b70 (LWP 5214)):
#0  0xb7803424 in __kernel_vsyscall ()
#1  0xb571af7f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb7775e0d in pthread_cond_wait () from /lib/i686/cmov/libc.so.6
#3  0xb664ffb7 in wait (this=0xac61d5c, mutex=0xac61d58, time=4294967295) at thread/qwaitcondition_unix.cpp:87
#4  QWaitCondition::wait (this=0xac61d5c, mutex=0xac61d58, time=4294967295) at thread/qwaitcondition_unix.cpp:159
#5  0xb664b7d2 in QSemaphore::tryAcquire (this=0xac9a1c8, n=1, timeout=-1) at thread/qsemaphore.cpp:219
#6  0xb27f60b0 in KisTileDataSwapper::waitForWork() () from /usr/lib/libkritaimage.so.8
#7  0xb27f60f4 in KisTileDataSwapper::run() () from /usr/lib/libkritaimage.so.8
#8  0xb664efbe in QThreadPrivate::start (arg=0xac7a5f4) at thread/qthread_unix.cpp:248
#9  0xb5716955 in start_thread () from /lib/i686/cmov/libpthread.so.0
#10 0xb7768e7e in clone () from /lib/i686/cmov/libc.so.6

Thread 1 (Thread 0xb47ad720 (LWP 5204)):
[KCrash Handler]
#6  0x0acb1f88 in ?? ()
#7  0xb2a277b8 in KisShapeController::setImage(KisWeakSharedPtr<KisImage>) () from /usr/lib/libkritaui.so.8
#8  0xb2a75176 in KisDoc2::setCurrentImage(KisWeakSharedPtr<KisImage>) () from /usr/lib/libkritaui.so.8
#9  0xb0fb6b9f in ?? () from /usr/lib/kde4/kritapngimport.so
#10 0xb761d328 in ?? () from /usr/lib/libkomain.so.8
#11 0xb761354d in KoFilterChain::invokeChain() () from /usr/lib/libkomain.so.8
#12 0xb7611495 in KoFilterManager::importDocument(QString const&, KoFilter::ConversionStatus&) () from /usr/lib/libkomain.so.8
#13 0xb75c05f6 in KoDocument::openFile() () from /usr/lib/libkomain.so.8
#14 0xb64c5ca9 in KParts::ReadOnlyPart::openUrl (this=0x9e37208, url=...) at ../../kparts/part.cpp:557
#15 0xb75bfd91 in KoDocument::openUrl(KUrl const&) () from /usr/lib/libkomain.so.8
#16 0xb75b5e79 in KoDocument::openExistingFile(KUrl const&) () from /usr/lib/libkomain.so.8
#17 0xb2a74e5c in KisDoc2::openExistingFile(KUrl const&) () from /usr/lib/libkritaui.so.8
#18 0xb2a79b20 in KisDoc2::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkritaui.so.8
#19 0xb67507aa in QMetaObject::metacall (object=0x9e37208, cl=3061196259, idx=44, argv=0xbfcc5e98) at kernel/qmetaobject.cpp:237
#20 0xb675f1bb in QMetaObject::activate (sender=0xaa76030, m=0xb76988c8, local_signal_index=0, argv=0xbfcc5e98) at kernel/qobject.cpp:3295
#21 0xb7630283 in ?? () from /usr/lib/libkomain.so.8
#22 0xb76307bd in ?? () from /usr/lib/libkomain.so.8
#23 0xb67507aa in QMetaObject::metacall (object=0xaa76030, cl=3061196259, idx=0, argv=0xbfcc5fc8) at kernel/qmetaobject.cpp:237
#24 0xb675f1bb in QMetaObject::activate (sender=0xaa5bf50, m=0xb76987a8, local_signal_index=0, argv=0xbfcc5fc8) at kernel/qobject.cpp:3295
#25 0xb762f963 in ?? () from /usr/lib/libkomain.so.8
#26 0xb762fa1f in ?? () from /usr/lib/libkomain.so.8
#27 0xb762fac0 in ?? () from /usr/lib/libkomain.so.8
#28 0xb67507aa in QMetaObject::metacall (object=0xaa5bf50, cl=3061196259, idx=-1077125128, argv=0xaa5bf50) at kernel/qmetaobject.cpp:237
#29 0xb675f1bb in QMetaObject::activate (sender=0xaa7b0c8, m=0xb641a470, local_signal_index=6, argv=0x0) at kernel/qobject.cpp:3295
#30 0xb63d3447 in KFileWidget::accepted (this=0xaa7b0c8) at ./kfilewidget.moc:209
#31 0xb63e4d2e in KFileWidget::slotOk (this=0xaa7b0c8) at ../../kfile/kfilewidget.cpp:997
#32 0xb63d8bfc in KFileWidgetPrivate::_k_fileSelected (this=0xa5284f8, i=...) at ../../kfile/kfilewidget.cpp:1104
#33 0xb63e36e8 in KFileWidget::qt_metacall (this=0xaa7b0c8, _c=QMetaObject::InvokeMetaMethod, _id=44, _a=0xbfcc6488) at ./kfilewidget.moc:145
#34 0xb67507aa in QMetaObject::metacall (object=0xaa7b0c8, cl=3061196259, idx=44, argv=0xbfcc6488) at kernel/qmetaobject.cpp:237
#35 0xb675f1bb in QMetaObject::activate (sender=0xaaa2ec0, m=0xb6419ab4, local_signal_index=7, argv=0xbfcc6488) at kernel/qobject.cpp:3295
#36 0xb63b7ac3 in KDirOperator::fileSelected (this=0xaaa2ec0, _t1=...) at ./kdiroperator.moc:322
#37 0xb63b8639 in KDirOperator::selectFile (this=0xaaa2ec0, item=...) at ../../kfile/kdiroperator.cpp:1718
#38 0xb63b87a1 in KDirOperator::Private::_k_slotActivated (this=0xaaa3628, index=...) at ../../kfile/kdiroperator.cpp:2365
#39 0xb63c46d5 in KDirOperator::qt_metacall (this=0xaaa2ec0, _c=QMetaObject::InvokeMetaMethod, _id=59, _a=0xbfcc6638) at ./kdiroperator.moc:251
#40 0xb67507aa in QMetaObject::metacall (object=0xaaa2ec0, cl=3061196259, idx=86, argv=0xbfcc6638) at kernel/qmetaobject.cpp:237
#41 0xb675f1bb in QMetaObject::activate (sender=0xaadf4e0, m=0xb7547ea4, local_signal_index=3, argv=0xbfcc6638) at kernel/qobject.cpp:3295
#42 0xb71ab963 in QAbstractItemView::activated (this=0xaadf4e0, _t1=...) at .moc/release-shared/moc_qabstractitemview.cpp:345
#43 0xb71aee87 in QAbstractItemView::mouseDoubleClickEvent (this=0xaadf4e0, event=0xbfcc7034) at itemviews/qabstractitemview.cpp:1820
#44 0xb6c7264e in QWidget::event (this=0xaadf4e0, event=0xbfcc7034) at kernel/qwidget.cpp:8048
#45 0xb706c8d3 in QFrame::event (this=0xaadf4e0, e=0xbfcc7034) at widgets/qframe.cpp:557
#46 0xb7107092 in QAbstractScrollArea::viewportEvent (this=0xb67625e3, e=0xac7b6f0) at widgets/qabstractscrollarea.cpp:1036
#47 0xb71bc8a7 in QAbstractItemView::viewportEvent (this=0xaadf4e0, event=0xbfcc7034) at itemviews/qabstractitemview.cpp:1615
#48 0xb7109a65 in viewportEvent (this=0xaa9d0a8, o=0xaae0ce8, e=0xbfcc7034) at widgets/qabstractscrollarea_p.h:100
#49 QAbstractScrollAreaFilter::eventFilter (this=0xaa9d0a8, o=0xaae0ce8, e=0xbfcc7034) at widgets/qabstractscrollarea_p.h:116
#50 0xb674a76a in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x9ca97b8, receiver=0xaae0ce8, event=0xbfcc7034) at kernel/qcoreapplication.cpp:841
#51 0xb6c145a9 in QApplicationPrivate::notify_helper (this=0x9ca97b8, receiver=0xaae0ce8, e=0xbfcc7034) at kernel/qapplication.cpp:4298
#52 0xb6c1baf7 in QApplication::notify (this=0xbfcc7630, receiver=0xaae0ce8, e=0xbfcc7034) at kernel/qapplication.cpp:3867
#53 0xb59d6bfa in KApplication::notify (this=0xbfcc7630, receiver=0xaae0ce8, event=0xbfcc7034) at ../../kdeui/kernel/kapplication.cpp:302
#54 0xb674b4cb in QCoreApplication::notifyInternal (this=0xbfcc7630, receiver=0xaae0ce8, event=0xbfcc7034) at kernel/qcoreapplication.cpp:726
#55 0xb6c1aa52 in sendEvent (receiver=0xaae0ce8, event=0xbfcc7034, alienWidget=0xaae0ce8, nativeWidget=0x9da02f0, buttonDown=0xb755c998, lastMouseReceiver=..., spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#56 QApplicationPrivate::sendMouseEvent (receiver=0xaae0ce8, event=0xbfcc7034, alienWidget=0xaae0ce8, nativeWidget=0x9da02f0, buttonDown=0xb755c998, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:2967
#57 0xb6ca5d4c in QETWidget::translateMouseEvent (this=0x9da02f0, event=0xbfcc748c) at kernel/qapplication_x11.cpp:4380
#58 0xb6ca5253 in QApplication::x11ProcessEvent (this=0xbfcc7630, event=0xbfcc748c) at kernel/qapplication_x11.cpp:3391
#59 0xb6cd3dab in QEventDispatcherX11::processEvents (this=0x9c89db8, flags=...) at kernel/qeventdispatcher_x11.cpp:132
#60 0xb6749ae9 in QEventLoop::processEvents (this=0xbfcc75c4, flags=) at kernel/qeventloop.cpp:149
#61 0xb6749f3a in QEventLoop::exec (this=0xbfcc75c4, flags=...) at kernel/qeventloop.cpp:201
#62 0xb674f16f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003
#63 0xb6c14667 in QApplication::exec () at kernel/qapplication.cpp:3581
#64 0xb77ff3dd in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_krita.so
#65 0x080485fb in _start ()

Possible duplicates by query: bug 216781.

Reported using DrKonqi
Comment 1 Halla Rempt 2011-01-19 21:06:00 UTC
Thanks for your report! I'm beginning to wonder whether this is one of the subtle bugs that can occur if you create an image, open the template page again (with ctrl-n) and then press ctrl-o for open or something like that. We have some bugs with backtraces similar to yours.
Comment 2 Halla Rempt 2011-01-19 21:08:20 UTC
*** Bug 263231 has been marked as a duplicate of this bug. ***
Comment 3 Halla Rempt 2011-01-19 21:12:08 UTC
*** Bug 262417 has been marked as a duplicate of this bug. ***
Comment 4 Halla Rempt 2011-01-19 21:12:38 UTC
*** Bug 262581 has been marked as a duplicate of this bug. ***
Comment 5 Halla Rempt 2011-01-19 21:13:28 UTC
*** Bug 263382 has been marked as a duplicate of this bug. ***
Comment 6 Halla Rempt 2011-01-19 21:15:52 UTC
*** Bug 263668 has been marked as a duplicate of this bug. ***
Comment 7 Sven Langkamp 2011-01-22 13:26:36 UTC
*** Bug 263964 has been marked as a duplicate of this bug. ***
Comment 8 Sven Langkamp 2011-01-22 15:36:56 UTC
Git commit 131b513a8ab1349d19d43aaa352946d760924416 by Sven Langkamp
Pushed by langkamp into branch master

don't open a new document when deleting the open pane after a close event
CCBUG:262941

M  +5    -3    libs/main/KoDocument.cpp     
M  +1    -1    libs/main/KoDocument.h     
M  +1    -1    libs/main/KoMainWindow.cpp     

http://commits.kde.org/47e7010d/131b513a8ab1349d19d43aaa352946d760924416
Comment 9 Sven Langkamp 2011-01-22 15:59:33 UTC
I have fixed the crash on closing the open dialog without doing anything, but I doubt that fixes some of the cases that have be added as duplicates. Can you update and check if it's fixed with master?
Comment 10 Ico_dY 2011-01-22 16:33:38 UTC
(In reply to comment #9)
> I have fixed the crash on closing the open dialog without doing anything, but I
> doubt that fixes some of the cases that have be added as duplicates. Can you
> update and check if it's fixed with master?

I've just tested the fix and now this bug and duplicates are solved except for bug 263382.
Comment 11 Halla Rempt 2011-01-31 13:55:27 UTC
SVN commit 1218114 by rempt:

Backport commit 131b513a8ab1349d19d43aaa352946d760924416

don't open a new document when deleting the open pane after a close event
CCBUG:262941



 M  +4 -3      KoDocument.cpp  
 M  +1 -1      KoDocument.h  
 M  +1 -1      KoMainWindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1218114
Comment 12 Sven Langkamp 2011-02-12 16:45:36 UTC
*** Bug 265876 has been marked as a duplicate of this bug. ***
Comment 13 Sven Langkamp 2011-02-12 16:48:14 UTC
*** Bug 265081 has been marked as a duplicate of this bug. ***