[PyKDE] PyQt Segfault - Stack Dump

Kaleb Pederson kibab at icehouse.net
Tue Nov 11 08:18:01 GMT 2003


Ok, in changing selection/focus from one table cell to another, this is what I 
got (I'm using sip-3.8/pyqt-3.8.1/qt-3.2.2):

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2947)]
0x404cf324 in QObject::parent() const (this=0xffffffff) at qobject.h:154
154     qobject.h: No such file or directory.
        in qobject.h
(gdb) bt
#0  0x404cf324 in QObject::parent() const (this=0xffffffff) at qobject.h:154
#1  0x404ce0d3 in QWidget::parentWidget(bool) const (this=0xffffffff, 
sameWindow=false) at qwidget.h:852
#2  0x405f2c3b in ~QWidget (this=0x8ac60d0) at kernel/qwidget.cpp:895
#3  0x4068b42f in ~QFrame (this=0x8ac60d0) at .moc/debug-shared-mt/
moc_qvbox.cpp:28
#4  0x406a3c67 in ~QLineEdit (this=0x8ac60d0) at widgets/qlineedit.cpp:441
#5  0x405b40a6 in QObject::event(QEvent*) (this=0x8ac60d0, e=0x8a8c2c8) at 
kernel/qobject.cpp:750
#6  0x405f9591 in QWidget::event(QEvent*) (this=0x8ac60d0, e=0x8a8c2c8) at 
kernel/qwidget.cpp:4408
#7  0x406a59f2 in QLineEdit::event(QEvent*) (this=0x8ac60d0, e=0x8a8c2c8) at 
widgets/qlineedit.cpp:1406
...
I'll include the rest below for the interested... It looks like the parent 
information was somehow invalid?  It doesn't look like the destructor did 
anything that it shouldn't have, but I didn't really trace through the whole 
thing.

kernel/qwidget.cpp:895:

    886     // Remove myself and all children from the can-take-focus list
    887     QFocusData *f = focusData( FALSE );
    888     if ( f ) {
    889     QPtrListIterator<QWidget> it(f->focusWidgets);
    890     QWidget *w;
    891     while ( (w = it.current()) ) {
    892         ++it;
    893         QWidget * p = w;
    894         while( p && p != this )
    895         p = p->parentWidget();
    896         if ( p ) // my descendant
    897         f->focusWidgets.removeRef( w );
    898     }
    899     }

Followed by qwidget.h:852

    848 inline QWidget *QWidget::parentWidget( bool sameWindow ) const
    849 {
    850     if ( sameWindow )
    851     return isTopLevel() ? 0 : (QWidget *)QObject::parent();
    852     return (QWidget *)QObject::parent();
    853 }

Lastly, qobject.h:154:

    149 signals:
    150     void     destroyed();
    151     void     destroyed( QObject* obj );
    152
    153 public:
    154     QObject *parent() const { return parentObj; }
    155
    156 public slots:
    157     void    deleteLater();
    158

I'm open to suggestions?  If there is anything else that I can provide that 
might be useful, let me know.  I can segfault it reliably under various 
conditions.

Thanks.

--Kaleb

(the rest of the stack dump follows):

#8  0x405454e5 in QApplication::internalNotify(QObject*, QEvent*) 
(this=0x81749e0, receiver=0x8ac60d0, e=0x8a8c2c8)
    at kernel/qapplication.cpp:2582
#9  0x40545157 in QApplication::notify(QObject*, QEvent*) (this=0x81749e0, 
receiver=0x8ac60d0, e=0x8a8c2c8)
    at kernel/qapplication.cpp:2470
