Tile crashes

Adrian Page adrian at pagenet.plus.com
Sun Feb 26 00:26:20 CET 2006


I'm getting repeatable crashes in the tile deletion code. If I start 
krita and from the initial dialog create a new document which is 
3000x1281 8-bit rgba, I get the following crashes. If I create a 
3000x1280 or smaller 8-bit rgba, it's fine.

I have my performance settings set to keep 50000 tiles in memory and 
with the minimum swappiness, though changing those doesn't affect the 
results.

==6447== Invalid free() / delete / delete[]
==6447==    at 0x11B1D3A3: operator delete[](void*) (in 
/usr/lib64/valgrind/vgpreload_memcheck.so)
==6447==    by 0x18479F26: KisTileManager::dontNeedTileData(unsigned 
char*, int) (kis_tilemanager.cc:386)
==6447==    by 0x184764B1: KisTile::~KisTile() (kis_tile.cc:93)
==6447==    by 0x18473D9A: KisTiledDataManager::~KisTiledDataManager() 
(kis_tileddatamanager.cc:120)
==6447==    by 0x18466F7A: KisDataManager::~KisDataManager() 
(kis_paint_device.cc:74)
==6447==    by 0x11DCF381: KShared::_KShared_unref() const (ksharedptr.h:68)
==6447==    by 0x18160473: KSharedPtr<KisDataManager>::~KSharedPtr() 
(ksharedptr.h:126)
==6447==    by 0x18462B26: KisPaintDevice::~KisPaintDevice() 
(kis_paint_device.cc:316)
==6447==    by 0x181AEC89: (anonymous 
namespace)::ThumbnailProvider::image(QRect, QSize) (kis_birdeye_box.cc:159)
==6447==    by 0x181CF657: KoBirdEyePanel::slotUpdate(QRect const&) 
(kobirdeyepanel.cpp:230)
==6447==    by 0x181D0CE4: KoBirdEyePanel::resizeViewEvent(QSize) 
(kobirdeyepanel.cpp:542)
==6447==    by 0x181CFEDC: KoBirdEyePanel::eventFilter(QObject*, 
QEvent*) (kobirdeyepanel.cpp:308)
==6447==  Address 0x21FD0030 is 3473408 bytes inside a block of size 
16384000 alloc'd
==6447==    at 0x11B1C8E2: operator new[](unsigned long) (in 
/usr/lib64/valgrind/vgpreload_memcheck.so)
==6447==    by 0x1847A083: KisTileManager::findTileFor(int) 
(kis_tilemanager.cc:405)
==6447==    by 0x18479E7A: KisTileManager::requestTileData(int) 
(kis_tilemanager.cc:371)
==6447==    by 0x18476546: KisTile::allocate() (kis_tile.cc:103)
==6447==    by 0x18476242: KisTile::KisTile(KisTile&, int, int) 
(kis_tile.cc:54)
==6447==    by 0x184755CE: KisTiledDataManager::getTile(int, int, bool) 
(kis_tileddatamanager.cc:613)
==6447==    by 0x18476CF3: KisTiledIterator::fetchTileData(int, int) 
(kis_tilediterator.cc:106)
==6447==    by 0x18472FEB: KisTiledHLineIterator::operator++() 
(kis_tiledhlineiterator.cc:96)
==6447==    by 0x18440950: KisHLineIterator::operator++() 
(kis_iterator.cc:92)
==6447==    by 0x1841BF75: KisFillPainter::fillRect(int, int, int, int, 
KisColor const&, unsigned char) (kis_fill_painter.cc:105)
==6447==    by 0x1815B8DA: KisDoc::newImage(QString const&, int, int, 
KisColorSpace*, KisColor const&, QString const&, double) (kis_doc.cc:912)
==6447==    by 0x181CD0EB: KisCustomImageWidget::buttonClicked() 
(kis_custom_image_widget.cc:63)
==6447==
==6447== Invalid free() / delete / delete[]
==6447==    at 0x11B1D3A3: operator delete[](void*) (in 
/usr/lib64/valgrind/vgpreload_memcheck.so)
==6447==    by 0x18479F26: KisTileManager::dontNeedTileData(unsigned 
char*, int) (kis_tilemanager.cc:386)
==6447==    by 0x184764B1: KisTile::~KisTile() (kis_tile.cc:93)
==6447==    by 0x18473DE1: KisTiledDataManager::~KisTiledDataManager() 
(kis_tileddatamanager.cc:124)
==6447==    by 0x18466F7A: KisDataManager::~KisDataManager() 
(kis_paint_device.cc:74)
==6447==    by 0x11DCF381: KShared::_KShared_unref() const (ksharedptr.h:68)
==6447==    by 0x18160473: KSharedPtr<KisDataManager>::~KSharedPtr() 
(ksharedptr.h:126)
==6447==    by 0x18462B26: KisPaintDevice::~KisPaintDevice() 
(kis_paint_device.cc:316)
==6447==    by 0x181AEC89: (anonymous 
namespace)::ThumbnailProvider::image(QRect, QSize) (kis_birdeye_box.cc:159)
==6447==    by 0x181CF657: KoBirdEyePanel::slotUpdate(QRect const&) 
(kobirdeyepanel.cpp:230)
==6447==    by 0x181D0CE4: KoBirdEyePanel::resizeViewEvent(QSize) 
(kobirdeyepanel.cpp:542)
==6447==    by 0x181CFEDC: KoBirdEyePanel::eventFilter(QObject*, 
QEvent*) (kobirdeyepanel.cpp:308)
==6447==  Address 0x21FCC030 is 3457024 bytes inside a block of size 
16384000 alloc'd
==6447==    at 0x11B1C8E2: operator new[](unsigned long) (in 
/usr/lib64/valgrind/vgpreload_memcheck.so)
==6447==    by 0x1847A083: KisTileManager::findTileFor(int) 
(kis_tilemanager.cc:405)
==6447==    by 0x18479E7A: KisTileManager::requestTileData(int) 
(kis_tilemanager.cc:371)
==6447==    by 0x18476546: KisTile::allocate() (kis_tile.cc:103)
==6447==    by 0x18476242: KisTile::KisTile(KisTile&, int, int) 
(kis_tile.cc:54)
==6447==    by 0x184755CE: KisTiledDataManager::getTile(int, int, bool) 
(kis_tileddatamanager.cc:613)
==6447==    by 0x18476CF3: KisTiledIterator::fetchTileData(int, int) 
(kis_tilediterator.cc:106)
==6447==    by 0x18472FEB: KisTiledHLineIterator::operator++() 
(kis_tiledhlineiterator.cc:96)
==6447==    by 0x18440950: KisHLineIterator::operator++() 
(kis_iterator.cc:92)
==6447==    by 0x1841BF75: KisFillPainter::fillRect(int, int, int, int, 
KisColor const&, unsigned char) (kis_fill_painter.cc:105)
==6447==    by 0x1815B8DA: KisDoc::newImage(QString const&, int, int, 
KisColorSpace*, KisColor const&, QString const&, double) (kis_doc.cc:912)
==6447==    by 0x181CD0EB: KisCustomImageWidget::buttonClicked() 
(kis_custom_image_widget.cc:63)
==6447==

