| Summary: | ksmserver crash takes down KDevelop while destroying Q_QGS_s_pKDirWatchSelf | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kcoreaddons | Reporter: | Alexander Potashev <aspotashev> |
| Component: | general | Assignee: | Michael Pyne <mpyne> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | crash | CC: | faure, kdelibs-bugs-null |
| Priority: | NOR | Keywords: | drkonqi |
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Alexander Potashev
2016-09-05 13:22:29 UTC
The backtrace indicates that you quit the application. Is that not what you did? The title of this bugreport says something completely different. Hm.... I rather think that this is a setup issue on your side ksmserver could crash first and make KDevelop exit. right, but that would mean the bug lies elsewhere and there's not much we can do here. I'll re-assign this to KIO for now. David, if you know how to handle this, please let us know. I simply doubt KDevelop can do anything about this crash report. I could reproduce almost the same scenario another couple of times yesterday, namely: 1. Press F8 to build the current project, 2. Press F8 a few more times while still building, 3. Then I get the "Could not start ksmserver. Check your installation." message (and the whole session is taken down), KDevelop crashes with the same stacktrace. KDirWatch is kcoreaddons, not kio. CCing David because he wrote the relevant thread safety code. Looks like the d-ptr for KDirWatch gets reset (but not deleted!) by postRoutine_KDirWatch (which deletes the QFSWatcher but also deletes the KDirWatchPrivate!). Later the KDirWatch's global destructor runs due to the Q_GLOBAL_STATIC entry's destruction, which checks its thread-local KDirWatchPrivate (stored in a QThreadStorage). But the values are inconsistent here, the QThreadStorage still has a KDirWatchPrivate (it was never deleted or reset), but the KDirWatch dtor tries to access that KDirWatchPrivate through its own d-ptr (already reset to nullptr...). I'm not proficient with this code but it seems that either the d-ptr should /not/ be reset when removing the QFSWatcher, or the QThreadStorage for all the d-ptrs should *also* be reset when the d-ptr is, instead of the in-between we currently have. I believe this is the same bug that RJVB fixed for other reasons in bug 381583, closing as a dupe of the more recent bug since that's where the fix was accounted for. *** This bug has been marked as a duplicate of bug 381583 *** |