#10 0x41aa02ab in sipQApplication::notify(QObject*, QEvent*) () from /usr/
local/lib/python2.2/site-packages/libqtcmodule.so
#11 0x404ce280 in QApplication::sendEvent(QObject*, QEvent*) 
(receiver=0x8ac60d0, event=0x8a8c2c8) at qapplication.h:490
#12 0x405465fa in QApplication::sendPostedEvents(QObject*, int) (receiver=0x0, 
event_type=0) at kernel/qapplication.cpp:3204
#13 0x405463b0 in QApplication::sendPostedEvents() () at kernel/
qapplication.cpp:3115
#14 0x404e169f in QEventLoop::processEvents(unsigned) (this=0x824b188, 
flags=4) at kernel/qeventloop_x11.cpp:202
#15 0x4055e969 in QEventLoop::enterLoop() (this=0x824b188) at kernel/
qeventloop.cpp:198
#16 0x4055e882 in QEventLoop::exec() (this=0x824b188) at kernel/
qeventloop.cpp:145
#17 0x405456a3 in QApplication::exec() (this=0x81749e0) at kernel/
qapplication.cpp:2705
#18 0x41aa2bb8 in sipDo_QApplication_exec_loop(_object*, _object*) () from /
usr/local/lib/python2.2/site-packages/libqtcmodule.so
#19 0x080f3ec6 in PyCFunction_Call (func=0x89b0b78, arg=0x813411c, kw=0x0) at 
Objects/methodobject.c:79
#20 0x0808ae96 in eval_frame (f=0x814d194) at Python/ceval.c:2014
#21 0x0808d204 in PyEval_EvalCodeEx (co=0x8167a60, globals=0x81461fc, 
locals=0x0, args=0x814c1d4, argcount=0, kws=0x814c1d4, kwcount=0,
    defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2595
#22 0x0808efb7 in fast_function (func=0x832b39c, pp_stack=0xbffff0c4, n=0, 
na=0, nk=0) at Python/ceval.c:3170
#23 0x0808b024 in eval_frame (f=0x814c07c) at Python/ceval.c:2034
#24 0x0808d204 in PyEval_EvalCodeEx (co=0x8189e80, globals=0x814513c, 
locals=0x814513c, args=0x0, argcount=0, kws=0x0, kwcount=0,
    defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2595
#25 0x080828c0 in PyEval_EvalCode (co=0x8189e80, globals=0x814513c, 
locals=0x814513c) at Python/ceval.c:481
#26 0x080b17f9 in run_node (n=0x8157408, filename=0xbffff4c3 "/home/kibab/
work/JDC/gem/src/gui/../../run.py", globals=0x814513c,
    locals=0x814513c, flags=0xbffff298) at Python/pythonrun.c:1079
#27 0x080b179c in run_err_node (n=0x8157408, filename=0xbffff4c3 "/home/kibab/
work/JDC/gem/src/gui/../../run.py", globals=0x814513c,
    locals=0x814513c, flags=0xbffff298) at Python/pythonrun.c:1066
#28 0x080b175e in PyRun_FileExFlags (fp=0x8133ef0, filename=0xbffff4c3 "/home/
kibab/work/JDC/gem/src/gui/../../run.py", start=257,
    globals=0x814513c, locals=0x814513c, closeit=1, flags=0xbffff298) at 
Python/pythonrun.c:1057
#29 0x080b03fa in PyRun_SimpleFileExFlags (fp=0x8133ef0, filename=0xbffff4c3 
"/home/kibab/work/JDC/gem/src/gui/../../run.py", closeit=1,
    flags=0xbffff298) at Python/pythonrun.c:685
#30 0x080afc9a in PyRun_AnyFileExFlags (fp=0x8133ef0, filename=0xbffff4c3 "/
home/kibab/work/JDC/gem/src/gui/../../run.py", closeit=1,
    flags=0xbffff298) at Python/pythonrun.c:495
#31 0x08053a3a in Py_Main (argc=2, argv=0xbffff334) at Modules/main.c:364
#32 0x080531fa in main (argc=2, argv=0xbffff334) at Modules/ccpython.cc:10
#33 0x401927a7 in __libc_start_main () from /lib/libc.so.6



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20031111/db13f83d/attachment.bin


More information about the PyQt mailing list