Bug 264931 - KDevelop crashes when I change a method iinterface in the .h file and click in "Update method definition" [ItemRepository::itemForIndex asserts with "bucket < m_bucketCount"]
Summary: KDevelop crashes when I change a method iinterface in the .h file and click i...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 4.2.60
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 267132 275206 318046 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-31 11:59 UTC by Leandro Santiago da Silva
Modified: 2014-08-09 17:33 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (40.13 KB, text/plain)
2011-02-15 10:46 UTC, Eric Thiele
Details
New crash information added by DrKonqi (14.68 KB, text/plain)
2011-05-06 17:00 UTC, robbenson18
Details
add additional debug code to identifier.cpp (7.79 KB, patch)
2014-08-09 16:25 UTC, Milian Wolff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leandro Santiago da Silva 2011-01-31 11:59:06 UTC
Application: kdevelop (4.2.60)
KDE Platform Version: 4.6.00 (4.6.0)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-23-generic i686
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:
KDevelop crashes when I change a method iinterface in the .h file and click in "Update method definition".
I'm using kdevelop from trunk.

The crash can be reproduced some of the time.

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

Thread 12 (Thread 0xb27dbb70 (LWP 3603)):
#0  0x00278832 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0667d884 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
#2  0x03de8df4 in __pthread_cond_timedwait (cond=0x96af348, mutex=0x96af330, abstime=0xb27db2b0) at forward.c:152
#3  0x0701794f in wait (this=0x940cf2c, mutex=0x940cf30, time=1000) at thread/qwaitcondition_unix.cpp:86
#4  QWaitCondition::wait (this=0x940cf2c, mutex=0x940cf30, time=1000) at thread/qwaitcondition_unix.cpp:160
#5  0x015abc16 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x940cf20) at /home/tenchi/projects/kdevelop/kdevplatform/language/duchain/duchain.cpp:286
#6  0x07016df9 in QThreadPrivate::start (arg=0x940cf20) at thread/qthread_unix.cpp:266
#7  0x06678cc9 in start_thread (arg=0xb27dbb70) at pthread_create.c:304
#8  0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 11 (Thread 0xb1fbeb70 (LWP 3605)):
#0  0x0026d97a in __i686.get_pc_thunk.bx () from /lib/librt.so.1
#1  0x0026fe1f in clock_gettime (clock_id=1, tp=0xb1fbdf90) at ../sysdeps/unix/clock_gettime.c:94
#2  0x0707250b in do_gettime () at tools/qelapsedtimer_unix.cpp:105
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:119
#4  0x071496e5 in QTimerInfoList::updateCurrentTime (this=0x9722444) at kernel/qeventdispatcher_unix.cpp:339
#5  0x0714972a in QTimerInfoList::timerWait (this=0x9722444, tm=...) at kernel/qeventdispatcher_unix.cpp:442
#6  0x071477a8 in timerSourcePrepareHelper (src=<value optimized out>, timeout=0xb1fbe0bc) at kernel/qeventdispatcher_glib.cpp:136
#7  0x0714783d in timerSourcePrepare (source=0xb1fbdf90, timeout=0x1) at kernel/qeventdispatcher_glib.cpp:169
#8  0x03030e6a in g_main_context_prepare () from /lib/libglib-2.0.so.0
#9  0x03031279 in ?? () from /lib/libglib-2.0.so.0
#10 0x03031848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#11 0x0714759f in QEventDispatcherGlib::processEvents (this=0x96ac7b0, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#12 0x07117609 in QEventLoop::processEvents (this=0xb1fbe290, flags=) at kernel/qeventloop.cpp:149
#13 0x07117a8a in QEventLoop::exec (this=0xb1fbe290, flags=...) at kernel/qeventloop.cpp:201
#14 0x07013b7e in QThread::exec (this=0x970b5b0) at thread/qthread.cpp:490
#15 0x070f635b in QInotifyFileSystemWatcherEngine::run (this=0x970b5b0) at io/qfilesystemwatcher_inotify.cpp:248
#16 0x07016df9 in QThreadPrivate::start (arg=0x970b5b0) at thread/qthread_unix.cpp:266
#17 0x06678cc9 in start_thread (arg=0xb1fbeb70) at pthread_create.c:304
#18 0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 10 (Thread 0xafbffb70 (LWP 3650)):
#0  0x0667c7d4 in __pthread_mutex_unlock_usercnt (mutex=0x990343c, decr=<value optimized out>) at pthread_mutex_unlock.c:52
#1  0x03de8fa6 in pthread_mutex_unlock (mutex=0x990343c) at forward.c:184
#2  0x03031870 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x0714759f in QEventDispatcherGlib::processEvents (this=0x98246d8, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#4  0x07117609 in QEventLoop::processEvents (this=0xafbff2a0, flags=) at kernel/qeventloop.cpp:149
#5  0x07117a8a in QEventLoop::exec (this=0xafbff2a0, flags=...) at kernel/qeventloop.cpp:201
#6  0x07013b7e in QThread::exec (this=0x98d9ab8) at thread/qthread.cpp:490
#7  0x0169a071 in KDevelop::CompletionWorkerThread::run (this=0x98d9ab8) at /home/tenchi/projects/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#8  0x07016df9 in QThreadPrivate::start (arg=0x98d9ab8) at thread/qthread_unix.cpp:266
#9  0x06678cc9 in start_thread (arg=0xafbffb70) at pthread_create.c:304
#10 0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 9 (Thread 0xaf3feb70 (LWP 3746)):
#0  0x0667b3eb in __pthread_mutex_lock (mutex=0x9aa2c94) at pthread_mutex_lock.c:61
#1  0x03de8f66 in pthread_mutex_lock (mutex=0x9aa2c94) at forward.c:182
#2  0x0302f412 in g_main_context_release () from /lib/libglib-2.0.so.0
#3  0x03031473 in ?? () from /lib/libglib-2.0.so.0
#4  0x03031848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0x0714759f in QEventDispatcherGlib::processEvents (this=0x9aafdb8, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#6  0x07117609 in QEventLoop::processEvents (this=0xaf3fe2a0, flags=) at kernel/qeventloop.cpp:149
#7  0x07117a8a in QEventLoop::exec (this=0xaf3fe2a0, flags=...) at kernel/qeventloop.cpp:201
#8  0x07013b7e in QThread::exec (this=0x9a45740) at thread/qthread.cpp:490
#9  0x0169a071 in KDevelop::CompletionWorkerThread::run (this=0x9a45740) at /home/tenchi/projects/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#10 0x07016df9 in QThreadPrivate::start (arg=0x9a45740) at thread/qthread_unix.cpp:266
#11 0x06678cc9 in start_thread (arg=0xaf3feb70) at pthread_create.c:304
#12 0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 8 (Thread 0xad7b9b70 (LWP 3747)):
#0  0x0302bfd6 in g_main_context_query () from /lib/libglib-2.0.so.0
#1  0x030312c4 in ?? () from /lib/libglib-2.0.so.0
#2  0x03031848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x0714759f in QEventDispatcherGlib::processEvents (this=0x98c86c8, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#4  0x07117609 in QEventLoop::processEvents (this=0xad7b92a0, flags=) at kernel/qeventloop.cpp:149
#5  0x07117a8a in QEventLoop::exec (this=0xad7b92a0, flags=...) at kernel/qeventloop.cpp:201
#6  0x07013b7e in QThread::exec (this=0x9aafc30) at thread/qthread.cpp:490
#7  0x0169a071 in KDevelop::CompletionWorkerThread::run (this=0x9aafc30) at /home/tenchi/projects/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#8  0x07016df9 in QThreadPrivate::start (arg=0x9aafc30) at thread/qthread_unix.cpp:266
#9  0x06678cc9 in start_thread (arg=0xad7b9b70) at pthread_create.c:304
#10 0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 7 (Thread 0xabbffb70 (LWP 3757)):
#0  0x00278832 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0667d4dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x03de8d9d in __pthread_cond_wait (cond=0x7640290, mutex=0x7640278) at forward.c:139
#3  0x0753c877 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x763b1a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#4  0x0753c8c1 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x763b1a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#5  0x06678cc9 in start_thread (arg=0xabbffb70) at pthread_create.c:304
#6  0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 6 (Thread 0xaa1feb70 (LWP 4046)):
#0  0x00278832 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0667d4dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x03de8d9d in __pthread_cond_wait (cond=0x95f8cf8, mutex=0x95f8ce0) at forward.c:139
#3  0x070179c7 in wait (this=0x95f8c28, mutex=0x954ef78, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0x95f8c28, mutex=0x954ef78, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0x00258520 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x95f8c10, th=0x9c50898) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0x0025bccc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x959e0e0, th=0x9c50898) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0x00257a4b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x95f8c10, th=0x9c50898) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0x0025bdc2 in ThreadWeaver::WorkingHardState::applyForWork (this=0x959e0e0, th=0x9c50898) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0x00258a23 in ThreadWeaver::WeaverImpl::applyForWork (this=0x95f8c10, th=0x9c50898, previous=0xb3a0368) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0x00259e4e in ThreadWeaver::ThreadRunHelper::run (this=0xaa1fe2f4, parent=0x95f8c10, th=0x9c50898) at ../../../threadweaver/Weaver/Thread.cpp:87
#11 0x0025a56b in ThreadWeaver::Thread::run (this=0x9c50898) at ../../../threadweaver/Weaver/Thread.cpp:142
#12 0x07016df9 in QThreadPrivate::start (arg=0x9c50898) at thread/qthread_unix.cpp:266
#13 0x06678cc9 in start_thread (arg=0xaa1feb70) at pthread_create.c:304
#14 0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 5 (Thread 0xa99fdb70 (LWP 4047)):
#0  0x00278832 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0667d4dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x03de8d9d in __pthread_cond_wait (cond=0x95f8cf8, mutex=0x95f8ce0) at forward.c:139
#3  0x070179c7 in wait (this=0x95f8c28, mutex=0x954ef78, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0x95f8c28, mutex=0x954ef78, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0x00258520 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x95f8c10, th=0x9c503b0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0x0025bccc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x959e0e0, th=0x9c503b0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0x00257a4b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x95f8c10, th=0x9c503b0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0x0025bdc2 in ThreadWeaver::WorkingHardState::applyForWork (this=0x959e0e0, th=0x9c503b0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0x00258a23 in ThreadWeaver::WeaverImpl::applyForWork (this=0x95f8c10, th=0x9c503b0, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0x0025bde1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x959e0e0, th=0x9c503b0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#11 0x00258a23 in ThreadWeaver::WeaverImpl::applyForWork (this=0x95f8c10, th=0x9c503b0, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#12 0x0025bde1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x959e0e0, th=0x9c503b0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#13 0x00258a23 in ThreadWeaver::WeaverImpl::applyForWork (this=0x95f8c10, th=0x9c503b0, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#14 0x0025bde1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x959e0e0, th=0x9c503b0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#15 0x00258a23 in ThreadWeaver::WeaverImpl::applyForWork (this=0x95f8c10, th=0x9c503b0, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#16 0x0025bde1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x959e0e0, th=0x9c503b0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#17 0x00258a23 in ThreadWeaver::WeaverImpl::applyForWork (this=0x95f8c10, th=0x9c503b0, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#18 0x0025bde1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x959e0e0, th=0x9c503b0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#19 0x00258a23 in ThreadWeaver::WeaverImpl::applyForWork (this=0x95f8c10, th=0x9c503b0, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#20 0x0025bde1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x959e0e0, th=0x9c503b0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#21 0x00258a23 in ThreadWeaver::WeaverImpl::applyForWork (this=0x95f8c10, th=0x9c503b0, previous=0xac6ea70) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#22 0x00259e4e in ThreadWeaver::ThreadRunHelper::run (this=0xa99fd2f4, parent=0x95f8c10, th=0x9c503b0) at ../../../threadweaver/Weaver/Thread.cpp:87
#23 0x0025a56b in ThreadWeaver::Thread::run (this=0x9c503b0) at ../../../threadweaver/Weaver/Thread.cpp:142
#24 0x07016df9 in QThreadPrivate::start (arg=0x9c503b0) at thread/qthread_unix.cpp:266
#25 0x06678cc9 in start_thread (arg=0xa99fdb70) at pthread_create.c:304
#26 0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0xa6043b70 (LWP 4080)):
#0  0x00278832 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0667d4dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x03de8d9d in __pthread_cond_wait (cond=0xb786d770, mutex=0xb786d758) at forward.c:139
#3  0xb73653a5 in ?? () from /usr/lib/libQtWebKit.so.4
#4  0xb7365481 in ?? () from /usr/lib/libQtWebKit.so.4
#5  0x06678cc9 in start_thread (arg=0xa6043b70) at pthread_create.c:304
#6  0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xb0dfeb70 (LWP 4648)):
#0  0x00278832 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0667d4dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x03de8d9d in __pthread_cond_wait (cond=0xb04c028, mutex=0xb04c010) at forward.c:139
#3  0x070179c7 in wait (this=0xaa27b18, mutex=0xaeafbe8, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0xaa27b18, mutex=0xaeafbe8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0x00258520 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xaa27b00, th=0x9f44278) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0x0025bccc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xb692df8, th=0x9f44278) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0x00257a4b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xaa27b00, th=0x9f44278) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0x0025bdc2 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb692df8, th=0x9f44278) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0x00258a23 in ThreadWeaver::WeaverImpl::applyForWork (this=0xaa27b00, th=0x9f44278, previous=0xb266098) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0x00259e4e in ThreadWeaver::ThreadRunHelper::run (this=0xb0dfe2f4, parent=0xaa27b00, th=0x9f44278) at ../../../threadweaver/Weaver/Thread.cpp:87
#11 0x0025a56b in ThreadWeaver::Thread::run (this=0x9f44278) at ../../../threadweaver/Weaver/Thread.cpp:142
#12 0x07016df9 in QThreadPrivate::start (arg=0x9f44278) at thread/qthread_unix.cpp:266
#13 0x06678cc9 in start_thread (arg=0xb0dfeb70) at pthread_create.c:304
#14 0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb05fdb70 (LWP 4649)):
#0  0x00278832 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0667d4dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x03de8d9d in __pthread_cond_wait (cond=0xb04c028, mutex=0xb04c010) at forward.c:139
#3  0x070179c7 in wait (this=0xaa27b18, mutex=0xaeafbe8, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0xaa27b18, mutex=0xaeafbe8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0x00258520 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xaa27b00, th=0xb182848) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0x0025bccc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xb692df8, th=0xb182848) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0x00257a4b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xaa27b00, th=0xb182848) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0x0025bdc2 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb692df8, th=0xb182848) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0x00258a23 in ThreadWeaver::WeaverImpl::applyForWork (this=0xaa27b00, th=0xb182848, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0x00259e4e in ThreadWeaver::ThreadRunHelper::run (this=0xb05fd2f4, parent=0xaa27b00, th=0xb182848) at ../../../threadweaver/Weaver/Thread.cpp:87
#11 0x0025a56b in ThreadWeaver::Thread::run (this=0xb182848) at ../../../threadweaver/Weaver/Thread.cpp:142
#12 0x07016df9 in QThreadPrivate::start (arg=0xb182848) at thread/qthread_unix.cpp:266
#13 0x06678cc9 in start_thread (arg=0xb05fdb70) at pthread_create.c:304
#14 0x03ddb69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb6651710 (LWP 3602)):
[KCrash Handler]
#7  0x00278832 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#8  0x03d35941 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#9  0x03d38e42 in abort () at abort.c:92
#10 0x0700d2dc in qt_message_output (msgType=QtFatalMsg, buf=0xb31cce0 "ASSERT: \"bucket < m_bucketCount\" in file /home/tenchi/projects/kdevelop/kdevplatform/language/duchain/repositories/itemrepository.h, line 1858") at global/qglobal.cpp:2259
#11 0x0700d4aa in qt_message (msgType=<value optimized out>, msg=0x7185a7c "ASSERT: \"%s\" in file %s, line %d", ap=0xbfafa6f4 "\375\065m\001\374*m\001B\a") at global/qglobal.cpp:2305
#12 0x0700d5b9 in qFatal (msg=0x7185a7c "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2488
#13 0x0700d645 in qt_assert (assertion=0x16d35fd "bucket < m_bucketCount", file=0x16d2afc "/home/tenchi/projects/kdevelop/kdevplatform/language/duchain/repositories/itemrepository.h", line=1858) at global/qglobal.cpp:2004
#14 0x0166ce48 in KDevelop::ItemRepository<KDevelop::AbstractTypeData, KDevelop::AbstractTypeDataRequest, true, true, 0u, 1048576u>::itemFromIndex (this=0xaea69bf0, index=2930665120) at /home/tenchi/projects/kdevelop/kdevplatform/language/duchain/repositories/itemrepository.h:1858
#15 0x01669159 in KDevelop::TypeRepository::typeForIndex (index=2930665120) at /home/tenchi/projects/kdevelop/kdevplatform/language/duchain/repositories/typerepository.cpp:123
#16 0x0165db2c in KDevelop::IndexedType::abstractType (this=0xa6deb800) at /home/tenchi/projects/kdevelop/kdevplatform/language/duchain/types/indexedtype.cpp:58
#17 0x0357b993 in makeSignatureString (signature=..., visibilityFrom=0xa711a700) at /home/tenchi/projects/kdevelop/kdevelop/languages/cpp/codegen/signatureassistant.cpp:159
#18 0x0357f583 in AdaptSignatureAction::execute (this=0xa4d76ca0) at /home/tenchi/projects/kdevelop/kdevelop/languages/cpp/codegen/signatureassistant.cpp:245
#19 0x00977541 in KDevelop::IAssistantAction::qt_metacall (this=0xa4d76ca0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xa543248) at /home/tenchi/projects/kdevelop/kdevplatform/build/interfaces/iassistant.moc:74
#20 0x0711e8ca in QMetaObject::metacall (object=0xa4d76ca0, cl=3602, idx=4, argv=0xa543248) at kernel/qmetaobject.cpp:237
#21 0x07129df6 in QMetaCallEvent::placeMetaCall (this=0xab9b660, object=0xa4d76ca0) at kernel/qobject.cpp:534
#22 0x0712b6a2 in QObject::event (this=0xa4d76ca0, e=0x6) at kernel/qobject.cpp:1219
#23 0x05468fdc in QApplicationPrivate::notify_helper (this=0x90f7cf0, receiver=0xa4d76ca0, e=0xab9b660) at kernel/qapplication.cpp:4396
#24 0x0546f04e in QApplication::notify (this=0xbfafb55c, receiver=0xa4d76ca0, e=0xab9b660) at kernel/qapplication.cpp:3798
#25 0x012caf7a in KApplication::notify (this=0xbfafb55c, receiver=0xa4d76ca0, event=0xab9b660) at ../../kdeui/kernel/kapplication.cpp:311
#26 0x080516cc in KDevelopApplication::notify (this=0xbfafb55c, receiver=0xa4d76ca0, event=0xab9b660) at /home/tenchi/projects/kdevelop/kdevelop/app/main.cpp:90
#27 0x07118b3b in QCoreApplication::notifyInternal (this=0xbfafb55c, receiver=0xa4d76ca0, event=0xab9b660) at kernel/qcoreapplication.cpp:732
#28 0x0711bd8b in sendEvent (receiver=0x0, event_type=0, data=0x90c2000) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#29 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x90c2000) at kernel/qcoreapplication.cpp:1373
#30 0x0711bf4d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1266
#31 0x07147a74 in sendPostedEvents (s=0x90f9f58) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#32 postEventSourceDispatch (s=0x90f9f58) at kernel/qeventdispatcher_glib.cpp:277
#33 0x0302d855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#34 0x03031668 in ?? () from /lib/libglib-2.0.so.0
#35 0x03031848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#36 0x07147565 in QEventDispatcherGlib::processEvents (this=0x90c1af0, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#37 0x0552abe5 in QGuiEventDispatcherGlib::processEvents (this=0x90c1af0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#38 0x07117609 in QEventLoop::processEvents (this=0xbfafb304, flags=) at kernel/qeventloop.cpp:149
#39 0x07117a8a in QEventLoop::exec (this=0xbfafb304, flags=...) at kernel/qeventloop.cpp:201
#40 0x0711c00f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#41 0x05467e07 in QApplication::exec () at kernel/qapplication.cpp:3672
#42 0x080513b2 in main (argc=1, argv=0xbfafbd24) at /home/tenchi/projects/kdevelop/kdevelop/app/main.cpp:468

