Subject: Puzzling crash in Karbon (KOffice 1.3) on startup
To: None <tech-pkg@netbsd.org>
From: Brian de Alwis <bsd@cs.ubc.ca>
List: tech-pkg
Date: 02/06/2004 16:20:59
I just built koffice-1.3 and its many pre-reqs (which took days!)
to use karbon, its drawing program. Ironically, all the programs
work fine *except* for karbon, which crashes on startup with a
SIGILL from calling VObject::document().
I'm running -current:
NetBSD slab 1.6ZI NetBSD 1.6ZI (SLAB) #1: Thu Feb 5 22:59:07 PST 2004 bsd@slab:/home/scratch/src/sys/arch/i386/compile/SLAB i386
$ karbon -v
Qt: 3.2.3
KDE: 3.1.5
Karbon14: 0.1
$ gcc -v
Using built-in specs.
Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc/configure --enable-long-long --disable-multilib --enable-threads --build=i386-unknown-netbsdelf --host=i386--netbsdelf --target=i386--netbsdelf : (reconfigured) /usr/src/tools/gcc/../../gnu/dist/gcc/configure --enable-long-long --disable-multilib --enable-threads --build=i386-unknown-netbsdelf1.6W --host=i386--netbsdelf --target=i386--netbsdelf
Thread model: posix
gcc version 3.3.2 (NetBSD nb1 20031026)
$
Below is a trace. Does this sound familiar to anybody? Note the
strange warnings when printing `obj'.
Thanks.
------------------------------------------------------------
(gdb) run
Starting program: /usr/pkg/bin/karbon
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
kbuildsycoca running...
(no debugging symbols found)...
Program received signal SIGILL, Illegal instruction.
0x080aa11c in ?? ()
(gdb) where
#0 0x080aa11c in ?? ()
#1 0x481208d3 in VObject::document() const (this=0x80a9c80) at vobject.cc:132
#2 0x4812095e in VObject::setName(QString const&) (this=0x481679dc,
s=@0xbfbfeca0) at vobject.cc:144
#3 0x4811f1fa in VLayer (this=0x80a9c80, parent=0x80aa0c0, state=normal)
at vlayer.cc:41
#4 0x4811888d in VDocument (this=0x80aa0c0) at qptrlist.h:82
#5 0x480c33ca in KarbonPart (this=0x80aa000, parentWidget=0x0,
widgetName=0x482ae867 "", parent=0x0, name=0x482b034f "Document",
singleViewMode=false) at karbon_part.cc:52
#6 0x480be268 in KarbonFactory::createPartObject(QWidget*, char const*, QObject*, char const*, char const*, QStringList const&) (this=0x808f840,
parentWidget=0x0, widgetName=0x482ae867 "", parent=0x0,
name=0x482b034f "Document", classname=0x482ae5a3 "KoDocument")
at karbon_factory.cc:76
#7 0x483a13bc in KParts::Factory::createPart(QWidget*, char const*, QObject*, char const*, char const*, QStringList const&) ()
from /usr/pkg/lib/libkparts.so.3
#8 0x4827e2cd in KoDocumentEntry::createDoc(KoDocument*, char const*) const (
this=0x48150f53, parent=0x0, name=0x482b034f "Document")
at qvaluelist.h:431
#9 0x4827d08b in KoApplication::start() (this=0xbfbff180)
at koApplication.cc:115
#10 0x4805defc in main (argc=1, argv=0xbfbff2cc) at main.cc:46
#11 0x08048892 in ___start ()
(gdb) up
#1 0x481208d3 in VObject::document() const (this=0x80a9c80) at vobject.cc:132
132 return dynamic_cast<VDocument *>( obj );
Current language: auto; currently c++
(gdb) l
127 VObject::document() const
128 {
129 VObject *obj = (VObject *)this;
130 while( obj->parent() )
131 obj = obj->parent();
132 return dynamic_cast<VDocument *>( obj );
133 }
134
135 QString
136 VObject::name() const
(gdb) ptype this
type = /* real type = VLayer * */
const class VObject {
protected:
KoRect m_boundingBox;
VState m_state : 8;
bool m_boundingBoxIsInvalid : 1;
VStroke *m_stroke;
VFill *m_fill;
struct DCOPObject *m_dcop;
private:
VObject *m_parent;
public:
VObject(VObject *, VState);
VObject(const VObject &);
~VObject(int);
virtual struct DCOPObject * dcopObject();
virtual void draw(VPainter*, KoRect const*) const;
virtual const KoRect & boundingBox() const;
bool boundingBoxIsInvalid() const;
void invalidateBoundingBox();
void setParent(VObject*);
VObject * parent() const;
VState state() const;
virtual void setState(VObject::VState);
virtual VStroke * stroke() const;
virtual VFill * fill() const;
virtual void setStroke(VStroke const&);
virtual void setFill(VFill const&);
virtual void save(QDomElement&) const;
virtual void load(QDomElement const&);
virtual VObject * clone() const;
virtual void accept(VVisitor&);
virtual void insertInfrontOf(VObject*, VObject*);
virtual QString name() const;
void setName(QString const&);
class VDocument * document() const;
} * const
(gdb) print obj
$1 = (warning: can't find linker symbol for virtual table for `VObject' value
warning: found `KoRuler::setOffset(int, int)' instead
warning: can't find linker symbol for virtual table for `VObject' value
warning: found `KoRuler::setOffset(int, int)' instead
VObject *) 0x80aa0c0
(gdb)
------------------------------------------------------------
--
Brian de Alwis | Graduate student | Software Practices Lab | UBC
"There is much pleasure to be gained in useless knowledge." - Bertrand Russell