Bug 232524 - Q_ASSERT(!m_numTiles) while painting
Summary: Q_ASSERT(!m_numTiles) while painting
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
: 233660 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-29 02:25 UTC by Sven Langkamp
Modified: 2018-01-17 10:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Langkamp 2010-03-29 02:25:34 UTC
Application: krita (2.2 Beta 1)
KDE Platform Version: 4.4.1 (KDE 4.4.1)
Qt Version: 4.6.2
Operating System: Linux 2.6.32.9-70.fc12.i686 i686
Distribution (Platform): Fedora RPMs

-- Information about the crash:
This assert appears while painting. It sometimes needs lots of strokes to happen, text brush seems to be good to trigger it.
I check the value of m_numTiles and it's usually between one and three when asserting.

The crash can be reproduced every time.

 -- Backtrace:
Application: Krita (krita), signal: Aborted
[Current thread is 1 (Thread 0xb77c9b50 (LWP 26713))]

Thread 3 (Thread 0xb7469b70 (LWP 26714)):
#0  0x00bce416 in __kernel_vsyscall ()
#1  0x00c13c45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x060f2b7f in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x060ef32d in QSemaphore::acquire(int) () from /usr/lib/libQtCore.so.4
#4  0x00dfff6a in KisTileDataPooler::waitForWork (this=0xf98ba0) at /home/sven/kde/src/koffice/krita/image/tiles3/kis_tile_data_pooler.cc:133
#5  0x00dfffd9 in KisTileDataPooler::run (this=0xf98ba0) at /home/sven/kde/src/koffice/krita/image/tiles3/kis_tile_data_pooler.cc:162
#6  0x060f1cdf in ?? () from /usr/lib/libQtCore.so.4
#7  0x00c0fab5 in start_thread () from /lib/libpthread.so.0
#8  0x08c0bdce in clone () from /lib/libc.so.6

Thread 2 (Thread 0xb5317b70 (LWP 26719)):
[KCrash Handler]
#6  0x00bce416 in __kernel_vsyscall ()
#7  0x08b5ba91 in raise () from /lib/libc.so.6
#8  0x08b5d35a in abort () from /lib/libc.so.6
#9  0x060ea7ec in qt_message_output(QtMsgType, char const*) () from /usr/lib/libQtCore.so.4
#10 0x060ea9cc in ?? () from /usr/lib/libQtCore.so.4
#11 0x060eaaea in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#12 0x060eab76 in qt_assert(char const*, char const*, int) () from /usr/lib/libQtCore.so.4
#13 0x00e0a392 in KisTileHashTableTraits<KisMementoItem>::clear (this=0xb481f13c) at /home/sven/kde/src/koffice/krita/image/tiles3/kis_tile_hash_table_p.h:225
#14 0x00e08fd9 in KisTileHashTableTraits<KisMementoItem>::~KisTileHashTableTraits (this=0xb481f13c, __in_chrg=<value optimized out>)
    at /home/sven/kde/src/koffice/krita/image/tiles3/kis_tile_hash_table_p.h:75