Reported using DrKonqi
Comment 1 Milian Wolff 2011-01-31 12:35:40 UTC
I've seen this assert before, but never in association with one of the assistants. anyways, we need to fix this somehow.

David, and clue what might be going on?
Comment 2 Eric Thiele 2011-02-15 10:46:25 UTC
Created attachment 57272 [details]
New crash information added by DrKonqi

kdevelop (4.2.60) on KDE Platform 4.6.00 (4.6.0) using Qt 4.7.1

Changed c++ Ctor and pressed update definition

kdevplatform:  v1.2.0-184-g1bd2ae1
kdevelop: v4.2.0-109-g624ef04

-- Backtrace (Reduced):
#6  QList<QPair<KDevelop::IndexedType, QString> >::Node::t (this=0x325a6218) at /usr/include/qt4/QtCore/qlist.h:108
#7  0x00007f1e7fdc46b1 in makeSignatureString (signature=..., visibilityFrom=0xf14a090) at /var/tmp/portage/dev-util/kdevelop-9999/work/kdevelop-9999/languages/cpp/codegen/signatureassistant.cpp:156
#8  0x00007f1e7fdc6d9f in AdaptSignatureAction::execute (this=0x5b64a00) at /var/tmp/portage/dev-util/kdevelop-9999/work/kdevelop-9999/languages/cpp/codegen/signatureassistant.cpp:247
#9  0x00007f1eac43a3ad in KDevelop::IAssistantAction::qt_metacall (this=0x5b64a00, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=<value optimized out>) at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999_build/interfaces/iassistant.moc:74
#10 0x00007f1eab2825c2 in QObject::event (this=0x5b64a00, e=<value optimized out>) at kernel/qobject.cpp:1211
Comment 3 Milian Wolff 2011-02-15 10:58:04 UTC
Eric: unrelated to this bug report, put it into a new one. And I don't see how a foreach() can possibly crash o_O
Comment 4 robbenson18 2011-05-06 17:00:52 UTC
Created attachment 59704 [details]
New crash information added by DrKonqi

