[calligra] krita: Fix hang in scratchpad

Cyrille Berger Skott cberger at cberger.net
Sun Nov 27 09:03:08 UTC 2011


Hi,

I think this commit has caused sever regression in the test suite:
http://my.cdash.org/viewTest.php?onlydelta&buildid=263839

And when I run one of them (ie KisSelectionTest) in gdb I get:

GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from 
/ramfs/cyrille/build/calligra/krita/image/tests/KisSelectionTest...done.
(gdb) r
Starting program: 
/ramfs/cyrille/build/calligra/krita/image/tests/KisSelectionTest 
[Thread debugging using libthread_db enabled]
********* Start testing of KisSelectionTest *********
Config: Using QTest library 4.6.2, Qt 4.6.2
PASS   : KisSelectionTest::initTestCase()
QDEBUG : KisSelectionTest::testSelectionComponents() qttest(11643) 
KoGenericRegistry<T>::add: Registry already contains item "LABA" 
QDEBUG : KisSelectionTest::testSelectionComponents() qttest(11643) 
KoGenericRegistry<T>::add: Registry already contains item "RGBA16" 
QDEBUG : KisSelectionTest::testSelectionComponents() qttest(11643) 
KoGenericRegistry<T>::add: Registry already contains item "RGBA" 
QDEBUG : KisSelectionTest::testSelectionComponents() qttest(11643) 
KoGenericRegistry<T>::add: Registry already contains item "GRAYA16HISTO" 
[New Thread 0x7fffe6235700 (LWP 11647)]
[New Thread 0x7fffe5a34700 (LWP 11648)]

Program received signal SIGSEGV, Segmentation fault.
KisPaintDevice::setDefaultBounds (this=0x71d520, defaultBounds=0x100000001)
    at /home/cyrille/src/calligra/krita/image/kis_paint_device.cc:341
341         if (!defaultBounds->parent()) {
(gdb) bt
#0  KisPaintDevice::setDefaultBounds (this=0x71d520, 
defaultBounds=0x100000001)
    at /home/cyrille/src/calligra/krita/image/kis_paint_device.cc:341
#1  0x00007ffff745535c in KisPaintDevice::init (this=0x71d520, 
    explicitDataManager=<value optimized out>, colorSpace=<value optimized 
out>, 
    defaultBounds=0x100000001, parent=DWARF-2 expression error: DW_OP_reg 
operations must be used either alone or in conjuction with DW_OP_piece.
)
    at /home/cyrille/src/calligra/krita/image/kis_paint_device.cc:237
#2  0x00007ffff7455e2b in KisPaintDevice (this=0x71d520, 
    parent=<value optimized out>, colorSpace=0x750390, 
defaultBounds=0x100000001, 
    name=...) at 
/home/cyrille/src/calligra/krita/image/kis_paint_device.cc:196
#3  0x00007ffff746a9dc in KisPixelSelection (this=0x71d520, 
defaultBounds=0x100000001)
    at /home/cyrille/src/calligra/krita/image/kis_pixel_selection.cpp:47
#4  0x00007ffff7480188 in KisSelection::getOrCreatePixelSelection 
(this=0x70f060)
    at /home/cyrille/src/calligra/krita/image/kis_selection.cc:128
#5  0x0000000000407231 in KisSelectionTest::testSelectionComponents (
    this=<value optimized out>)
    at /home/cyrille/src/calligra/krita/image/tests/kis_selection_test.cpp:47
#6  0x0000000000409cec in KisSelectionTest::qt_metacall (this=0x7fffffffe5a0, 
    _c=QMetaObject::InvokeMetaMethod, _id=-241476095, _a=<value optimized 
out>)
    at 
/ramfs/cyrille/build/calligra/krita/image/tests/kis_selection_test.moc:82
#7  0x00007ffff24fb80e in QMetaMethod::invoke(QObject*, Qt::ConnectionType, 
QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, 
QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, 
QGenericArgument, QGenericArgument, QGenericArgument) const () from 
/usr/lib/libQtCore.so.4
#8  0x00007ffff24fbec6 in QMetaObject::invokeMethod(QObject*, char const*, 
Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, 
QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, 
QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, 
QGenericArgument) () from /usr/lib/libQtCore.so.4
#9  0x00007ffff704f0c2 in ?? () from /usr/lib/libQtTest.so.4
#10 0x00007ffff705040c in ?? () from /usr/lib/libQtTest.so.4
#11 0x00007ffff70506e3 in QTest::qExec(QObject*, int, char**) ()
   from /usr/lib/libQtTest.so.4
#12 0x0000000000405a38 in main (argc=1, argv=<value optimized out>)
    at /home/cyrille/src/calligra/krita/image/tests/kis_selection_test.cpp:203



On Saturday 26 November 2011, Boudewijn Rempt wrote:
> Git commit 1c4dd46a44a520d4368ac3a70343a1e6b60509b1 by Boudewijn Rempt.
> Committed on 25/11/2011 at 13:53.
> Pushed by rempt into branch 'master'.
> 
> Fix hang in scratchpad
> 
> Use QObject to do the memory management of the KisDefaultBounds object,
> this time. We cannot use pass-by-value because we have a subclass for
> KisDefaultBounds after all.

-- 
Cyrille Berger Skott


More information about the kimageshop mailing list