Summary: | KDirWatch crash (was: Autoproject part crashes invoking the "add files to target" dialog) | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio | Reporter: | Hamish Rodda <rodda> |
Component: | general | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Proposed Bugfix |
Description
Hamish Rodda
2003-01-29 13:23:21 UTC
BTW The wizard seems not to have picked up that I am using the latest CVS versions of both gideon and kdelibs. My index of suspicion of the KDir* stuff has risen, so I'm moving this to kio. I also forgot to mention that the crash happens much less frequently when my computer is under heavy load, so this is likely to be some sort of race condition. Commenting out line 614 of kdirwatch.cpp like so: void KDirWatchPrivate::removeEntry( KDirWatch* instance, const QString& _path, Entry* sub_entry ) { Entry* e = entry(_path); if (!e) { //kdWarning(7001) << "KDirWatch::removeDir can't handle '" << _path << "'" << endl; return; prevents the crash... Created attachment 924 [details]
Proposed Bugfix
Hi,
please can you try out this patch?
The removeList is only allowed to contain an entry to be removed at most once.
It's possible that this is the reason for your crash.
If it's not - that was still a bug and should be fixed.
The removeList should be a QStringList containing the paths to be removed.
Thus, your crash can't happen.
This patch solves the problem for me, thanks! Shall I commit & close the bug? Thanks, Hamish. Yes. This would be nice. Can you backport this to the 3.1 branch, too? Josef Subject: KDE_3_1_BRANCH: kdelibs/kio/kio CVS commit by rodda: Backport Josef's fix for bug 53575 CCMAIL:53575-done@bugs.kde.org M +2 -0 kdirwatch.cpp 1.87.2.3 --- kdelibs/kio/kio/kdirwatch.cpp #1.87.2.2:1.87.2.3 @@ -625,4 +625,6 @@ void KDirWatchPrivate::removeEntry( KDir if (delayRemove) { + // removeList is allowed to contain any entry at most once + if (removeList.findRef(e)==-1) removeList.append(e); // now e->isValid() is false |