Summary: | Kompare crashes sometimes when clicking on files | ||
---|---|---|---|
Product: | [Applications] kompare | Reporter: | Konstantin Tokarev <annulen> |
Component: | general | Assignee: | Kompare developers <kompare-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.1.0 |
Description
Konstantin Tokarev
2011-11-08 09:51:44 UTC
So it looks like deleting tree widget items from slotSetSelection is unsafe with the new Qt 4 tree widgets. This is also the cause of bug #257835, an earlier regression, due to the earlier port of the KompareNavTreePart to the Qt 4 tree widgets. (I cannot reproduce the crash itself, but Valgrind reports a use after free bug which is causing your crash.) Delaying the processing of slotSetSelection until the next event loop iteration should fix it, I'll have a fix shortly. Actually, that wasn't the problem. Deleting things from slotSetSelection appears to be safe. The problem turned out to be that we're not supposed to delete child tree widget items anymore in ~KompareListView*Item destructors, Qt 4 does this for us, doing it ourselves can lead to double free or use after free bugs. SVN commit 1263233 by kkofler: Kompare: KompareListView: Don't delete child items in the tree widget item destructors anymore. QTreeWidgetItem now does this for us, and if we try to do it ourselves, we cause use-after-free and/or double-free bugs. (This was a regression caused by the K3ListView→QTreeWidget port.) BUG: 286086 FIXED-IN: 4.1.0 (kdesdk 4.8 Beta 1) M +1 -5 komparelistview.cpp M +0 -1 komparelistview.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1263233 |