Bug 316212

Summary: Unexpected crash while writing code [Php::CodeCompletionContext::CodeCompletionContext(...)]
Product: [Applications] kdevelop Reporter: Alessandro Cosentino <cosenal>
Component: Language Support: PHPAssignee: kdevelop-bugs-null
Status: RESOLVED NOT A BUG    
Severity: crash CC: aleixpol
Priority: NOR    
Version First Reported In: 4.3.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alessandro Cosentino 2013-03-06 09:21:01 UTC
Application: kdevelop (4.3.1)
KDE Platform Version: 4.8.5 (4.8.5)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-38-generic x86_64
Distribution: Ubuntu 12.04.2 LTS

-- Information about the crash:
I was just writing PHP code. The same kind of random crash happens pretty often with this version of Kdevelop

The crash can be reproduced some of the time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
~QHash (this=0x7f84aa2104b8, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qhash.h:283
283	    inline ~QHash() { if (!d->ref.deref()) freeData(d); }
[Current thread is 1 (Thread 0x7f84ab039780 (LWP 18963))]

Thread 11 (Thread 0x7f847735a700 (LWP 18967)):
#0  0x00007f84a81b3303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f84a3259036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f84a3259164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f84a9602426 in QEventDispatcherGlib::processEvents (this=0x7f84700008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f84a95d1c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f84a95d1ed7 in QEventLoop::exec (this=0x7f8477359dd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f84a94d0fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f84a95b19ff in QInotifyFileSystemWatcherEngine::run (this=0x40cf9d0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f84a94d3fcb in QThreadPrivate::start (arg=0x40cf9d0) at thread/qthread_unix.cpp:298
#9  0x00007f84a7520e9a in start_thread (arg=0x7f847735a700) at pthread_create.c:308
#10 0x00007f84a81becbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7f84768b0700 (LWP 19025)):
#0  0x00007f84a752405d in __pthread_mutex_unlock_usercnt (mutex=<optimized out>, decr=<optimized out>) at pthread_mutex_unlock.c:52
#1  __pthread_mutex_unlock (mutex=0x7f8468000a60) at pthread_mutex_unlock.c:290
#2  0x00007f84a32945d1 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f84a32587e2 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f84a3258f5b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f84a3259164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f84a9602426 in QEventDispatcherGlib::processEvents (this=0x7f84680008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#7  0x00007f84a95d1c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#8  0x00007f84a95d1ed7 in QEventLoop::exec (this=0x7f84768afdd0, flags=...) at kernel/qeventloop.cpp:204
#9  0x00007f84a94d0fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#10 0x00007f84a95b19ff in QInotifyFileSystemWatcherEngine::run (this=0x463eb30) at io/qfilesystemwatcher_inotify.cpp:248
#11 0x00007f84a94d3fcb in QThreadPrivate::start (arg=0x463eb30) at thread/qthread_unix.cpp:298
#12 0x00007f84a7520e9a in start_thread (arg=0x7f84768b0700) at pthread_create.c:308
#13 0x00007f84a81becbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#14 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f8474c34700 (LWP 19136)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f84a0380dec in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x00007f84a0380f19 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x00007f84a7520e9a in start_thread (arg=0x7f8474c34700) at pthread_create.c:308
#4  0x00007f84a81becbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f8475435700 (LWP 19137)):
#0  0x00007f84a752405d in __pthread_mutex_unlock_usercnt (mutex=<optimized out>, decr=<optimized out>) at pthread_mutex_unlock.c:52
#1  __pthread_mutex_unlock (mutex=0x7f8460000980) at pthread_mutex_unlock.c:290
#2  0x00007f84a32945d1 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f84a3258b3d in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f84a3258fd6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f84a3259164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f84a9602426 in QEventDispatcherGlib::processEvents (this=0x7f84600021c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#7  0x00007f84a95d1c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#8  0x00007f84a95d1ed7 in QEventLoop::exec (this=0x7f8475434e00, flags=...) at kernel/qeventloop.cpp:204
#9  0x00007f84a94d0fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#10 0x00007f84a94d3fcb in QThreadPrivate::start (arg=0x4699630) at thread/qthread_unix.cpp:298
#11 0x00007f84a7520e9a in start_thread (arg=0x7f8475435700) at pthread_create.c:308
#12 0x00007f84a81becbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f8466b5d700 (LWP 19192)):
[KCrash Handler]
#6  0x00007f84a55ee6d0 in KDevelop::DUContext::type() const () from /usr/lib/libkdevplatformlanguage.so.5
#7  0x00007f8466b718c9 in Php::CodeCompletionContext::CodeCompletionContext(KDevelop::DUChainPointer<KDevelop::DUContext>, QString const&, QString const&, KDevelop::CursorInRevision const&, int) () from /usr/lib/libkdev4phpcompletion.so
#8  0x00007f8466b6a6f9 in Php::CodeCompletionWorker::createCompletionContext(KDevelop::DUChainPointer<KDevelop::DUContext>, QString const&, QString const&, KDevelop::CursorInRevision const&) const () from /usr/lib/libkdev4phpcompletion.so
#9  0x00007f84a56d2a4d in KDevelop::CodeCompletionWorker::computeCompletions(KDevelop::DUChainPointer<KDevelop::DUContext>, KTextEditor::Cursor const&, QString, KTextEditor::Range const&, QString const&) () from /usr/lib/libkdevplatformlanguage.so.5
#10 0x00007f84a56d2367 in KDevelop::CodeCompletionWorker::computeCompletions(KDevelop::DUChainPointer<KDevelop::DUContext>, KTextEditor::Cursor const&, KTextEditor::View*) () from /usr/lib/libkdevplatformlanguage.so.5
#11 0x00007f84a56d28f2 in ?? () from /usr/lib/libkdevplatformlanguage.so.5
#12 0x00007f84a95ec446 in QObject::event (this=0x7615230, e=<optimized out>) at kernel/qobject.cpp:1195
#13 0x00007f84a8955894 in notify_helper (e=0x7485300, receiver=0x7615230, this=0x228e4a0) at kernel/qapplication.cpp:4559
#14 QApplicationPrivate::notify_helper (this=0x228e4a0, receiver=0x7615230, e=0x7485300) at kernel/qapplication.cpp:4531
#15 0x00007f84a895a713 in QApplication::notify (this=0x7fffe54758b0, receiver=0x7615230, e=0x7485300) at kernel/qapplication.cpp:4420
#16 0x00007f84a9dde3f6 in KApplication::notify (this=0x7fffe54758b0, receiver=0x7615230, event=0x7485300) at ../../kdeui/kernel/kapplication.cpp:311
#17 0x00007f84a95d2e9c in QCoreApplication::notifyInternal (this=0x7fffe54758b0, receiver=0x7615230, event=0x7485300) at kernel/qcoreapplication.cpp:876
#18 0x00007f84a95d6c6a in sendEvent (event=0x7485300, receiver=0x7615230) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x757ea70) at kernel/qcoreapplication.cpp:1500
#20 0x00007f84a9601f93 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#21 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#22 0x00007f84a3258d53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f84a32590a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f84a3259164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f84a96023bf in QEventDispatcherGlib::processEvents (this=0x7f846c002800, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#26 0x00007f84a95d1c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#27 0x00007f84a95d1ed7 in QEventLoop::exec (this=0x7f8466b5ce00, flags=...) at kernel/qeventloop.cpp:204
#28 0x00007f84a94d0fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#29 0x00007f84a94d3fcb in QThreadPrivate::start (arg=0x7196130) at thread/qthread_unix.cpp:298
#30 0x00007f84a7520e9a in start_thread (arg=0x7f8466b5d700) at pthread_create.c:308
#31 0x00007f84a81becbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#32 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f846635c700 (LWP 19193)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f84a94d44db in wait (time=18446744073709551615, this=0x2782680) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x26099c0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f84a0d770eb in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x2782810, th=0x43c5b30) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f84a0d799db in ThreadWeaver::WorkingHardState::applyForWork (this=0x2675e30, th=0x43c5b30) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f84a0d7884f in ThreadWeaver::ThreadRunHelper::run (this=0x7f846635be20, parent=0x2782810, th=0x43c5b30) at ../../../threadweaver/Weaver/Thread.cpp:87
#6  0x00007f84a0d788db in ThreadWeaver::Thread::run (this=0x43c5b30) at ../../../threadweaver/Weaver/Thread.cpp:142
#7  0x00007f84a94d3fcb in QThreadPrivate::start (arg=0x43c5b30) at thread/qthread_unix.cpp:298
#8  0x00007f84a7520e9a in start_thread (arg=0x7f846635c700) at pthread_create.c:308
#9  0x00007f84a81becbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f84655aa700 (LWP 19194)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f84a94d44db in wait (time=18446744073709551615, this=0x2782680) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x26099c0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f84a0d770eb in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x2782810, th=0x78cca80) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f84a0d799db in ThreadWeaver::WorkingHardState::applyForWork (this=0x2675e30, th=0x78cca80) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f84a0d799f4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2675e30, th=0x78cca80) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007f84a0d7884f in ThreadWeaver::ThreadRunHelper::run (this=0x7f84655a9e20, parent=0x2782810, th=0x78cca80) at ../../../threadweaver/Weaver/Thread.cpp:87
#7  0x00007f84a0d788db in ThreadWeaver::Thread::run (this=0x78cca80) at ../../../threadweaver/Weaver/Thread.cpp:142
#8  0x00007f84a94d3fcb in QThreadPrivate::start (arg=0x78cca80) at thread/qthread_unix.cpp:298
#9  0x00007f84a7520e9a in start_thread (arg=0x7f84655aa700) at pthread_create.c:308
#10 0x00007f84a81becbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f841b857700 (LWP 19195)):
#0  0x00007f84a81b3303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f84a3259036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f84a3259164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f84a9602426 in QEventDispatcherGlib::processEvents (this=0x7f84100008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f84a95d1c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f84a95d1ed7 in QEventLoop::exec (this=0x7f841b856e00, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f84a94d0fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f84a94d3fcb in QThreadPrivate::start (arg=0x7094020) at thread/qthread_unix.cpp:298
#8  0x00007f84a7520e9a in start_thread (arg=0x7f841b857700) at pthread_create.c:308
#9  0x00007f84a81becbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f841b056700 (LWP 19196)):
#0  0x00007f84a81b3303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f84a3259036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f84a3259164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f84a9602426 in QEventDispatcherGlib::processEvents (this=0x7f84080008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f84a95d1c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f84a95d1ed7 in QEventLoop::exec (this=0x7f841b055e00, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f84a94d0fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f84a94d3fcb in QThreadPrivate::start (arg=0x769d010) at thread/qthread_unix.cpp:298
#8  0x00007f84a7520e9a in start_thread (arg=0x7f841b056700) at pthread_create.c:308
#9  0x00007f84a81becbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f841a2e3700 (LWP 19237)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f849128b222 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007f849128b259 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007f84a7520e9a in start_thread (arg=0x7f841a2e3700) at pthread_create.c:308
#4  0x00007f84a81becbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f84ab039780 (LWP 18963)):
#0  ~QHash (this=0x7f84aa2104b8, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qhash.h:283
#1  QSet<KModifierKeyInfoProvider*>::~QSet (this=0x7f84aa2104b8, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qset.h:54
#2  0x00007f84a8106d1d in __cxa_finalize (d=0x7f84aa20df40) at cxa_finalize.c:56
#3  0x00007f84a9cef866 in __do_global_dtors_aux () from /usr/lib/libkdeui.so.5
#4  0x00007fffe5474b70 in ?? ()
#5  0x00007fffe5475440 in ?? ()
#6  0x00007f84a9f37d61 in _fini () from /usr/lib/libkdeui.so.5
#7  0x00007fffe5475440 in ?? ()
#8  0x00007f84aae7192d in _dl_fini () at dl-fini.c:259
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Reported using DrKonqi
Comment 1 Kevin Funk 2013-03-07 09:16:55 UTC
Similar, if not a duplicate to https://bugs.kde.org/show_bug.cgi?id=294218.
Comment 2 Milian Wolff 2014-07-04 09:30:58 UTC
kdevelop 4.3 is pretty old. please try again with a recent version, such as 4.7 beta 1.