This crash was while painting, I don't know what size image it was:

(gdb) bt
#0  0x00002aaaaf6919c9 in raise () from /lib/tls/libc.so.6
#1  0x00002aaaaf692e6e in abort () from /lib/tls/libc.so.6
#2  0x00002aaaaf6c5b40 in __libc_message () from /lib/tls/libc.so.6
#3  0x00002aaaaf6cad40 in malloc_printerr () from /lib/tls/libc.so.6
#4  0x00002aaaaf6cb846 in free () from /lib/tls/libc.so.6
#5  0x00002aaaaf28ee3e in operator delete () from 
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/libstdc++.so.6
#6  0x00002aaab0e1af27 in KisTileManager::dontNeedTileData 
(this=0xa33f60, data=0x2aaabd040010 
"\203\225íäëýÿÿ\t\222\väÙýÿÿû\217\205ãÏýÿÿá\216>ãÉýÿÿt\214¡â¾ýÿÿ\227\206#á ýÿÿÒ~)ßyýÿÿPx\202ÝYýÿÿDs:Ü?ýÿÿ¸j\016Ú\025ýÿÿ[c/Øñüÿÿº]ÀÖÕüÿÿ 
VÒÔ¯üÿÿÒO7Ó\217üÿÿ\177I\234Ñpüÿÿ\214C\031ÐRüÿÿ\">¹Î8üÿÿ\2176ÌÌ\022üÿÿë0]Ëöûÿÿ¼,MÊàûÿÿì)\226ÉÓûÿÿÜ#\fÈ´ûÿÿ°\035zÆ\226ûÿÿê\030CÅ~ûÿÿ\030\031OÅ\177ûÿÿ"..., 
pixelSize=8) at 
/home/kdedev/kde-svn/koffice/krita/core/tiles/kis_tilemanager.cc:386
#7  0x00002aaab0e174b2 in ~KisTile (this=0x2aaabc34aec0) at 
/home/kdedev/kde-svn/koffice/krita/core/tiles/kis_tile.cc:93
#8  0x00002aaab0e192cc in KisMemento::deleteAll (this=0x2aaab916c290, 
tile=0x0) at /home/kdedev/kde-svn/koffice/krita/core/tiles/kis_memento.cc:80
#9  0x00002aaab0e191b6 in ~KisMemento (this=0x2aaab916c290) at 
/home/kdedev/kde-svn/koffice/krita/core/tiles/kis_memento.cc:49
#10 0x00002aaaaad72382 in KShared::_KShared_unref (this=0x2aaab916c290) 
at ksharedptr.h:68
#11 0x00002aaab0dff4f0 in ~KSharedPtr (this=0x2aaabc3f88a0) at 
ksharedptr.h:126
#12 0x00002aaab0dff483 in ~KisTransactionPrivate (this=0x2aaabc3f8890) 
at /home/kdedev/kde-svn/koffice/krita/core/kis_transaction.cc:53
#13 0x00002aaab0dfeea5 in ~KisTransaction (this=0x2aaac042eb40) at 
/home/kdedev/kde-svn/koffice/krita/core/kis_transaction.cc:53
#14 0x00002aaaad77c837 in QGList::remove (this=0x2aaabc3a2180, d=0x0) at 
qglist.cpp:542
#15 0x00002aaaad409d0f in QGList::removeLast (this=0x2aaabc3a2180) at 
qglist.h:164
#16 0x00002aaab1a82377 in QPtrList<KCommand>::removeLast 
(this=0x2aaabc3a2180) at qptrlist.h:89
#17 0x00002aaab1a80566 in KoCommandHistory::addCommand 
(this=0x2aaabc3a2130, command=0x2aaab916e950, execute=false) at 
/home/kdedev/kde-svn/koffice/lib/kofficeui/KoCommandHistory.cpp:178
#18 0x00002aaab0afdf64 in KisDoc::addCommand (this=0x2aaab8e8a450, 
cmd=0x2aaab916e950) at /home/kdedev/kde-svn/koffice/krita/ui/kis_doc.cc:1036
#19 0x00002aaab0b44f6d in KisToolFreehand::endPaint 
(this=0x2aaac04499c0) at 
/home/kdedev/kde-svn/koffice/krita/ui/kis_tool_freehand.cc:232
#20 0x00002aaab23c8cbf in KisToolBrush::endPaint (this=0x2aaac04499c0) 
at 
/home/kdedev/kde-svn/koffice/krita/plugins/tools/defaulttools/kis_tool_brush.cc:106
#21 0x00002aaab0b443c3 in KisToolFreehand::buttonRelease 
(this=0x2aaac04499c0, e=0x7fffffa65840) at 
/home/kdedev/kde-svn/koffice/krita/ui/kis_tool_freehand.cc:113
#22 0x00002aaab0b5ea02 in KisView::canvasGotButtonReleaseEvent 
(this=0x2aaab8ec0e60, e=0x7fffffa65c30) at 
/home/kdedev/kde-svn/koffice/krita/ui/kis_view.cc:2405
#23 0x00002aaab0b66485 in KisView::qt_invoke (this=0x2aaab8ec0e60, 
_id=77, _o=0x7fffffa65a60) at kis_view.moc:602
#24 0x00002aaaad4d2521 in QObject::activate_signal (this=0x2aaab8fae130, 
clist=0x2aaabc35ea30, o=0x7fffffa65a60) at qobject.cpp:2355
#25 0x00002aaab0adcb31 in KisCanvas::sigGotButtonReleaseEvent 
(this=0x2aaab8fae130, t0=0x7fffffa65c30) at kis_canvas.moc:587
#26 0x00002aaab0adce45 in KisCanvas::qt_emit (this=0x2aaab8fae130, 
_id=12, _o=0x7fffffa65b70) at kis_canvas.moc:621
#27 0x00002aaaad4d24fc in QObject::activate_signal (this=0x2aaabc328080, 
clist=0x2aaabc35e940, o=0x7fffffa65b70) at qobject.cpp:2353
#28 0x00002aaab0adbd8f in KisCanvasWidget::sigGotButtonReleaseEvent 
(this=0x2aaabc328080, t0=0x7fffffa65c30) at kis_canvas.moc:280
#29 0x00002aaab0ad6f2d in KisCanvasWidget::buttonReleaseEvent 
(this=0x2aaabc328080, e=0x7fffffa65c30) at 
/home/kdedev/kde-svn/koffice/krita/ui/kis_canvas.cc:287
#30 0x00002aaab0ad683b in KisCanvasWidget::widgetGotMouseReleaseEvent 
(this=0x2aaabc328080, e=0x7fffffa66270) at 
/home/kdedev/kde-svn/koffice/krita/ui/kis_canvas.cc:172
#31 0x00002aaab0b2ede4 in KisQPaintDeviceCanvasWidget::mouseReleaseEvent 
(this=0x2aaabc327fb0, e=0x7fffffa66270) at 
/home/kdedev/kde-svn/koffice/krita/ui/kis_qpaintdevice_canvas.cc:46
#32 0x00002aaaad5079ea in QWidget::event (this=0x2aaabc327fb8, 
e=0x7fffffa66270) at qwidget.cpp:4676
#33 0x00002aaaad472fb6 in QApplication::internalNotify 
(this=0x7fffffa66910, receiver=0x2aaabc327fb8, e=0x7fffffa66270) at 
qapplication.cpp:2635
#34 0x00002aaaad4726a0 in QApplication::notify (this=0x7fffffa66910, 
receiver=0x2aaabc327fb8, e=0x7fffffa66270) at qapplication.cpp:2421
#35 0x00002aaaac84a651 in KApplication::notify (this=0x7fffffa66910, 
receiver=0x2aaabc327fb8, event=0x7fffffa66270) at 
/home/kdedev/kde-svn/kdelibs/kdecore/kapplication.cpp:550
#36 0x00002aaaad4085c6 in QApplication::sendSpontaneousEvent 
(receiver=0x2aaabc327fb8, event=0x7fffffa66270) at qapplication.h:494
#37 0x00002aaaad402ba2 in QETWidget::translateMouseEvent 
(this=0x2aaabc327fb8, event=0x7fffffa667a0) at qapplication_x11.cpp:4291
#38 0x00002aaaad4008f7 in QApplication::x11ProcessEvent 
(this=0x7fffffa66910, event=0x7fffffa667a0) at qapplication_x11.cpp:3442
#39 0x00002aaaad41aae8 in QEventLoop::processEvents (this=0x57b8e0, 
flags=4) at qeventloop_x11.cpp:192
#40 0x00002aaaad486e0a in QEventLoop::enterLoop (this=0x57b8e0) at 
qeventloop.cpp:198
#41 0x00002aaaad486d07 in QEventLoop::exec (this=0x57b8e0) at 
qeventloop.cpp:145
#42 0x00002aaaad4730ce in QApplication::exec (this=0x7fffffa66910) at 
qapplication.cpp:2758
#43 0x00002aaaaabc36cd in kdemain (argc=1, argv=0x7fffffa66bb8) at 
/home/kdedev/kde-svn/koffice/krita/main.cc:41
#44 0x0000000000400903 in main (argc=1, argv=0x7fffffa66bb8) at 
kdeinit_krita.cpp:2
(gdb)

Adrian


More information about the kimageshop mailing list