kdevelop (4.2.2) on KDE Platform 4.6.2 (4.6.2) using Qt 4.7.2

Kdevelop crashed when trying to update my header definition.

-- Backtrace (Reduced):
#6  itemFromIndex (index=79509648) at ../../language/duchain/repositories/typerepository.cpp:152
#7  KDevelop::TypeRepository::typeForIndex (index=79509648) at ../../language/duchain/repositories/typerepository.cpp:123
#8  0x00007f41221deffa in KDevelop::IndexedType::abstractType (this=<value optimized out>) at ../../language/duchain/types/indexedtype.cpp:58
[...]
#11 0x00007f4126d38165 in KDevelop::IAssistantAction::qt_metacall (this=0x4081e80, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=<value optimized out>) at ./iassistant.moc:74
#12 0x00007f4125bf149a in QObject::event (this=0x4081e80, e=<value optimized out>) at kernel/qobject.cpp:1226
Comment 5 Milian Wolff 2011-06-08 18:29:52 UTC
*** Bug 275206 has been marked as a duplicate of this bug. ***
Comment 6 Olivier.jg 2011-08-21 03:18:01 UTC
*** Bug 267132 has been marked as a duplicate of this bug. ***
Comment 7 Milian Wolff 2011-08-28 13:12:34 UTC
/me wonders whether this could simply be an issue due to a corrupted .kdevduchain cache and hence only occur once and then be gone since the cache gets wiped after two consecutive crashes...
Comment 8 Milian Wolff 2013-12-01 16:24:06 UTC
*** Bug 318046 has been marked as a duplicate of this bug. ***
Comment 9 Milian Wolff 2014-08-08 14:21:26 UTC
With kdev-qmljs completion test, one can now reliably trigger this assertion - so let's hope I can debug it and fix it.
Comment 10 Milian Wolff 2014-08-08 15:08:29 UTC
Backtrace from there:

(gdb) bt
#0  0x00007ffff39d6d67 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff39d8118 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff572e9ff in qt_message_output(QtMsgType, char const*) () from /usr/lib/libQtCore.so.4
#3  0x00007ffff572eb89 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007ffff572f394 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#5  0x00007ffff785c3df in KDevelop::ItemRepository<KDevelop::IdentifierPrivate<false>, KDevelop::IdentifierItemRequest, true, true, 0u, 1048576u>::itemFromIndex (this=0x643610, index=13631488)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/repositories/itemrepository.h:1656
#6  0x00007ffff7855a60 in KDevelop::Identifier::Identifier (this=0x7fffffffc120, index=13631488)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:361
#7  0x00007ffff7858f56 in KDevelop::IndexedIdentifier::operator KDevelop::Identifier (this=0x2551ad4)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:1399
#8  0x00007ffff785b286 in KDevelop::QualifiedIdentifierPrivate<true>::hash (this=0x507710)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:260
#9  0x00007ffff7859bef in KDevelop::QualifiedIdentifierItemRequest::QualifiedIdentifierItemRequest (this=0x7fffffffc1a0, identifier=...)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:277
#10 0x00007ffff7857f3b in KDevelop::QualifiedIdentifier::makeConstant (this=0x7fffffffc240)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:1118
#11 0x00007ffff78567b2 in KDevelop::QualifiedIdentifier::index (this=0x7fffffffc240)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:616
#12 0x00007ffff78590cd in KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier (this=0x7fffffffc260, id=...)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:1440
#13 0x00007ffff783e89e in KDevelop::Declaration::~Declaration (this=0x7fffc4889fd0, __in_chrg=<optimized out>)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/declaration.cpp:179
#14 0x00007ffff784be54 in KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration (this=0x7fffc4889fd0, __in_chrg=<optimized out>)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/classmemberdeclaration.cpp:87
#15 0x00007ffff784be84 in KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration (this=0x7fffc4889fd0, __in_chrg=<optimized out>)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/classmemberdeclaration.cpp:89
#16 0x00007ffff780f617 in KDevelop::DUContext::deleteLocalDeclarations (this=0x7fffc4594370)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/ducontext.cpp:1063
#17 0x00007ffff780ba5b in KDevelop::DUContext::~DUContext (this=0x7fffc4594370, __in_chrg=<optimized out>)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/ducontext.cpp:498
#18 0x00007ffff39657d6 in QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext (this=0x7fffc4594370, __in_chrg=<optimized out>)
    at /ssd/milian/projects/kde4/kdev-qmljs/duchain/qmljsducontext.h:40