#15 0x00e06782 in KisMementoManager::~KisMementoManager (this=0xb481f130, __in_chrg=<value optimized out>) at /home/sven/kde/src/koffice/krita/image/tiles3/kis_memento_manager.cc:81
#16 0x00e0147e in KisTiledDataManager::~KisTiledDataManager (this=0xb4830480, __in_chrg=<value optimized out>) at /home/sven/kde/src/koffice/krita/image/tiles3/kis_tiled_data_manager.cc:96
#17 0x00e99867 in KisDataManager::~KisDataManager (this=0xb4830480, __in_chrg=<value optimized out>) at /home/sven/kde/src/koffice/krita/image/kis_datamanager.h:48
#18 0x00e998d2 in KisSharedPtr<KisDataManager>::deref (sp=0xb485cca0, t=0xb4830480) at /home/sven/kde/src/koffice/krita/image/kis_shared_ptr.h:220
#19 0x00e98cf8 in KisSharedPtr<KisDataManager>::deref (this=0xb485cca0) at /home/sven/kde/src/koffice/krita/image/kis_shared_ptr.h:227
#20 0x00e97b79 in KisSharedPtr<KisDataManager>::~KisSharedPtr (this=0xb485cca0, __in_chrg=<value optimized out>) at /home/sven/kde/src/koffice/krita/image/kis_shared_ptr.h:107
#21 0x00e915fc in KisPaintDevice::~KisPaintDevice (this=0xb485cc90, __in_chrg=<value optimized out>) at /home/sven/kde/src/koffice/krita/image/kis_paint_device.cc:185
#22 0x00e9169f in KisPaintDevice::~KisPaintDevice (this=0xb485cc90, __in_chrg=<value optimized out>) at /home/sven/kde/src/koffice/krita/image/kis_paint_device.cc:185
#23 0x00e23e0f in KisSharedPtr<KisPaintDevice>::deref (sp=0x97e6e6c, t=0xb485cc90) at /home/sven/kde/src/koffice/krita/image/kis_shared_ptr.h:220
#24 0x00e22f92 in KisSharedPtr<KisPaintDevice>::attach (this=0x97e6e6c, p=0x0) at /home/sven/kde/src/koffice/krita/image/kis_shared_ptr.h:400
#25 0x00e459bc in KisSharedPtr<KisPaintDevice>::operator= (this=0x97e6e6c, p=0x0) at /home/sven/kde/src/koffice/krita/image/kis_shared_ptr.h:131
#26 0x00e80bb5 in KisLayer::updateProjection (this=0x97e6d80, rect=...) at /home/sven/kde/src/koffice/krita/image/kis_layer.cc:361
#27 0x00eb49e5 in KisAsyncMerger::startMerge (this=0xb5316bb4, walker=...) at /home/sven/kde/src/koffice/krita/image/kis_async_merger.h:197
#28 0x00eb257a in KisImageUpdater::startUpdate (this=0x91fff38, node=..., rc=..., cropRect=...) at /home/sven/kde/src/koffice/krita/image/kis_projection.cc:207
#29 0x00eb2a31 in KisImageUpdater::qt_metacall (this=0x91fff38, _c=InvokeMetaMethod, _id=1, _a=0xb24b6220) at /home/sven/kde/build/koffice/krita/image/kis_projection.moc:156
#30 0x061ec5db in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#31 0x061f6bd7 in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/libQtCore.so.4
#32 0x061f7c4e in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#33 0x067c7d2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#34 0x067ce556 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#35 0x0742b7db in KApplication::notify (this=0xbf8aa9b4, receiver=0x91fff38, event=0xb2370d90) at /usr/src/debug/kdelibs-4.4.1/kdeui/kernel/kapplication.cpp:302
#36 0x061e7c03 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#37 0x061e8ac3 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#38 0x06212c2b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#39 0x061e62da in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#40 0x061e661a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#41 0x060ef909 in QThread::exec() () from /usr/lib/libQtCore.so.4
#42 0x00eb1b59 in KisProjection::run (this=0x960cef8) at /home/sven/kde/src/koffice/krita/image/kis_projection.cc:86
#43 0x060f1cdf in ?? () from /usr/lib/libQtCore.so.4
#44 0x00c0fab5 in start_thread () from /lib/libpthread.so.0
#45 0x08c0bdce in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb77c9b50 (LWP 26713)):
#0  0x00bce416 in __kernel_vsyscall ()
#1  0x08c013d6 in poll () from /lib/libc.so.6
#2  0x00d870c0 in ?? () from /usr/lib/libxcb.so.1
#3  0x00d8762b in ?? () from /usr/lib/libxcb.so.1
#4  0x00d879c8 in xcb_writev () from /usr/lib/libxcb.so.1
#5  0x00c88d59 in _XSend () from /usr/lib/libX11.so.6
#6  0x00c7502d in ?? () from /usr/lib/libX11.so.6
#7  0x00c7520d in XPutImage () from /usr/lib/libX11.so.6
#8  0x068bc7a6 in QX11PixmapData::fromImage(QImage const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib/libQtGui.so.4
#9  0x068a8528 in QPixmap::fromImage(QImage const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib/libQtGui.so.4
#10 0x0690b71e in QPaintEngine::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib/libQtGui.so.4
#11 0x069c76c1 in ?? () from /usr/lib/libQtGui.so.4
#12 0x06925e96 in QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib/libQtGui.so.4
#13 0x001a59e7 in QPainter::drawImage (this=0xbf8a95f4, targetRect=..., image=..., sourceRect=..., flags=...) at /usr/include/QtGui/qpainter.h:859
#14 0x001a508f in KisQPainterCanvas::paintEvent (this=0xa3cdaa0, ev=0xbf8a9cf4) at /home/sven/kde/src/koffice/krita/ui/canvas/kis_qpainter_canvas.cpp:176
#15 0x0681a9eb in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#16 0x067c7d2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#17 0x067ce5f1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#18 0x0742b7db in KApplication::notify (this=0xbf8aa9b4, receiver=0xa3cdaa0, event=0xbf8a9cf4) at /usr/src/debug/kdelibs-4.4.1/kdeui/kernel/kapplication.cpp:302
#19 0x061e7c03 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#20 0x06823327 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQtGui.so.4
#21 0x069e2150 in ?? () from /usr/lib/libQtGui.so.4
#22 0x068143b3 in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQtGui.so.4
#23 0x0681b1ae in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#24 0x06c05ad7 in QMainWindow::event(QEvent*) () from /usr/lib/libQtGui.so.4
#25 0x0750a554 in KMainWindow::event (this=0x91e3c68, ev=0xa846910) at /usr/src/debug/kdelibs-4.4.1/kdeui/widgets/kmainwindow.cpp:1103
#26 0x0754b7a0 in KXmlGuiWindow::event (this=0x91e3c68, ev=0xa846910) at /usr/src/debug/kdelibs-4.4.1/kdeui/xmlgui/kxmlguiwindow.cpp:131
#27 0x067c7d2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#28 0x067ce5f1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#29 0x0742b7db in KApplication::notify (this=0xbf8aa9b4, receiver=0x91e3c68, event=0xa846910) at /usr/src/debug/kdelibs-4.4.1/kdeui/kernel/kapplication.cpp:302
#30 0x061e7c03 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#31 0x061e8ac3 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#32 0x06212c2b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0x06876f62 in ?? () from /usr/lib/libQtGui.so.4
#34 0x061e62da in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#35 0x061e661a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#36 0x061e8ce7 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#37 0x067c7dd8 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#38 0x00b30ad7 in kdemain (argc=1, argv=0xbf8aaac4) at /home/sven/kde/src/koffice/krita/main.cc:49
#39 0x080487b9 in main (argc=1, argv=0xbf8aaac4) at /home/sven/kde/build/koffice/krita/krita_dummy.cpp:3

Reported using DrKonqi
Comment 1 Sven Langkamp 2010-04-08 00:00:17 UTC
*** Bug 233660 has been marked as a duplicate of this bug. ***
Comment 2 Dmitry Kazakov 2010-04-17 11:11:56 UTC
SVN commit 1115720 by dkazakov:

Fixed an Q_ASSERT(!m_numTiles) bug

There was a race condition in a copy-constructor of the hash
table. The source table should have been locked first to get a safe
clone.
BUG:232524


 M  +2 -1      kis_tile_hash_table.h  
 M  +31 -0     kis_tile_hash_table_p.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1115720