Today's calligrasheets crashes

Philip Van Hoof philip at codeminded.be
Fri Nov 30 11:00:28 GMT 2012


Hi everybody,

Ok, so this issue was a mixture of my own confusion with an already
installed Calligra and the fact that the code that uses Calligra that
I'm working on was not yet setting Part to Doc. In a private mail
Boudewijn hinted me to do this.

    Part *part = new Part(0);
    Doc *doc = new Doc(part);
    part->setDocument(doc);

And now it works.

Unfortunately isn't Part.h of sheets/part being installed at this
moment. So I'll provide a patch to add it to the install files in a
minute.

Kind regards, and thanks Boudewijn for the support

Philip


On Fri, 2012-11-30 at 09:38 +0100, Philip Van Hoof wrote:
> Today's CalligraSheets crashes:
> 
> pvanhoof at lors:~/repos/kde4/calligra-build/sheets$ cd ../../calligra
> pvanhoof at lors:~/repos/kde4/calligra$ git pull
> Already up-to-date.
> pvanhoof at lors:~/repos/kde4/calligra$ git branch
> * master
> pvanhoof at lors:~/repos/kde4/calligra$ 
> 
> I have no patches of my own 
> 
> pvanhoof at lors:~$ gdb calligrasheets
> GNU gdb (GDB) 7.4.1-debian
> Copyright (C) 2012 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 "i486-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /usr/local/bin/calligrasheets...done.
> (gdb) run
> Starting program: /usr/local/bin/calligrasheets 
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0xb79c8be7 in KParts::ReadWritePart::isReadWrite() const () from /usr/lib/libkparts.so.4
> (gdb) bt
> #0  0xb79c8be7 in KParts::ReadWritePart::isReadWrite() const () from /usr/lib/libkparts.so.4
> #1  0xb7e6c632 in KoDocument::setAutoSave (this=0x82c5fb0, delay=300) at /home/pvanhoof/repos/kde4/calligra/libs/main/KoDocument.cpp:509
> #2  0xaf1fb121 in KoDocument::KoDocument(QWidget*, QObject*, bool, KUndo2Stack*) () from /usr/lib/libkomain.so.9
> #3  0xaf06a7bf in Calligra::Sheets::DocBase::DocBase(QWidget*, QObject*, bool) () from /usr/lib/libcalligrasheetsodf.so.9
> #4  0xaf403a05 in Calligra::Sheets::Doc::Doc(QWidget*, QObject*, bool) () from /usr/lib/libcalligrasheetscommon.so.9
> #5  0xaf408732 in Calligra::Sheets::Factory::create(char const*, QWidget*, QObject*, QList<QVariant> const&, QString const&) () from /usr/lib/libcalligrasheetscommon.so.9
> #6  0xb7e7d6e1 in create<KoPart> (args=..., keyword=..., parent=<optimized out>, parentWidget=<optimized out>, this=<optimized out>) at /usr/include/kpluginfactory.h:531
> #7  createInstance<KoPart> (error=<optimized out>, args=..., parent=<optimized out>, parentWidget=<optimized out>, this=<optimized out>) at /usr/include/kservice.h:559
> #8  createInstance<KoPart> (error=<optimized out>, args=..., parent=<optimized out>, this=<optimized out>) at /usr/include/kservice.h:536
> #9  KoDocumentEntry::createKoPart (this=0x0, errorMsg=0xbffff0a4) at /home/pvanhoof/repos/kde4/calligra/libs/main/KoDocumentEntry.cpp:53
> #10 0xb7e632d5 in KoApplication::start (this=0xbffff250) at /home/pvanhoof/repos/kde4/calligra/libs/main/KoApplication.cpp:194
> #11 0xb7fde410 in kdemain (argc=1, argv=0xbffff344) at /home/pvanhoof/repos/kde4/calligra/sheets/part/Main.cpp:41
> #12 0x080487ab in main (argc=1, argv=0xbffff344) at /home/pvanhoof/repos/kde4/calligra-build/sheets/calligrasheets_dummy.cpp:3
> (gdb) up
> #1  0xb7e6c632 in KoDocument::setAutoSave (this=0x82c5fb0, delay=300) at /home/pvanhoof/repos/kde4/calligra/libs/main/KoDocument.cpp:509
> 509	    if (d->parentPart->isReadWrite() && d->autoSaveDelay > 0)
> (gdb) print d
> warning: can't find linker symbol for virtual table for `KoDocument' value
> warning:   found `construction vtable for KoDocument-in-Calligra::Sheets::Doc' instead
> $1 = (KoDocument::Private * const) 0xb7fd4c94
> (gdb) print d->parentPart
> warning: can't find linker symbol for virtual table for `KoDocument' value
> warning:   found `construction vtable for KoDocument-in-Calligra::Sheets::Doc' instead
> $2 = (KoPart *) 0xb5f55570
> (gdb) print * d->parentPart
> warning: can't find linker symbol for virtual table for `KoDocument' value
> warning:   found `construction vtable for KoDocument-in-Calligra::Sheets::Doc' instead
> $3 = {<KParts::ReadWritePart> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0xb79f8e50, stringdata = 0xb7f81ee0 "KoPart", data = 0xb7f81fa0, extradata = 0xb7fd86c8}}, static staticMetaObjectExtraData = {
>     objects = 0x0, static_metacall = 0xb7f1a3e0 <KoPart::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}, d = 0xb48dc3f3}
> (gdb) 
> 
> 
> pvanhoof at lors:~/repos/kde4/calligra-build$ cd sheets/
> pvanhoof at lors:~/repos/kde4/calligra-build/sheets$ gdb ./calligrasheets
> GNU gdb (GDB) 7.4.1-debian
> Copyright (C) 2012 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 "i486-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /home/pvanhoof/repos/kde4/calligra-build/sheets/calligrasheets...done.
> (gdb) run
> Starting program: /home/pvanhoof/repos/kde4/calligra-build/sheets/calligrasheets 
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0xb79c8be7 in KParts::ReadWritePart::isReadWrite() const () from /usr/lib/libkparts.so.4
> (gdb) 
> 
> 
> 
> 

-- 


Philip Van Hoof
Software developer
Codeminded BVBA - http://codeminded.be




More information about the calligra-devel mailing list