#19 0x00007ffff3965806 in QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext (this=0x7fffc4594370, __in_chrg=<optimized out>)
    at /ssd/milian/projects/kde4/kdev-qmljs/duchain/qmljsducontext.h:40
#20 0x00007ffff780f80c in KDevelop::DUContext::deleteChildContextsRecursively (this=0x7fffc465a3a0)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/ducontext.cpp:1080
#21 0x00007ffff780b9fd in KDevelop::DUContext::~DUContext (this=0x7fffc465a3a0, __in_chrg=<optimized out>)
---Type <return> to continue, or q <return> to quit---
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/ducontext.cpp:493
#22 0x00007ffff39657d6 in QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext (this=0x7fffc465a3a0, __in_chrg=<optimized out>)
    at /ssd/milian/projects/kde4/kdev-qmljs/duchain/qmljsducontext.h:40
#23 0x00007ffff3965806 in QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext (this=0x7fffc465a3a0, __in_chrg=<optimized out>)
    at /ssd/milian/projects/kde4/kdev-qmljs/duchain/qmljsducontext.h:40
#24 0x00007ffff780f80c in KDevelop::DUContext::deleteChildContextsRecursively (this=0x7fffc46f0fa0)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/ducontext.cpp:1080
#25 0x00007ffff7826021 in KDevelop::TopDUContext::~TopDUContext (this=0x7fffc46f0fa0, __in_chrg=<optimized out>)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/topducontext.cpp:566
#26 0x00007ffff396583a in QmlJS::QmlJSDUContext<KDevelop::TopDUContext, 110>::~QmlJSDUContext (this=0x7fffc46f0fa0, 
    __in_chrg=<optimized out>) at /ssd/milian/projects/kde4/kdev-qmljs/duchain/qmljsducontext.h:40
