[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    QT Bug [Was: QT 3.3.5, QListView::takeItem crash]
From:       "Toan T Nguyen" <ntt () physics ! ucla ! edu>
Date:       2005-11-04 21:17:07
Message-ID: 44440.169.232.179.17.1131139027.squirrel () 169 ! 232 ! 179 ! 17
[Download RAW message or body]


Hi,

I finally figure out why kxmame mysteriously crashes using qt 3.3.5. This
is because QListView::clear() method doesn't reset d->highlighted to NULL.

This means that after a few tries of clearing and repopulating the item
list, d->highlighted might point to an invalid location. When
QListViewItem::takeItem is called, d->highlighted is used and causes
crash. Remarkably, due to the way it's coded, this bug doesn't appear in
Qt 3.3.4.

I included the fix patch below for your information. I don't want to
subscribe to another qt-devel list to send this bug info. So if anyone
here can help sending this patch to the proper place, please do.

Thanks a lot,
Toan


diff -uBbr qt-x11-free-3.3.5-old/src/widgets/qlistview.cpp
qt-x11-free-3.3.5/src/widgets/qlistview.cpp
--- qt-x11-free-3.3.5-old/src/widgets/qlistview.cpp     2005-09-02
05:43:15.000000000 -0700
+++ qt-x11-free-3.3.5/src/widgets/qlistview.cpp 2005-11-04
04:07:40.000000000 -0800
@@ -3231,6 +3231,7 @@
     d->focusItem = 0;
     d->selectAnchor = 0;
     d->pressedItem = 0;
+    d->highlighted = 0;

     // if it's down its downness makes no sense, so undown it
     d->buttonDown = FALSE;


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic