Bug 289056 - KDevelop crash on close [Cpp::MissingDeclarationProblem::~MissingDeclarationProblem / Cpp::MissingDeclarationType::~MissingDeclarationType]
Summary: KDevelop crash on close [Cpp::MissingDeclarationProblem::~MissingDeclarationP...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 4.2.2
Platform: Compiled Sources Linux
: HI crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 286093 311192 313515 314252 319778 323329 323999 324764 326359 327236 332369 337701 338431 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-15 18:31 UTC by Manu
Modified: 2015-11-14 20:13 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (20.60 KB, text/plain)
2013-02-04 16:53 UTC, Benjamin Eikel
Details
New crash information added by DrKonqi (20.26 KB, text/plain)
2013-06-18 08:32 UTC, glad08
Details
New crash information added by DrKonqi (16.53 KB, text/plain)
2014-02-10 10:40 UTC, glad08
Details
New crash information added by DrKonqi (28.42 KB, text/plain)
2014-05-26 11:13 UTC, Máté Soós
Details
New crash information added by DrKonqi (35.97 KB, text/plain)
2015-03-05 05:21 UTC, Luis Felipe Domínguez Vega
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manu 2011-12-15 18:31:36 UTC
Application: kdevelop (4.2.2)
KDE Platform Version: 4.7.3 (4.7.3) (Compiled from sources)
Qt Version: 4.7.2
Operating System: Linux 3.0.6-gentoo x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
- What I was doing when the application crashed:

I just closed the application

- Unusual behavior I noticed:

Inmediately before closing I tried to rename a varible using the contextual menu and kdevelop got stuck (the progress bar wouldn't move) seemingly looking for uses of the variable

-- Backtrace:
Application: KDevelop (kdevelop), signal: Aborted
[Current thread is 1 (Thread 0x7f80af1d8760 (LWP 20237))]

Thread 12 (Thread 0x7f809a5d6700 (LWP 20238)):
#0  0x00007f80ac0eb7cb in pthread_cond_timedwait () from /lib64/libpthread.so.0
#1  0x00007f80ad689ff1 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f80a9c96d3a in KDevelop::DUChainPrivate::CleanupThread::run() () from /usr/lib64/libkdevplatformlanguage.so.3
#3  0x00007f80ad6894b5 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#5  0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 11 (Thread 0x7f80988b3700 (LWP 20240)):
#0  0x00007f80ac3e2e3e in __lll_lock_wait_private () from /lib64/libc.so.6
#1  0x00007f80ac378952 in _L_lock_6669 () from /lib64/libc.so.6
#2  0x00007f80ac376d21 in free () from /lib64/libc.so.6
#3  0x00007f80a710343b in g_source_unref_internal () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f80ad7a7973 in QEventDispatcherGlib::~QEventDispatcherGlib() () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007f80ad688cc4 in QThreadPrivate::finish(void*) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007f80ad6894bd in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#8  0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7f808c62f700 (LWP 20270)):
#0  0x00007f80ac0eb44c in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007f809ab7f594 in QTWTF::TCMalloc_PageHeap::scavengerThread() () from /usr/lib64/qt4/libQtScript.so.4
#2  0x00007f809ab7f5c9 in QTWTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /usr/lib64/qt4/libQtScript.so.4
#3  0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#4  0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7f8089dec700 (LWP 20330)):
#0  0x00007f80ac3e2e3e in __lll_lock_wait_private () from /lib64/libc.so.6
#1  0x00007f80ac378952 in _L_lock_6669 () from /lib64/libc.so.6
#2  0x00007f80ac376d21 in free () from /lib64/libc.so.6
#3  0x00007f80ad7a7241 in socketNotifierSourceCheck(_GSource*) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007f80a7107629 in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#5  0x00007f80a7107fd3 in g_main_context_iterate () from /usr/lib64/libglib-2.0.so.0
#6  0x00007f80a710840c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#7  0x00007f80ad7a6dd3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007f80ad779a42 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007f80ad779e24 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#10 0x00007f80ad68648d in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#11 0x00007f80ad759a68 in QInotifyFileSystemWatcherEngine::run() () from /usr/lib64/qt4/libQtCore.so.4
#12 0x00007f80ad6894b5 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#13 0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#14 0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f808955e700 (LWP 20337)):
#0  0x00007f80ac0eb44c in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007f80a46bc70d in WTF::TCMalloc_PageHeap::scavengerThread() () from /usr/lib64/qt4/libQtWebKit.so.4
#2  0x00007f80a46bc819 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /usr/lib64/qt4/libQtWebKit.so.4
#3  0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#4  0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f8087eb5700 (LWP 20373)):
#0  0x00007f80ac0eb44c in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007f80ad68a07b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f80a4e8ff84 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#3  0x00007f80a4e92613 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#4  0x00007f80a4e913ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#5  0x00007f80a4e91488 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007f80ad6894b5 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#8  0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f80876b4700 (LWP 20374)):
#0  0x00007f80ac0eb44c in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007f80ad68a07b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f80a4e8ff84 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#3  0x00007f80a4e92613 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#4  0x00007f80a4e9262c in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#5  0x00007f80a4e9262c in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#6  0x00007f80a4e913ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#7  0x00007f80a4e91488 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#8  0x00007f80ad6894b5 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#10 0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f80990b4700 (LWP 27277)):
#0  0x00007f80ac0eb44c in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007f80ad68a07b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f80a4e8ff84 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#3  0x00007f80a4e92613 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#4  0x00007f80a4e9262c in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#5  0x00007f80a4e9262c in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#6  0x00007f80a4e9262c in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#7  0x00007f80a4e9262c in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#8  0x00007f80a4e913ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#9  0x00007f80a4e91488 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#10 0x00007f80ad6894b5 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#11 0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#12 0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f808690e700 (LWP 27278)):
#0  0x00007f80ac0eb44c in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007f80ad68a07b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f80a4e8ff84 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#3  0x00007f80a4e92613 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#4  0x00007f80a4e9262c in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#5  0x00007f80a4e913ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#6  0x00007f80a4e91488 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#7  0x00007f80ad6894b5 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#9  0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f8085c9c700 (LWP 27281)):
#0  0x00007f80ac0eb44c in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007f80ad68a07b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f80a4e8ff84 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#3  0x00007f80a4e92613 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#4  0x00007f80a4e913ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#5  0x00007f80a4e91488 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007f80ad6894b5 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#8  0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f808549b700 (LWP 27282)):
#0  0x00007f80ac0eb44c in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007f80ad68a07b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f80a4e8ff84 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#3  0x00007f80a4e92613 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#4  0x00007f80a4e9262c in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#5  0x00007f80a4e9262c in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#6  0x00007f80a4e913ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#7  0x00007f80a4e91488 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#8  0x00007f80ad6894b5 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007f80ac0e6c5c in start_thread () from /lib64/libpthread.so.0
#10 0x00007f80ac3d5fcd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f80af1d8760 (LWP 20237)):
[KCrash Handler]
#6  0x00007f80ac331a55 in raise () from /lib64/libc.so.6
#7  0x00007f80ac332d55 in abort () from /lib64/libc.so.6
#8  0x00007f80ac36c972 in __libc_message () from /lib64/libc.so.6
#9  0x00007f80ac371df5 in malloc_printerr () from /lib64/libc.so.6
#10 0x00007f80ac376d2c in free () from /lib64/libc.so.6
#11 0x00007f80a9d53de9 in KDevelop::ReferenceType::~ReferenceType() () from /usr/lib64/libkdevplatformlanguage.so.3
#12 0x00007f808b0cf3cf in QList<Cpp::OverloadResolver::Parameter>::~QList() () from /usr/lib64/libkdev4cppduchain.so
#13 0x00007f808b0cf46b in Cpp::MissingDeclarationType::~MissingDeclarationType() () from /usr/lib64/libkdev4cppduchain.so
#14 0x00007f808b0cf6e5 in Cpp::MissingDeclarationProblem::~MissingDeclarationProblem() () from /usr/lib64/libkdev4cppduchain.so
#15 0x00007f80a9c6938f in QList<KSharedPtr<KDevelop::Problem> >::free () from /usr/lib64/libkdevplatformlanguage.so.3
#16 0x00007f80a9cb5bec in KDevelop::TopDUContextLocalPrivate::~TopDUContextLocalPrivate() () from /usr/lib64/libkdevplatformlanguage.so.3
#17 0x00007f80a9cb16ab in KDevelop::TopDUContext::deleteSelf() () from /usr/lib64/libkdevplatformlanguage.so.3
#18 0x00007f80a9c970c3 in KDevelop::DUChainPrivate::clear() () from /usr/lib64/libkdevplatformlanguage.so.3
#19 0x00007f80a9c83da6 in KDevelop::DUChain::aboutToQuit() () from /usr/lib64/libkdevplatformlanguage.so.3
#20 0x00007f80a9c83fc4 in KDevelop::DUChain::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libkdevplatformlanguage.so.3
#21 0x00007f80ad7929cf in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#22 0x00007f80ad77dec4 in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#23 0x000000000040bd59 in main ()

Reported using DrKonqi
Comment 1 Kevin Funk 2012-12-05 19:54:13 UTC
*** Bug 311192 has been marked as a duplicate of this bug. ***
Comment 2 Kevin Funk 2012-12-20 22:06:06 UTC
Please try to reproduce with full debug info and current Git master.
Comment 3 Lukas Jirkovsky 2012-12-21 12:09:07 UTC
IIRC this was a random problem, I'm not able to reproduce it.
Comment 4 Kevin Funk 2012-12-28 17:23:14 UTC
Hmm, i just experienced this crash after closing KDevelop, using current Git master.

Here's the backtrace:
[KCrash Handler]
#5  0x00007f1eaab1a425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#6  0x00007f1eaab1db8b in __GI_abort () at abort.c:91
#7  0x00007f1eaab5839e in __libc_message (do_abort=2, fmt=0x7f1eaac62028 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:201
#8  0x00007f1eaab62b96 in malloc_printerr (action=3, str=0x7f1eaac5e933 "free(): invalid pointer", ptr=<optimized out>) at malloc.c:5007
#9  0x00007f1ea7d5f679 in KDevelop::ReferenceType::~ReferenceType (this=0x7f1d80fb00a0, __in_chrg=<optimized out>) at /home/krf/devel/src/kdevplatform/language/duchain/types/referencetype.cpp:67
#10 0x00007f1e743f500c in QList<Cpp::OverloadResolver::Parameter>::node_destruct (from=0x7f1d80db8618, to=0x7f1d80db8620, this=<optimized out>) at /home/krf/devel/build/qt4.8-shared-debug/include/QtCore/../../../../src/qt/src/corelib/tools/qlist.h:431
#11 0x00007f1e743f504b in QList<Cpp::OverloadResolver::Parameter>::free (data=0x7f1d80db8600, this=<optimized out>) at /home/krf/devel/build/qt4.8-shared-debug/include/QtCore/../../../../src/qt/src/corelib/tools/qlist.h:757
#12 0x00007f1e743f519b in Cpp::MissingDeclarationType::~MissingDeclarationType (this=0x7f1d803d0f80, __in_chrg=<optimized out>) at /home/krf/devel/src/kdevelop/languages/cpp/cppduchain/missingdeclarationtype.h:33
#13 0x00007f1e743f51c9 in Cpp::MissingDeclarationType::~MissingDeclarationType (this=0x7f1d803d0f80, __in_chrg=<optimized out>) at /home/krf/devel/src/kdevelop/languages/cpp/cppduchain/missingdeclarationtype.h:33
#14 0x00007f1e743f553b in Cpp::MissingDeclarationProblem::~MissingDeclarationProblem (this=0x7f1d80ae41a0, __in_chrg=<optimized out>) at /home/krf/devel/src/kdevelop/languages/cpp/cppduchain/missingdeclarationproblem.h:29
#15 0x00007f1e743f5559 in Cpp::MissingDeclarationProblem::~MissingDeclarationProblem (this=0x7f1d80ae41a0, __in_chrg=<optimized out>) at /home/krf/devel/src/kdevelop/languages/cpp/cppduchain/missingdeclarationproblem.h:29
#16 0x00007f1ea7c9c10c in QList<KSharedPtr<KDevelop::Problem> >::node_destruct (from=0x7f1d80b69d08, to=0x7f1d80b6a118, this=<optimized out>) at /home/krf/devel/build/qt4.8-shared-debug/include/QtCore/../../../../src/qt/src/corelib/tools/qlist.h:431
#17 0x00007f1ea7c9c14b in QList<KSharedPtr<KDevelop::Problem> >::free (data=0x7f1d80b69cf0, this=<optimized out>) at /home/krf/devel/build/qt4.8-shared-debug/include/QtCore/../../../../src/qt/src/corelib/tools/qlist.h:757
#18 0x00007f1ea7ce8a56 in KDevelop::TopDUContextLocalPrivate::~TopDUContextLocalPrivate (this=0x89f2470, __in_chrg=<optimized out>) at /home/krf/devel/src/kdevplatform/language/duchain/topducontext.cpp:129
#19 0x00007f1ea7ce442f in KDevelop::TopDUContext::deleteSelf (this=<optimized out>) at /home/krf/devel/src/kdevplatform/language/duchain/topducontext.cpp:726
#20 0x00007f1ea7cc728e in KDevelop::DUChainPrivate::removeDocumentChainFromMemory (this=this@entry=0x27b5190, context=0x89717f0) at /home/krf/devel/src/kdevplatform/language/duchain/duchain.cpp:410
#21 0x00007f1ea7cc83e3 in KDevelop::DUChainPrivate::clear (this=0x27b5190) at /home/krf/devel/src/kdevplatform/language/duchain/duchain.cpp:373
#22 0x00007f1ea7cb490a in KDevelop::DUChain::aboutToQuit (this=this@entry=0x27ab390) at /home/krf/devel/src/kdevplatform/language/duchain/duchain.cpp:1619
#23 0x00007f1ea7cb4f02 in KDevelop::DUChain::qt_static_metacall (_o=0x27ab390, _c=<optimized out>, _id=7, _a=0x7fff8fc45d30) at /home/krf/devel/build/kdevplatform/language/duchain.moc:146
#24 0x00007f1eac450866 in QMetaObject::activate (sender=0x7fff8fc46210, m=0x7f1eac7f26e0 <QCoreApplication::staticMetaObject>, local_signal_index=0, argv=0x0) at /home/krf/devel/src/qt/src/corelib/kernel/qobject.cpp:3539
#25 0x00007f1eac4b1c29 in QCoreApplication::aboutToQuit (this=0x7fff8fc46210) at .moc/debug-shared/moc_qcoreapplication.cpp:145
#26 0x00007f1eac432167 in QCoreApplication::exec () at /home/krf/devel/src/qt/src/corelib/kernel/qcoreapplication.cpp:1223
#27 0x00007f1eab40b24a in QApplication::exec () at /home/krf/devel/src/qt/src/gui/kernel/qapplication.cpp:3823
#28 0x000000000040d60b in main (argc=<optimized out>, argv=<optimized out>) at /home/krf/devel/src/kdevelop/app/main.cpp:506

Still a problem, reopening
Comment 5 Milian Wolff 2013-01-22 23:38:14 UTC
*** Bug 313515 has been marked as a duplicate of this bug. ***
Comment 6 Milian Wolff 2013-01-22 23:38:24 UTC
*** Bug 286093 has been marked as a duplicate of this bug. ***
Comment 7 Kevin Funk 2013-02-02 09:07:36 UTC
*** Bug 314252 has been marked as a duplicate of this bug. ***
Comment 8 Milian Wolff 2013-02-02 12:41:02 UTC
Kevin, please leave the title - the duplicates show crashes in other types but the common denominator is the MissingDeclarationProblem.
Comment 9 Benjamin Eikel 2013-02-04 16:53:20 UTC
Created attachment 76907 [details]
New crash information added by DrKonqi

kdevelop (4.5.60) on KDE Platform 4.9.5 using Qt 4.8.2

- What I was doing when the application crashed:
I closed a KDevelop session, while another, different session was still open.

-- Backtrace (Reduced):
#6  0x00007fc94a0630c5 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007fc94a0661eb in __GI_abort () at abort.c:90
[...]
#9  0x00007fc94a0a9956 in malloc_printerr (action=3, str=0x7fc94a197ff4 "free(): invalid pointer", ptr=<optimized out>) at malloc.c:4902
#10 0x00007fc94a0aa750 in _int_free (av=0x7fc94a3d6640, p=0x7fc83442af4a, have_lock=0) at malloc.c:3758
#11 0x00007fc94774e019 in KDevelop::ReferenceType::~ReferenceType (this=0x7fc8352bb7c0, __in_chrg=<optimized out>) at ../../language/duchain/types/referencetype.cpp:67
Comment 10 Kevin Funk 2013-05-13 18:27:38 UTC
*** Bug 319778 has been marked as a duplicate of this bug. ***
Comment 11 Nicolai Hähnle 2013-06-14 11:44:26 UTC
I have just been hit by this crash as well. In my case, glibc malloc detected an invalid pointer to free. I am running fairly recent kdevplatform and kdevelop from Git master; kdevplatform from June 10th, kdevelop from June 4th.

Here's the backtrace:
#3 malloc_printerr() at malloc.c:5018
#4 KDevelop::EnumeratorType::~EnumeratorType() at /home/haehnle/software/kdevelop/kdevplatform/language/duchain/types/enumeratortype.h:36
#5 QList<Cpp::OverloadResolver::Parameter>::node_destruct() at /usr/include/qt4/QtCore/qlist.h:431
#6 QList<Cpp::OverloadResolver::Parameter>::free() at /usr/include/qt4/QtCore/qlist.h:757
#7 Cpp::MissingDeclarationType::~MissingDeclarationType() at /home/haehnle/software/kdevelop/kdevelop/languages/cpp/cppduchain/missingdeclarationtype.h:33
#8 Cpp::MissingDeclarationType::~MissingDeclarationType() at /home/haehnle/software/kdevelop/kdevelop/languages/cpp/cppduchain/missingdeclarationtype.h:33
#9 Cpp::MissingDeclarationProblem::~MissingDeclarationProblem() at /home/haehnle/software/kdevelop/kdevelop/languages/cpp/cppduchain/missingdeclarationproblem.h:29
#10 Cpp::MissingDeclarationProblem::~MissingDeclarationProblem() at /home/haehnle/software/kdevelop/kdevelop/languages/cpp/cppduchain/missingdeclarationproblem.h:29
#11 QList<KSharedPtr<KDevelop::Problem> >::node_destruct() at /usr/include/qt4/QtCore/qlist.h:431
#12 QList<KSharedPtr<KDevelop::Problem> >::free() at /usr/include/qt4/QtCore/qlist.h:757
#13 KDevelop::TopDUContextLocalPrivate::~TopDUContextLocalPrivate() at /home/haehnle/software/kdevelop/kdevplatform/language/duchain/topducontext.cpp:129
#14 KDevelop::TopDUContext::deleteSelf() at /home/haehnle/software/kdevelop/kdevplatform/language/duchain/topducontext.cpp:726
#15 KDevelop::DUChainPrivate::removeDocumentChainFromMemory() at /home/haehnle/software/kdevelop/kdevplatform/language/duchain/duchain.cpp:410
#16 KDevelop::DUChainPrivate::clear() at /home/haehnle/software/kdevelop/kdevplatform/language/duchain/duchain.cpp:373
#17 KDevelop::DUChain::shutdown() at /home/haehnle/software/kdevelop/kdevplatform/language/duchain/duchain.cpp:1617
#18 KDevelop::Core::cleanup() at /home/haehnle/software/kdevelop/kdevplatform/shell/core.cpp:421
Comment 12 Nicolai Hähnle 2013-06-17 11:19:00 UTC
I have now been able to trigger the same issue while running Valgrind. This is a RelWithDebInfo build, and it looks like parts of the call history are inlined so they don't appear in the call stack.

==2175== Thread 1:
==2175== Invalid free() / delete / delete[] / realloc()
==2175==    at 0x4C2A09C: operator delete[](void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2175==    by 0xAA5D158: KDevelop::EnumeratorType::~EnumeratorType() (constantintegraltype.h:39)
==2175==    by 0x3982ADD6: QList<Cpp::OverloadResolver::Parameter>::~QList() (typepointer.h:81)
==2175==    by 0x3982AE6A: Cpp::MissingDeclarationType::~MissingDeclarationType() (missingdeclarationtype.h:33)
==2175==    by 0x3982B084: Cpp::MissingDeclarationProblem::~MissingDeclarationProblem() (typepointer.h:81)
==2175==    by 0xA9C1056: _ZN5QListI10KSharedPtrIN8KDevelop7ProblemEEE4freeEPN9QListData4DataE.isra.144 (ksharedptr.h:90)
==2175==    by 0xA9C4ECC: KDevelop::TopDUContextLocalPrivate::~TopDUContextLocalPrivate() (topducontext.cpp:129)
==2175==    by 0xA9C258A: KDevelop::TopDUContext::deleteSelf() (topducontext.cpp:726)
==2175==    by 0xA9A8632: KDevelop::DUChainPrivate::clear() (duchain.cpp:410)
==2175==    by 0xA996EDD: KDevelop::DUChain::shutdown() (duchain.cpp:1617)
==2175==    by 0x55B247C: KDevelop::Core::cleanup() (core.cpp:421)
==2175==    by 0x55B258C: KDevelop::Core::shutdown() (core.cpp:382)
==2175==  Address 0x43007f5e is 52,894 bytes inside a block of size 65,536 alloc'd
==2175==    at 0x4C2AC27: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2175==    by 0xAA69976: KDevelop::TypeRepository::increaseReferenceCount(unsigned int, KDevelop::ReferenceCountManager*) (itemrepository.h:1065)
==2175==    by 0xAA4776F: KDevelop::InstantiationInformation::InstantiationInformation(KDevelop::InstantiationInformation const&, bool) (instantiationinformation.h:131)
==2175==    by 0xAA4CAEC: KDevelop::ItemRepository<KDevelop::InstantiationInformation, KDevelop::AppendedListItemRequest<KDevelop::InstantiationInformation, 8u>, true, true, 0u, 1048576u>::index(KDevelop::AppendedListItemRequest<KDevelop::InstantiationInformation, 8u> const&) (appendedlist.h:369)
==2175==    by 0xAA490F4: KDevelop::InstantiationInformation::indexed() const (instantiationinformation.cpp:190)
==2175==    by 0x39897467: Cpp::TemplateDeclaration::instantiate(KDevelop::InstantiationInformation const&, KDevelop::TopDUContext const*, bool) (templatedeclaration.cpp:964)
==2175==    by 0x3988B915: Cpp::FindDeclaration::instantiateDeclaration(KDevelop::Declaration*, KDevelop::InstantiationInformation const&) const (cppducontext.cpp:125)
==2175==    by 0x3988CC2F: Cpp::FindDeclaration::closeIdentifier(bool) (cppducontext.cpp:273)
==2175==    by 0x398C5BE0: _ZN14NameASTVisitor20visitUnqualifiedNameEP18UnqualifiedNameAST.part.60 (name_visitor.cpp:90)
==2175==    by 0x39B1F765: DefaultVisitor::visitName(NameAST*) (visitor.h:139)
==2175==    by 0x398C440B: NameASTVisitor::run(NameAST*, bool) (name_visitor.cpp:287)
==2175==    by 0x398C7CEB: TypeASTVisitor::visitName(NameAST*) (type_visitor.cpp:308)
Comment 13 glad08 2013-06-18 08:32:24 UTC
Created attachment 80601 [details]
New crash information added by DrKonqi

kdevelop (4.5.1) on KDE Platform 4.10.4 using Qt 4.8.4

- What I was doing when the application crashed: I do nothing, just leave running kdevelop for 20 min while I drink coffee

- Unusual behavior I noticed: kdevelop crashes without any actions from my side

-- Backtrace (Reduced):
#6  0x0000003467035ba5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:63
#7  0x0000003467037358 in __GI_abort () at abort.c:90
[...]
#9  0x000000346707ca8e in malloc_printerr (ptr=0x7f575c0c1320, str=0x3467179c00 "double free or corruption (fasttop)", action=3) at malloc.c:4969
#10 _int_free (av=0x7f575c000020, p=0x7f575c0c1310, have_lock=0) at malloc.c:3826
#11 0x000000346f0c5318 in QString::free (d=0x7f575c0c1320) at tools/qstring.cpp:1235
Comment 14 Nicolai Hähnle 2013-06-19 12:34:12 UTC
Another observation, without knowing how helpful it may be: KDevelop is particularly crashy in my setup when I have recently created a new source file.

The crashes do not always look like the one I posted above, in fact, I often just get a crash with obvious stack corruption, which makes this particularly painful to help to track down. However, after removing the DUChain cache and letting KDevelop re-parse everything, things are stable (or at least much more stable).

Given the particular error uncovered by Valgrind in comment #12 - attempting to delete[] something far inside a block - it is tempting to suspect that the bug is related to how the DUChain items are migrated to and from the manual memory management, perhaps in combination with some "generic" memory error somewhere else. However, that code looks like not too well documented magic to me, so I have no idea where to even start.

Is there a way to turn all that magic *off* completely? I understand that this might cost some performance, but it might help with (a) narrowing down the scope of the bug and (b) using Valgrind to track down any additional memory errors that may contribute to this bug.
Comment 15 Kevin Funk 2013-08-10 08:12:03 UTC
*** Bug 323329 has been marked as a duplicate of this bug. ***
Comment 16 Kevin Funk 2013-08-28 07:11:25 UTC
*** Bug 323999 has been marked as a duplicate of this bug. ***
Comment 17 Kevin Funk 2013-10-02 22:57:15 UTC
*** Bug 324764 has been marked as a duplicate of this bug. ***
Comment 18 Kevin Funk 2013-10-21 09:20:05 UTC
*** Bug 326359 has been marked as a duplicate of this bug. ***
Comment 19 Kevin Funk 2013-10-21 09:24:49 UTC
Could someone with code knowledge have a look into this? There are lots of users affected by this.
Comment 20 Milian Wolff 2013-10-21 11:47:15 UTC
I tried to fix this a lot of times but could not find anything just by looking at the backtraces. And so far no reproducible test case was found :(
Comment 21 Kevin Funk 2013-11-06 18:42:30 UTC
*** Bug 327236 has been marked as a duplicate of this bug. ***
Comment 22 glad08 2014-02-10 10:40:23 UTC
Created attachment 85076 [details]
New crash information added by DrKonqi

kdevelop (4.6.0) on KDE Platform 4.11.5 using Qt 4.8.5

- What I was doing when the application crashed:

KDevelop crashes after several seconds when I exited

-- Backtrace (Reduced):
#6  0x000000324a8359e9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x000000324a8370f8 in __GI_abort () at abort.c:90
[...]
#9  0x000000324a87d0b8 in malloc_printerr (ptr=<optimized out>, str=0x324a97bc75 "free(): invalid pointer", action=3) at malloc.c:4937
#10 _int_free (av=0x324abba780 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:3789
#11 0x0000003dab7589d9 in KDevelop::ReferenceType::~ReferenceType (this=0x7ff4a139a540, __in_chrg=<optimized out>) at /usr/src/debug/kdevplatform-1.6.0/language/duchain/types/referencetype.cpp:67
Comment 23 Máté Soós 2014-05-26 11:13:54 UTC
Created attachment 86825 [details]
New crash information added by DrKonqi

kdevelop (4.6.0) on KDE Platform 4.13.0 using Qt 4.8.6

- What I was doing when the application crashed:

Exited KDevelop by clicking the (X) at the top right corner. One (complicated) project was loaded, but nothing else.

-- Backtrace (Reduced):
#6  0x00007fe32c3b8f79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007fe32c3bc388 in __GI_abort () at abort.c:89
[...]
#9  0x00007fe32c4024ae in malloc_printerr (ptr=<optimized out>, str=0x7fe32c500b03 "free(): invalid pointer", action=1) at malloc.c:4996
#10 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#11 0x00007fe329946b29 in KDevelop::ReferenceType::~ReferenceType (this=0x7fe202e85cc0, __in_chrg=<optimized out>) at /home/soos/downloads/kdevplatform-1.6.0/language/duchain/types/referencetype.cpp:67
Comment 24 Kevin Funk 2014-05-27 05:56:14 UTC
*** Bug 332369 has been marked as a duplicate of this bug. ***
Comment 25 Milian Wolff 2014-08-21 09:43:39 UTC
*** Bug 337701 has been marked as a duplicate of this bug. ***
Comment 26 Milian Wolff 2014-08-21 09:43:46 UTC
*** Bug 338431 has been marked as a duplicate of this bug. ***
Comment 27 Luis Felipe Domínguez Vega 2015-03-05 05:21:06 UTC
Created attachment 91428 [details]
New crash information added by DrKonqi

kdevelop (4.7.0) on KDE Platform 4.14.2 using Qt 4.8.6

I was haved an only project opened and when i closed kdevelop, crash.

-- Backtrace (Reduced):
#6  0x00007f900bc53107 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f900bc544e8 in __GI_abort () at abort.c:89
[...]
#9  0x00007f900bc969de in malloc_printerr (action=1, str=0x7f900bd841c8 "double free or corruption (fasttop)", ptr=<optimized out>) at malloc.c:4996
#10 0x00007f900bc976e6 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#11 0x00007f900bc55bc9 in __run_exit_handlers (status=0, listp=0x7f900bfc15a8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
Comment 28 Milian Wolff 2015-11-14 20:13:47 UTC
Hello!

We are working on a new clang-based C/C++ language plugin for KDevelop 5 which
supersedes the old C++ plugin in KDevelop 4. See e.g.:
https://www.kdevelop.org/news/first-beta-release-kdevelop-500-available

Due to a lack of manpower, we cannot fix bugs in the old C++ plugin. We rather
want to supply a good Clang based C++ experience for KDevelop 5 than wasting
our time on the legacy C++ support for KDevelop 4.

With the new clang-based C/C++ language plugin, the bug presented here does not occur. In my testing. For these reasons, I'll close this bug. Please stay tuned for KDevelop 5.

If you think this bug is applicable to Clang/KDevelop 5, please reopen the report and add new information on how to reproduce the bug there.

Sorry for the inconvenience, I hope you understand the reasoning above.

Cheers