#27 0x00007ffff396586a in QmlJS::QmlJSDUContext<KDevelop::TopDUContext, 110>::~QmlJSDUContext (this=0x7fffc46f0fa0, 
    __in_chrg=<optimized out>) at /ssd/milian/projects/kde4/kdev-qmljs/duchain/qmljsducontext.h:40
#28 0x00007ffff78260d4 in KDevelop::TopDUContext::deleteSelf (this=0x7fffc46f0fa0)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/topducontext.cpp:578
#29 0x00007ffff77e9ce3 in KDevelop::DUChainPrivate::removeDocumentChainFromMemory (this=0x664650, context=0x7fffc46f0fa0)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/duchain.cpp:408
#30 0x00007ffff77e98c8 in KDevelop::DUChainPrivate::clear (this=0x664650)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/duchain.cpp:371
#31 0x00007ffff77e6175 in KDevelop::DUChain::shutdown (this=0x1290880)
    at /ssd/milian/projects/kde4/kdevplatform/language/duchain/duchain.cpp:1585
#32 0x00007ffff7ac28ad in KDevelop::Core::cleanup (this=0x4ea930) at /ssd/milian/projects/kde4/kdevplatform/shell/core.cpp:416
#33 0x00007ffff7ac26c2 in KDevelop::Core::shutdown (this=0x4ea930) at /ssd/milian/projects/kde4/kdevplatform/shell/core.cpp:377
#34 0x00007ffff7fa618e in KDevelop::TestCore::shutdown () at /ssd/milian/projects/kde4/kdevplatform/tests/testcore.cpp:89
#35 0x0000000000403c85 in QmlJS::QmlCompletionTest::cleanupTestCase (this=0x7fffffffd010)
    at /ssd/milian/projects/kde4/kdev-qmljs/codecompletion/tests/qmlcompletiontest.cpp:157
#36 0x0000000000402d7c in QmlJS::QmlCompletionTest::qt_static_metacall (_o=0x7fffffffd010, _c=QMetaObject::InvokeMetaMethod, _id=1, 
    _a=0x7fffffffcdd0) at /ssd/milian/projects/.build/kde4/kdev-qmljs/codecompletion/tests/moc_qmlcompletiontest.cpp:58
#37 0x00007ffff58434a8 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () from /usr/lib/libQtCore.so.4
#38 0x00007ffff7bc001f in ?? () from /usr/lib/libQtTest.so.4
#39 0x00007ffff7bc3b76 in QTest::qExec(QObject*, int, char**) () from /usr/lib/libQtTest.so.4
#40 0x0000000000403082 in main (argc=1, argv=0x7fffffffd128)
    at /ssd/milian/projects/kde4/kdev-qmljs/codecompletion/tests/qmlcompletiontest.cpp:42

...

