[Kst] crash, dont know what I am doing wrong

George Staikos staikos at kde.org
Fri Jan 16 15:17:44 CET 2004


On Friday 16 January 2004 04:33, claude mercier wrote:
> kst crash that can be reproduced, trying to give the whole sequence of
> what I am doing
> I dont know if I am sending this to the right place please let me know
> if it is not

    Unless I am misreading this somehow, I think this is a Qt bug.  Which 
version of Qt is installed?  You can probably determine this with the 
command:  "rpm -q qt"  I know it's 3.1, but it might be an older 3.1 version.

    I cannot reproduce this crash with the latest development code of Kst 
anyway, but I am using Qt 3.2.  While reading the backtrace here it seems 
that the QListViewItem destructor is not blocking the currentChanged() signal 
from being emitted.  I don't see that happen here.  I have put a guard in Kst 
for a null pointer where this crash occurred, but I'm not sure it will do 
anything.  I can't tell more without a debug-enabled crash trace (there is 
already lots of inlining happening here).  Please tell me if the next Kst 
release shows this behaviour for you.  If you want to try patching the source 
yourself, the fix looks like this:

Index: kstdatamanager_i.cpp
===================================================================
RCS file: /home/kde/kdeextragear-2/kst/kst/kstdatamanager_i.cpp,v
retrieving revision 1.43
diff -u -3 -p -r1.43 kstdatamanager_i.cpp
--- kstdatamanager_i.cpp        19 Dec 2003 14:17:23 -0000      1.43
+++ kstdatamanager_i.cpp        16 Jan 2004 14:17:36 -0000
@@ -481,8 +481,10 @@ void KstDataManagerI::doUpdates() {


 void KstDataManagerI::currentChanged(QListViewItem *i) {
-  KstObjectItem *koi = static_cast<KstObjectItem*>(i);
-  koi->updateButtons();
+  if (i) {
+    KstObjectItem *koi = static_cast<KstObjectItem*>(i);
+    koi->updateButtons();
+  }
 }

 #include "kstdatamanager_i.moc"


> (no debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...[New Thread 1093069664 (LWP 4470)]
> 0xffffe002 in ?? ()
> #0  0xffffe002 in ?? ()
> #1  0x406d157d in KCrash::defaultCrashHandler(int) ()
>    from /usr/lib/libkdecore.so.4
> #2  <signal handler called>
> #3  0x0807284e in KstObjectItem::updateButtons() ()
> #4  0x08073dbd in KstDataManagerI::qt_invoke(int, QUObject*) ()
> #5  0x40b2a0c9 in QObject::activate_signal(QConnectionList*, QUObject*) ()
>    from /usr/lib/qt-3.1/lib/libqt-mt.so.3
> #6  0x40e1a175 in QListView::currentChanged(QListViewItem*) ()
>    from /usr/lib/qt-3.1/lib/libqt-mt.so.3
> #7  0x40bef56c in QListViewItem::takeItem(QListViewItem*) ()
>    from /usr/lib/qt-3.1/lib/libqt-mt.so.3
> #8  0x40beed92 in QListViewItem::~QListViewItem() ()
>    from /usr/lib/qt-3.1/lib/libqt-mt.so.3
> #9  0x08071cf8 in KstObjectItem::~KstObjectItem() ()
> #10 0x080750a7 in QPtrStack<QListViewItem>::deleteItem(void*) ()
> #11 0x40d91dce in QGList::clear() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
> #12 0x08072f21 in KstDataManagerI::update() ()


-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/



More information about the Kst mailing list