Summary: | KDevelop crashed when closing | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Bernhard Beschow <shentey> |
Component: | kdecore | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ahartmetz, asenlekoff, faure, kfunk, osmiev |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdelibs/6dc74176dab5d4a34d05cfa9c6d89b77a7ec37e2 | Version Fixed In: | 4.11 |
Sentry Crash Report: |
Description
Bernhard Beschow
2010-03-14 12:21:54 UTC
Hmm, seems like something else needs fixing in kdelibs. I can't see anything wrong in kdevelop's code. We're properly registering the buildjob with the runcontroller, which in turn stops all running job during shutdown. As the kde and kdevelop versions suggest that the OP has the fixes from bug 206569 and bug 202091 and the backtrace is deep inside kdelibs code I'm re-assigning. Could be related to bug 229982 (In reply to comment #2) > Could be related to bug 229982 No Just had the exact same crash: #0 0x00000000093ec0c8 in ?? () #1 0x00007ffff7a3f28e in qDeleteAll<QList<KJob*>::const_iterator> (end=..., begin=...) at /usr/include/qt4/QtCore/qalgorithms.h:322 #2 qDeleteAll<QList<KJob*> > (c=QList<KJob *> = {...}) at /usr/include/qt4/QtCore/qalgorithms.h:330 #3 KCompositeJobPrivate::~KCompositeJobPrivate (this=0x8849850, __in_chrg=<optimized out>) at ../../kdecore/jobs/kcompositejob.cpp:29 #4 0x00007ffff7a3f2c9 in KCompositeJobPrivate::~KCompositeJobPrivate (this=0x8849850, __in_chrg=<optimized out>) at ../../kdecore/jobs/kcompositejob.cpp:30 #5 0x00007ffff7a3fd70 in KJob::~KJob (this=0x880b030, __in_chrg=<optimized out>) at ../../kdecore/jobs/kjob.cpp:73 #6 0x00007ffff1a8e5d9 in KDevelop::BuilderJob::~BuilderJob (this=0x880b030, __in_chrg=<optimized out>) at /home/krf/devel/src/kdevplatform/project/builderjob.cpp:158 The fix would be to connect do QObject::destroyed signals when adding subjobs in KCompositeJob. If this signal is catched, remove the job from the list. Do you see any objections against this? Otherwise I'll prepare a patch for this. Review-request: https://git.reviewboard.kde.org/r/108770/ After discussion it turned out that the real issue is that KCompositeJob doesn't support sub jobs being killed Quietly (which is the default for KJob::kill()). Unfortunately this is not stated in the API docs. Will prepare a patch for KDevelop if possible. *** Bug 306951 has been marked as a duplicate of this bug. *** Git commit 6dc74176dab5d4a34d05cfa9c6d89b77a7ec37e2 by Kevin Funk. Committed on 05/02/2013 at 16:35. Pushed by kfunk into branch 'master'. Fix double-free in ~KCompositeJobPrivate In case a subjob of KCompositeJob has been deleted, this KCompositeJob instance will crash as soon as it is being destructed, trying to delete this subjob again. The reason for this is that KCompositeJob::addSubjob() does not change the ownership of @p job. So, this job could be still deleted by ~QObject() by the original parent. Add tests for this corner case. This fixes a bug in KDevelop. Backtrace: 1 0x00007ffff7a3f28e in qDeleteAll<QList<KJob*>::const_iterator> (end=..., begin=...) at /usr/include/qt4/QtCore/qalgorithms.h:322 2 qDeleteAll<QList<KJob*> > (c=QList<KJob *> = {...}) at /usr/include/qt4/QtCore/qalgorithms.h:330 #3 KCompositeJobPrivate::~KCompositeJobPrivate (this=0x8849850, __in_chrg=<optimized out>) at ../../kdecore/jobs/kcompositejob.cpp:29 4 0x00007ffff7a3f2c9 in KCompositeJobPrivate::~KCompositeJobPrivate (this=0x8849850, __in_chrg=<optimized out>) at ../../kdecore/jobs/kcompositejob.cpp:30 5 0x00007ffff7a3fd70 in KJob::~KJob (this=0x880b030, __in_chrg=<optimized out>) at ../../kdecore/jobs/kjob.cpp:73 6 0x00007ffff1a8e5d9 in KDevelop::BuilderJob::~BuilderJob (this=0x880b030, __in_chrg=<optimized out>) at /home/krf/devel/src/kdevplatform/project/builderjob.cpp:158 REVIEW: 108770 FIXED-IN: 4.11 M +5 -2 kdecore/jobs/kcompositejob.cpp M +8 -1 kdecore/jobs/kcompositejob.h M +5 -0 kdecore/tests/CMakeLists.txt A +107 -0 kdecore/tests/kcompositejobtest.cpp [License: LGPL (v2)] A +70 -0 kdecore/tests/kcompositejobtest.h [License: LGPL (v2)] http://commits.kde.org/kdelibs/6dc74176dab5d4a34d05cfa9c6d89b77a7ec37e2 Git commit 917a979724a5feae93406cfbaf82042af082124f by Kevin Funk. Committed on 08/02/2013 at 11:26. Pushed by kfunk into branch '1.5'. Fix parenting in BuilderJob::addSubjob() Fixes a bug in kdelibs, which is fixed in KDE 4.11. At this point we can easily work-around this issue. See cc'ed bug for explanation(s). This fixes a crash-on-exit with a build running. REVIEW: 108848 M +16 -0 project/builderjob.cpp M +4 -0 project/builderjob.h http://commits.kde.org/kdevplatform/917a979724a5feae93406cfbaf82042af082124f |