(gdb) print bucket
$1 = 208
(gdb) print m_bucketCount 
$2 = 10
(gdb) print index
$3 = 13631488
Comment 11 Milian Wolff 2014-08-08 15:56:05 UTC
==6703== Invalid read of size 4
==6703==    at 0x5328337: KDevelop::IndexedIdentifier::IndexedIdentifier(KDevelop::IndexedIdentifier const&) (identifier.cpp:1299)
==6703==    by 0x532C903: QVarLengthArray<KDevelop::IndexedIdentifier, 10>::append(KDevelop::IndexedIdentifier const*, int) (qvarlengtharray.h:224)
==6703==    by 0x5327528: KDevelop::QualifiedIdentifier::push(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1028)
==6703==    by 0x5326EFA: KDevelop::QualifiedIdentifier::operator+=(KDevelop::QualifiedIdentifier const&) (identifier.cpp:846)
==6703==    by 0x52D960F: KDevelop::DUContextDynamicData::scopeIdentifier(bool, KDevelop::QualifiedIdentifier&) const (ducontext.cpp:155)
==6703==    by 0x52DEF3A: KDevelop::DUContext::scopeIdentifier(bool) const (ducontext.cpp:1096)
==6703==    by 0x530E688: KDevelop::Declaration::qualifiedIdentifier() const (declaration.cpp:298)
==6703==    by 0x530DDF2: KDevelop::Declaration::~Declaration() (declaration.cpp:178)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703==  Address 0x2302718e is 65,534 bytes inside a block of size 65,536 alloc'd
==6703==    at 0x4C293B0: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6703==    by 0x533305B: KDevelop::Bucket<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, 0u>::initialize(unsigned int) (itemrepository.h:144)
==6703==    by 0x532F456: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::initializeBucket(unsigned int) const (itemrepository.h:2344)
==6703==    by 0x532B65E: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1227)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328D5B: KDevelop::IndexedQualifiedIdentifier::operator=(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1488)
==6703==    by 0x52DF0EC: KDevelop::DUContext::setLocalScopeIdentifier(KDevelop::QualifiedIdentifier const&) (ducontext.cpp:1128)
==6703==    by 0x92AB25C: KDevelop::AbstractContextBuilder<QmlJS::AST::Node, QmlJS::AST::IdentifierPropertyName>::openContextInternal(KDevelop::RangeInRevision const&, KDevelop::DUContext::ContextType, KDevelop::QualifiedIdentifier const&) (abstractcontextbuilder.h:621)
==6703==    by 0x92B543F: KDevelop::AbstractContextBuilder<QmlJS::AST::Node, QmlJS::AST::IdentifierPropertyName>::openContext(QmlJS::AST::Node*, KDevelop::RangeInRevision const&, KDevelop::DUContext::ContextType, KDevelop::QualifiedIdentifier const&) (abstractcontextbuilder.h:378)
==6703==    by 0x92AFEBC: DeclarationBuilder::declareComponentSubclass(QmlJS::AST::UiObjectInitializer*, KDevelop::RangeInRevision const&, QString const&, QmlJS::AST::UiQualifiedId*) (declarationbuilder.cpp:873)
==6703==    by 0x92B18DA: DeclarationBuilder::visit(QmlJS::AST::UiObjectDefinition*) (declarationbuilder.cpp:1189)
==6703== 
==6703== Conditional jump or move depends on uninitialised value(s)
==6703==    at 0x532AD62: KDevelop::QualifiedIdentifierPrivate<true>::hash() const (identifier.cpp:256)
==6703==    by 0x5329642: KDevelop::QualifiedIdentifierItemRequest::hash() const (identifier.cpp:290)
==6703==    by 0x532B18F: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1142)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328AF2: KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1443)
==6703==    by 0x530DE1B: KDevelop::Declaration::~Declaration() (declaration.cpp:179)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703==    by 0x92AA7D5: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (in /ssd/milian/projects/compiled/kde4/lib/libkdevqmljsduchain.so)
==6703== 
==6703== Use of uninitialised value of size 8
==6703==    at 0x532B1C7: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1146)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328AF2: KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1443)
==6703==    by 0x530DE1B: KDevelop::Declaration::~Declaration() (declaration.cpp:179)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703==    by 0x92AA7D5: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (in /ssd/milian/projects/compiled/kde4/lib/libkdevqmljsduchain.so)
==6703==    by 0x92AA805: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (qmljsducontext.h:40)
==6703==    by 0x52DED9F: KDevelop::DUContext::deleteChildContextsRecursively() (ducontext.cpp:1080)
==6703== 
==6703== Conditional jump or move depends on uninitialised value(s)
==6703==    at 0x532AD62: KDevelop::QualifiedIdentifierPrivate<true>::hash() const (identifier.cpp:256)
==6703==    by 0x5329642: KDevelop::QualifiedIdentifierItemRequest::hash() const (identifier.cpp:290)
==6703==    by 0x532F4EE: KDevelop::Bucket<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, 0u>::findIndex(KDevelop::QualifiedIdentifierItemRequest const&) const (itemrepository.h:266)
==6703==    by 0x532B695: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1232)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328AF2: KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1443)
==6703==    by 0x530DE1B: KDevelop::Declaration::~Declaration() (declaration.cpp:179)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703== 
==6703== Use of uninitialised value of size 8
==6703==    at 0x532F519: KDevelop::Bucket<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, 0u>::findIndex(KDevelop::QualifiedIdentifierItemRequest const&) const (itemrepository.h:267)
==6703==    by 0x532B695: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1232)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328AF2: KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1443)
==6703==    by 0x530DE1B: KDevelop::Declaration::~Declaration() (declaration.cpp:179)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703==    by 0x92AA7D5: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (in /ssd/milian/projects/compiled/kde4/lib/libkdevqmljsduchain.so)
==6703==    by 0x92AA805: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (qmljsducontext.h:40)
==6703== 
==6703== Conditional jump or move depends on uninitialised value(s)
==6703==    at 0x532AD62: KDevelop::QualifiedIdentifierPrivate<true>::hash() const (identifier.cpp:256)
==6703==    by 0x5329642: KDevelop::QualifiedIdentifierItemRequest::hash() const (identifier.cpp:290)
==6703==    by 0x532FB86: KDevelop::Bucket<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, 0u>::index(KDevelop::QualifiedIdentifierItemRequest const&, unsigned int) (itemrepository.h:286)
==6703==    by 0x532B6D9: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1234)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328AF2: KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1443)
==6703==    by 0x530DE1B: KDevelop::Declaration::~Declaration() (declaration.cpp:179)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703== 
==6703== Use of uninitialised value of size 8
==6703==    at 0x532FBB1: KDevelop::Bucket<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, 0u>::index(KDevelop::QualifiedIdentifierItemRequest const&, unsigned int) (itemrepository.h:287)
==6703==    by 0x532B6D9: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1234)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328AF2: KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1443)
==6703==    by 0x530DE1B: KDevelop::Declaration::~Declaration() (declaration.cpp:179)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703==    by 0x92AA7D5: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (in /ssd/milian/projects/compiled/kde4/lib/libkdevqmljsduchain.so)
==6703==    by 0x92AA805: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (qmljsducontext.h:40)
==6703== 
QDEBUG : QmlJS::QmlCompletionTest::cleanupTestCase() unsigned int KDevelop::ItemRepository<Item, ItemRequest, markForReferenceCounting, threadSafe, fixedItemSize, targetBucketHashSize>::index(const ItemRequest&) [with Item = KDevelop::QualifiedIdentifierPrivate<false>; ItemRequest = KDevelop::QualifiedIdentifierItemRequest; bool markForReferenceCounting = true; bool threadSafe = true; unsigned int fixedItemSize = 0u; unsigned int targetBucketHashSize = 1048576u] 1287 "Qualified Identifier Repository" 37 
==6703== Conditional jump or move depends on uninitialised value(s)
==6703==    at 0x532AD62: KDevelop::QualifiedIdentifierPrivate<true>::hash() const (identifier.cpp:256)
==6703==    by 0x5329642: KDevelop::QualifiedIdentifierItemRequest::hash() const (identifier.cpp:290)
==6703==    by 0x532FB86: KDevelop::Bucket<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, 0u>::index(KDevelop::QualifiedIdentifierItemRequest const&, unsigned int) (itemrepository.h:286)
==6703==    by 0x532BBEC: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1299)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328AF2: KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1443)
==6703==    by 0x530DE1B: KDevelop::Declaration::~Declaration() (declaration.cpp:179)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703== 
==6703== Use of uninitialised value of size 8
==6703==    at 0x532FBB1: KDevelop::Bucket<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, 0u>::index(KDevelop::QualifiedIdentifierItemRequest const&, unsigned int) (itemrepository.h:287)
==6703==    by 0x532BBEC: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1299)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328AF2: KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1443)
==6703==    by 0x530DE1B: KDevelop::Declaration::~Declaration() (declaration.cpp:179)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703==    by 0x92AA7D5: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (in /ssd/milian/projects/compiled/kde4/lib/libkdevqmljsduchain.so)
==6703==    by 0x92AA805: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (qmljsducontext.h:40)
==6703== 
==6703== Use of uninitialised value of size 8
==6703==    at 0x532FD24: KDevelop::Bucket<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, 0u>::index(KDevelop::QualifiedIdentifierItemRequest const&, unsigned int) (itemrepository.h:312)
==6703==    by 0x532BBEC: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1299)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328AF2: KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1443)
==6703==    by 0x530DE1B: KDevelop::Declaration::~Declaration() (declaration.cpp:179)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703==    by 0x92AA7D5: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (in /ssd/milian/projects/compiled/kde4/lib/libkdevqmljsduchain.so)
==6703==    by 0x92AA805: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (qmljsducontext.h:40)
==6703== 
==6703== Use of uninitialised value of size 8
==6703==    at 0x532FD61: KDevelop::Bucket<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, 0u>::index(KDevelop::QualifiedIdentifierItemRequest const&, unsigned int) (itemrepository.h:313)
==6703==    by 0x532BBEC: KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>, KDevelop::QualifiedIdentifierItemRequest, true, true, 0u, 1048576u>::index(KDevelop::QualifiedIdentifierItemRequest const&) (itemrepository.h:1299)
==6703==    by 0x532797F: KDevelop::QualifiedIdentifier::makeConstant() const (identifier.cpp:1121)
==6703==    by 0x53261D7: KDevelop::QualifiedIdentifier::index() const (identifier.cpp:619)
==6703==    by 0x5328AF2: KDevelop::IndexedQualifiedIdentifier::IndexedQualifiedIdentifier(KDevelop::QualifiedIdentifier const&) (identifier.cpp:1443)
==6703==    by 0x530DE1B: KDevelop::Declaration::~Declaration() (declaration.cpp:179)
==6703==    by 0x531B879: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:87)
==6703==    by 0x531B8A9: KDevelop::ClassMemberDeclaration::~ClassMemberDeclaration() (classmemberdeclaration.cpp:89)
==6703==    by 0x52DEBAA: KDevelop::DUContext::deleteLocalDeclarations() (ducontext.cpp:1063)
==6703==    by 0x52DAFEE: KDevelop::DUContext::~DUContext() (ducontext.cpp:498)
==6703==    by 0x92AA7D5: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (in /ssd/milian/projects/compiled/kde4/lib/libkdevqmljsduchain.so)
==6703==    by 0x92AA805: QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::~QmlJSDUContext() (qmljsducontext.h:40)
==6703== 
QFATAL : QmlJS::QmlCompletionTest::cleanupTestCase() ASSERT failure in void KDevelop::ItemRepository<Item, ItemRequest, markForReferenceCounting, threadSafe, fixedItemSize, targetBucketHashSize>::verifyIndex(uint) const [with Item = KDevelop::IdentifierPrivate<false>; ItemRequest = KDevelop::IdentifierItemRequest; bool markForReferenceCounting = true; bool threadSafe = true; unsigned int fixedItemSize = 0u; unsigned int targetBucketHashSize = 1048576u; uint = unsigned int]: "index 13631488 gives invalid bucket number 208, current count is: 10", file /ssd/milian/projects/kde4/kdevplatform/language/duchain/repositories/itemrepository.h, line 2442
FAIL!  : QmlJS::QmlCompletionTest::cleanupTestCase() Received a fatal error.
   Loc: [Unknown file(0)
Comment 12 Milian Wolff 2014-08-08 16:11:23 UTC
Git commit 5866324bd61fdf4014a74fe67f6bdda72e36c629 by Milian Wolff.
Committed on 08/08/2014 at 15:52.
Pushed by mwolff into branch 'master'.

Everywhere verify the index before returning/using it.

M  +33   -16   language/duchain/repositories/itemrepository.h

http://commits.kde.org/kdevplatform/5866324bd61fdf4014a74fe67f6bdda72e36c629
Comment 13 Milian Wolff 2014-08-09 16:07:20 UTC
OK, I finally figured out the reason for this bug, the fix is not yet clear to me, lets see.

1) we create a QID and store its Indexed form in memory
2) since we never serialize this item it never plays a role in the on-disk refcounting
3) on shutdown, globalItemRepositoryRegistry().finalCleanup() is called in DUChain::shutdown
4) later in that function, sdDUChainPrivate->doMoreCleanup(); and sdDUChainPrivate->clear(); are called, the latter of which will again call doMoreCleanup
5) eventually in-memory DUContexts will get unloaded, if they happen to have an IndexedQID stored which was cleaned up (since it never was serialized, its refcount was not increased), we will access a deleted item in the itemrepo

-> havoc.
Comment 14 Milian Wolff 2014-08-09 16:25:36 UTC
Created attachment 88184 [details]
add additional debug code to identifier.cpp

this patch is too ugly for me to add to the codebase, but I don't want to loose it either so here it is attached (it helped me figure out whats going on here).
Comment 15 Milian Wolff 2014-08-09 17:33:34 UTC
Git commit 5d1e162f4b624be896efb9dad8e952d9596f8424 by Milian Wolff.
Committed on 09/08/2014 at 17:29.
Pushed by mwolff into branch '1.7'.

Delay final cleanup of DataRepositories until end of DUChain shutdown.

This is required, as otherwise non-disk-refcounted items might get
deleted but then later-on accessed again. This is a reason for
random crashes during shutdown, which only occur for complicated
DUChain structures. Only then would further cleanup happen after
the call to ItemRepo's finalCleanup, and DUContexts still lie
around in memory...

Thankfully we had a reproducible test case with the code completion
unit test in kdev-qmljs (master) which is fixed by this patch.
Logically, I'm also confident that this is the correct approach.

M  +5    -6    language/duchain/duchain.cpp

http://commits.kde.org/kdevplatform/5d1e162f4b624be896efb9dad8e952d9596f8424