Ensure method call with non-null type
ClosedPublic

Authored by cordlandwehr on May 16 2016, 11:40 AM.

Details

Summary

This patch attempts to fix the attached assert. However, I think
(also discussed with Sven) that this only covers an underlying problem.
So far we investigated the following:

  • the method DeclarationNavigationContext::htmlIdentifiedType is called with non-null type and idType
  • inside the if-clause, in line 56, the type variable is overwritten with the null type of the computed base class

Thus the question, why/how can the base class have an empty type?
I would be really happy for getting hints on how to debug this. For now,
the patch checks for this case and avoids the crash.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cordlandwehr retitled this revision from to Ensure method call with non-null type.
cordlandwehr updated this object.
cordlandwehr edited the test plan for this revision. (Show Details)
cordlandwehr added reviewers: KDevelop, brauch, kfunk.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptMay 16 2016, 11:40 AM

crash log:

Application: KDevelop (kdevelop), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f35479ec940 (LWP 15787))]

Thread 15 (Thread 0x7f353f87f700 (LWP 15789)):
#0 0x00007f3561bffe4d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f355449732c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f353800f850, timeout=<optimized out>, context=0x7f3538000990) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:4135
#2 0x00007f355449732c in g_main_context_iterate (context=context@entry=0x7f3538000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3835
#3 0x00007f355449743c in g_main_context_iteration (context=0x7f3538000990, may_block=1) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3901
#4 0x00007f3562abf334 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f35380008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:419
#5 0x00007f3562a41570 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f353f87ebf0, flags=...) at kernel/qeventloop.cpp:128
#6 0x00007f3562a4186c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f353f87ebf0, flags=...) at kernel/qeventloop.cpp:204
#7 0x00007f356280b276 in QThread::exec() (this=0x7f3569a145e0 <(anonymous namespace)::Q_QGSq_manager::innerFunction()::holder>) at thread/qthread.cpp:504
#8 0x00007f356997a860 in QDBusConnectionManager::run() (this=0x7f3569a145e0 <(anonymous namespace)::Q_QGS
q_manager::innerFunction()::holder>) at qdbusconnection.cpp:181
#9 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x7f3569a145e0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:340
#10 0x00007f355920b454 in start_thread (arg=0x7f353f87f700) at pthread_create.c:334
#11 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 14 (Thread 0x7f352af78700 (LWP 15792)):
#0 0x00007f3549fa0ea3 in () at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
#1 0x00007f3549fa1a78 in () at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
#2 0x00007f3549fa1da9 in () at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
#3 0x00007f3549fa263a in () at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
#4 0x00007f354d5ad337 in pa_mainloop_dispatch () at /usr/lib/x86_64-linux-gnu/libpulse.so.0
#5 0x00007f354d5ad73c in pa_mainloop_iterate () at /usr/lib/x86_64-linux-gnu/libpulse.so.0
#6 0x00007f354d5ad7e0 in pa_mainloop_run () at /usr/lib/x86_64-linux-gnu/libpulse.so.0
#7 0x00007f354d5bba29 in () at /usr/lib/x86_64-linux-gnu/libpulse.so.0
#8 0x00007f3549fb2648 in () at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
#9 0x00007f355920b454 in start_thread (arg=0x7f352af78700) at pthread_create.c:334
#10 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 13 (Thread 0x7f3518fcc700 (LWP 15795)):
#0 0x00007f35592113f8 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1 0x00007f35628149d9 in QWaitConditionPrivate::wait_relative(unsigned long) (this=0x47845e0, time=1000) at thread/qwaitcondition_unix.cpp:126
#2 0x00007f3562814a06 in QWaitConditionPrivate::wait(unsigned long) (this=0x47845e0, time=1000) at thread/qwaitcondition_unix.cpp:134
#3 0x00007f35628147f5 in QWaitCondition::wait(QMutex*, unsigned long) (this=0x47818e8, mutex=0x47818f0, time=1000) at thread/qwaitcondition_unix.cpp:208
#4 0x00007f355fb60049 in KDevelop::DUChainPrivate::CleanupThread::run() (this=0x47818d0) at /opt/kde/src/extragear/kdevelop/kdevplatform/language/duchain/duchain.cpp:282
#5 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x47818d0) at thread/qthread_unix.cpp:340
#6 0x00007f355920b454 in start_thread (arg=0x7f3518fcc700) at pthread_create.c:334
#7 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 12 (Thread 0x7f350e7b6700 (LWP 15796)):
#0 0x00007f3561bffe4d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f355449732c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f350802d8f0, timeout=<optimized out>, context=0x7f350802d830) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:4135
#2 0x00007f355449732c in g_main_context_iterate (context=context@entry=0x7f350802d830, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3835
#3 0x00007f355449743c in g_main_context_iteration (context=0x7f350802d830, may_block=1) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3901
#4 0x00007f3562abf334 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f350801e690, flags=...) at kernel/qeventdispatcher_glib.cpp:419
#5 0x00007f3562a41570 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f350e7b5c20, flags=...) at kernel/qeventloop.cpp:128
#6 0x00007f3562a4186c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f350e7b5c20, flags=...) at kernel/qeventloop.cpp:204
#7 0x00007f356280b276 in QThread::exec() (this=0x7f3567efa658 <KDevelop::(anonymous namespace)::Q_QGS_s_parsingThread::innerFunction()::holder+8>) at thread/qthread.cpp:504
#8 0x00007f356280b418 in QThread::run() (this=0x7f3567efa658 <KDevelop::(anonymous namespace)::Q_QGS_s_parsingThread::innerFunction()::holder+8>) at thread/qthread.cpp:571
#9 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x7f3567efa658 <KDevelop::(anonymous namespace)::Q_QGS_s_parsingThread::innerFunction()::holder+8>) at thread/qthread_unix.cpp:340
#10 0x00007f355920b454 in start_thread (arg=0x7f350e7b6700) at pthread_create.c:334
#11 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 11 (Thread 0x7f35064f1700 (LWP 15799)):
#0 0x00007f3561bffe4d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f355449732c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f34fc003820, timeout=<optimized out>, context=0x7f34fc000990) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:4135
#2 0x00007f355449732c in g_main_context_iterate (context=context@entry=0x7f34fc000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3835
#3 0x00007f355449743c in g_main_context_iteration (context=0x7f34fc000990, may_block=1) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3901
#4 0x00007f3562abf334 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f34fc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:419
#5 0x00007f3562a41570 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f35064f0ba0, flags=...) at kernel/qeventloop.cpp:128
#6 0x00007f3562a4186c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f35064f0ba0, flags=...) at kernel/qeventloop.cpp:204
#7 0x00007f356280b276 in QThread::exec() (this=0x4ae28d0) at thread/qthread.cpp:504
#8 0x00007f355fcb343f in KDevelop::CompletionWorkerThread::run() (this=0x4ae28d0) at /opt/kde/src/extragear/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:89
#9 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x4ae28d0) at thread/qthread_unix.cpp:340
#10 0x00007f355920b454 in start_thread (arg=0x7f35064f1700) at pthread_create.c:334
#11 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 10 (Thread 0x7f34f8f91700 (LWP 15800)):
#0 0x00007f35544dba94 in g_mutex_unlock (mutex=0x7f34f4000990) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gthread-posix.c:1350
#1 0x00007f35544968b0 in g_main_context_prepare (context=context@entry=0x7f34f4000990, priority=priority@entry=0x7f34f8f909f0) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3440
#2 0x00007f355449725b in g_main_context_iterate (context=context@entry=0x7f34f4000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3820
#3 0x00007f355449743c in g_main_context_iteration (context=0x7f34f4000990, may_block=1) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3901
#4 0x00007f3562abf334 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f34f40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:419
#5 0x00007f3562a41570 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f34f8f90ba0, flags=...) at kernel/qeventloop.cpp:128
#6 0x00007f3562a4186c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f34f8f90ba0, flags=...) at kernel/qeventloop.cpp:204
#7 0x00007f356280b276 in QThread::exec() (this=0x54a36c0) at thread/qthread.cpp:504
#8 0x00007f355fcb343f in KDevelop::CompletionWorkerThread::run() (this=0x54a36c0) at /opt/kde/src/extragear/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:89
#9 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x54a36c0) at thread/qthread_unix.cpp:340
#10 0x00007f355920b454 in start_thread (arg=0x7f34f8f91700) at pthread_create.c:334
#11 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 9 (Thread 0x7f34f0b08700 (LWP 15805)):
#0 0x00007f3561bffe4d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f355449732c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f34ec003040, timeout=<optimized out>, context=0x7f34ec000990) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:4135
#2 0x00007f355449732c in g_main_context_iterate (context=context@entry=0x7f34ec000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3835
#3 0x00007f355449743c in g_main_context_iteration (context=0x7f34ec000990, may_block=1) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3901
#4 0x00007f3562abf334 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f34ec0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:419
#5 0x00007f3562a41570 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f34f0b07ba0, flags=...) at kernel/qeventloop.cpp:128
#6 0x00007f3562a4186c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f34f0b07ba0, flags=...) at kernel/qeventloop.cpp:204
#7 0x00007f356280b276 in QThread::exec() (this=0x5e799a0) at thread/qthread.cpp:504
#8 0x00007f355fcb343f in KDevelop::CompletionWorkerThread::run() (this=0x5e799a0) at /opt/kde/src/extragear/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:89
#9 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x5e799a0) at thread/qthread_unix.cpp:340
#10 0x00007f355920b454 in start_thread (arg=0x7f34f0b08700) at pthread_create.c:334
#11 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 8 (Thread 0x7f34ea769700 (LWP 15915)):
#0 0x00007f35544943d4 in g_source_iter_next (iter=iter@entry=0x7f34ea7689f0, source=source@entry=0x7f34ea7689e8) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:956
#1 0x00007f355449685b in g_main_context_prepare (context=context@entry=0x7f34dc19e360, priority=priority@entry=0x7f34ea768a70) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3420
#2 0x00007f355449725b in g_main_context_iterate (context=context@entry=0x7f34dc19e360, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3820
#3 0x00007f355449743c in g_main_context_iteration (context=0x7f34dc19e360, may_block=1) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3901
#4 0x00007f3562abf334 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f34dc11a5f0, flags=...) at kernel/qeventdispatcher_glib.cpp:419
#5 0x00007f3562a41570 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f34ea768c20, flags=...) at kernel/qeventloop.cpp:128
#6 0x00007f3562a4186c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f34ea768c20, flags=...) at kernel/qeventloop.cpp:204
#7 0x00007f356280b276 in QThread::exec() (this=0x9760fa0) at thread/qthread.cpp:504
#8 0x00007f356855a487 in QQmlThreadPrivate::run() (this=0x9760fa0) at qml/ftw/qqmlthread.cpp:141
#9 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x9760fa0) at thread/qthread_unix.cpp:340
#10 0x00007f355920b454 in start_thread (arg=0x7f34ea769700) at pthread_create.c:334
#11 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 7 (Thread 0x7f34dbfff700 (LWP 15923)):
#0 0x00007f355921104f in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f3562814a22 in QWaitConditionPrivate::wait(unsigned long) (this=0x36f7820, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:136
#2 0x00007f35628147f5 in QWaitCondition::wait(QMutex*, unsigned long) (this=0x36f6990, mutex=0x36f7240, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3 0x00007f355eea55e0 in ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked(ThreadWeaver::Thread*) (this=0x36f7210, th=0x19a0330) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:594
#4 0x00007f355eea52b9 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) (this=0x36f7210, th=0x19a0330, threadWasBusy=false, suspendIfInactive=false, justReturning=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:554
#5 0x00007f355eeadcf5 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x19a0330, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:66
#6 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x19a0330, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#7 0x00007f355eeaddf8 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x19a0330, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:73
#8 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x19a0330, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#9 0x00007f355eeaddf8 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x19a0330, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:73
#10 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x19a0330, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#11 0x00007f355eeaddf8 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x19a0330, wasBusy=true) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:73
#12 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x19a0330, wasBusy=true) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#13 0x00007f355eea9db8 in ThreadWeaver::Thread::run() (this=0x19a0330) at /opt/kde/src/frameworks/threadweaver/src/thread.cpp:103
#14 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x19a0330) at thread/qthread_unix.cpp:340
#15 0x00007f355920b454 in start_thread (arg=0x7f34dbfff700) at pthread_create.c:334
#16 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7f34e9f68700 (LWP 15924)):
#0 0x00007f355921104f in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f3562814a22 in QWaitConditionPrivate::wait(unsigned long) (this=0x36f7820, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:136
#2 0x00007f35628147f5 in QWaitCondition::wait(QMutex*, unsigned long) (this=0x36f6990, mutex=0x36f7240, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3 0x00007f355eea55e0 in ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked(ThreadWeaver::Thread*) (this=0x36f7210, th=0x7f34c40ca100) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:594
#4 0x00007f355eea52b9 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) (this=0x36f7210, th=0x7f34c40ca100, threadWasBusy=false, suspendIfInactive=false, justReturning=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:554
#5 0x00007f355eeadcf5 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x7f34c40ca100, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:66
#6 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x7f34c40ca100, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#7 0x00007f355eeaddf8 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x7f34c40ca100, wasBusy=true) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:73
#8 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x7f34c40ca100, wasBusy=true) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#9 0x00007f355eea9db8 in ThreadWeaver::Thread::run() (this=0x7f34c40ca100) at /opt/kde/src/frameworks/threadweaver/src/thread.cpp:103
#10 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x7f34c40ca100) at thread/qthread_unix.cpp:340
#11 0x00007f355920b454 in start_thread (arg=0x7f34e9f68700) at pthread_create.c:334
#12 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7f34eaf6a700 (LWP 15925)):
#0 0x00007f355921104f in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f3562814a22 in QWaitConditionPrivate::wait(unsigned long) (this=0x36f7820, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:136
#2 0x00007f35628147f5 in QWaitCondition::wait(QMutex*, unsigned long) (this=0x36f6990, mutex=0x36f7240, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3 0x00007f355eea55e0 in ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked(ThreadWeaver::Thread*) (this=0x36f7210, th=0x7f34c41ca150) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:594
#4 0x00007f355eea52b9 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) (this=0x36f7210, th=0x7f34c41ca150, threadWasBusy=true, suspendIfInactive=false, justReturning=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:554
#5 0x00007f355eeadcf5 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x7f34c41ca150, wasBusy=true) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:66
#6 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x7f34c41ca150, wasBusy=true) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#7 0x00007f355eea9db8 in ThreadWeaver::Thread::run() (this=0x7f34c41ca150) at /opt/kde/src/frameworks/threadweaver/src/thread.cpp:103
#8 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x7f34c41ca150) at thread/qthread_unix.cpp:340
#9 0x00007f355920b454 in start_thread (arg=0x7f34eaf6a700) at pthread_create.c:334
#10 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f34e8c3c700 (LWP 15926)):
#0 0x00007f355921104f in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f3562814a22 in QWaitConditionPrivate::wait(unsigned long) (this=0x36f7820, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:136
#2 0x00007f35628147f5 in QWaitCondition::wait(QMutex*, unsigned long) (this=0x36f6990, mutex=0x36f7240, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3 0x00007f355eea55e0 in ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked(ThreadWeaver::Thread*) (this=0x36f7210, th=0x7f34e001e550) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:594
#4 0x00007f355eea52b9 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) (this=0x36f7210, th=0x7f34e001e550, threadWasBusy=false, suspendIfInactive=false, justReturning=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:554
#5 0x00007f355eeadcf5 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x7f34e001e550, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:66
#6 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x7f34e001e550, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#7 0x00007f355eeaddf8 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x7f34e001e550, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:73
#8 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x7f34e001e550, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#9 0x00007f355eeaddf8 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x7f34e001e550, wasBusy=true) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:73
#10 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x7f34e001e550, wasBusy=true) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#11 0x00007f355eea9db8 in ThreadWeaver::Thread::run() (this=0x7f34e001e550) at /opt/kde/src/frameworks/threadweaver/src/thread.cpp:103
#12 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x7f34e001e550) at thread/qthread_unix.cpp:340
#13 0x00007f355920b454 in start_thread (arg=0x7f34e8c3c700) at pthread_create.c:334
#14 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f34db7fe700 (LWP 15927)):
#0 0x00007f355921104f in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f3562814a22 in QWaitConditionPrivate::wait(unsigned long) (this=0x36f7820, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:136
#2 0x00007f35628147f5 in QWaitCondition::wait(QMutex*, unsigned long) (this=0x36f6990, mutex=0x36f7240, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3 0x00007f355eea55e0 in ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked(ThreadWeaver::Thread*) (this=0x36f7210, th=0x7f34cc0626b0) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:594
#4 0x00007f355eea52b9 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) (this=0x36f7210, th=0x7f34cc0626b0, threadWasBusy=false, suspendIfInactive=false, justReturning=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:554
#5 0x00007f355eeadcf5 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x7f34cc0626b0, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:66
#6 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x7f34cc0626b0, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#7 0x00007f355eeaddf8 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x7f34cc0626b0, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:73
#8 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x7f34cc0626b0, wasBusy=false) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#9 0x00007f355eeaddf8 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f6a50, th=0x7f34cc0626b0, wasBusy=true) at /opt/kde/src/frameworks/threadweaver/src/workinghardstate.cpp:73
#10 0x00007f355eea53fa in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) (this=0x36f7210, th=0x7f34cc0626b0, wasBusy=true) at /opt/kde/src/frameworks/threadweaver/src/weaver.cpp:568
#11 0x00007f355eea9db8 in ThreadWeaver::Thread::run() (this=0x7f34cc0626b0) at /opt/kde/src/frameworks/threadweaver/src/thread.cpp:103
#12 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x7f34cc0626b0) at thread/qthread_unix.cpp:340
#13 0x00007f355920b454 in start_thread (arg=0x7f34db7fe700) at pthread_create.c:334
#14 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f350dfb5700 (LWP 16094)):
#0 0x00007f35592113f8 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1 0x00007f35628149d9 in QWaitConditionPrivate::wait_relative(unsigned long) (this=0x19c1410, time=30000) at thread/qwaitcondition_unix.cpp:126
#2 0x00007f3562814a06 in QWaitConditionPrivate::wait(unsigned long) (this=0x19c1410, time=30000) at thread/qwaitcondition_unix.cpp:134
#3 0x00007f35628147f5 in QWaitCondition::wait(QMutex*, unsigned long) (this=0x1566e70, mutex=0x3815530, time=30000) at thread/qwaitcondition_unix.cpp:208
#4 0x00007f356280cbfe in QThreadPoolThread::run() (this=0x1566e60) at thread/qthreadpool.cpp:127
#5 0x00007f35628132e5 in QThreadPrivate::start(void*) (arg=0x1566e60) at thread/qthread_unix.cpp:340
#6 0x00007f355920b454 in start_thread (arg=0x7f350dfb5700) at pthread_create.c:334
#7 0x00007f3561c08ecd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f35479ec940 (LWP 15787)):
[KCrash Handler]
#6 0x00007f3561b53478 in GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#7 0x00007f3561b548fa in
GI_abort () at abort.c:89
#8 0x00007f35627fd81e in qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) (context=..., message=...) at global/qlogging.cpp:1648
#9 0x00007f35627f9cd6 in QMessageLogger::fatal(char const*, ...) const (this=0x7ffcd1fb0a30, msg=0x7f3562b2c530 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:790
#10 0x00007f35627f2e4e in qt_assert(char const*, char const*, int) (assertion=0x7f355fd5cec0 "type", file=0x7f355fd5c728 "/opt/kde/src/extragear/kdevelop/kdevplatform/language/duchain/navigation/abstractdeclarationnavigationcontext.cpp", line=563) at global/qglobal.cpp:2999
#11 0x00007f355fc919a0 in KDevelop::AbstractDeclarationNavigationContext::htmlIdentifiedType(KDevelop::TypePtr<KDevelop::AbstractType>, KDevelop::IdentifiedType const*) (this=0x1813f70, type=..., idType=0x0) at /opt/kde/src/extragear/kdevelop/kdevplatform/language/duchain/navigation/abstractdeclarationnavigationcontext.cpp:563
#12 0x00007f34f914540a in QmlJS::DeclarationNavigationContext::htmlIdentifiedType(KDevelop::TypePtr<KDevelop::AbstractType>, KDevelop::IdentifiedType const*) (this=0x1813f70, type=..., idType=0x0) at /opt/kde/src/extragear/kdevelop/kdevelop/languages/qmljs/duchain/navigation/declarationnavigationcontext.cpp:60
#13 0x00007f355fc92477 in KDevelop::AbstractDeclarationNavigationContext::eventuallyMakeTypeLinks(KDevelop::TypePtr<KDevelop::AbstractType>) (this=0x1813f70, type=...) at /opt/kde/src/extragear/kdevelop/kdevplatform/language/duchain/navigation/abstractdeclarationnavigationcontext.cpp:617
#14 0x00007f34f9145515 in QmlJS::DeclarationNavigationContext::eventuallyMakeTypeLinks(KDevelop::TypePtr<KDevelop::AbstractType>) (this=0x1813f70, type=...) at /opt/kde/src/extragear/kdevelop/kdevelop/languages/qmljs/duchain/navigation/declarationnavigationcontext.cpp:72
#15 0x00007f355fc915d8 in KDevelop::AbstractDeclarationNavigationContext::htmlClass() (this=0x1813f70) at /opt/kde/src/extragear/kdevelop/kdevplatform/language/duchain/navigation/abstractdeclarationnavigationcontext.cpp:547
#16 0x00007f355fc8ba3e in KDevelop::AbstractDeclarationNavigationContext::html(bool) (this=0x1813f70, shorten=false) at /opt/kde/src/extragear/kdevelop/kdevplatform/language/duchain/navigation/abstractdeclarationnavigationcontext.cpp:119
#17 0x00007f355fc81743 in KDevelop::AbstractNavigationWidget::update() (this=0x96a67c0) at /opt/kde/src/extragear/kdevelop/kdevplatform/language/duchain/navigation/abstractnavigationwidget.cpp:143
#18 0x00007f355fc814f9 in KDevelop::AbstractNavigationWidget::setContext(QExplicitlySharedDataPointer<KDevelop::AbstractNavigationContext>, int) (this=0x96a67c0, context=..., initBrows=400) at /opt/kde/src/extragear/kdevelop/kdevplatform/language/duchain/navigation/abstractnavigationwidget.cpp:119
#19 0x00007f34f9142f07 in QmlJS::NavigationWidget::NavigationWidget(KDevelop::Declaration*, KDevelop::TopDUContext*, QString const&, QString const&) (this=0x96a67c0, decl=0x55cbe00, topContext=0x56cd7f0, htmlPrefix=..., htmlSuffix=...) at /opt/kde/src/extragear/kdevelop/kdevelop/languages/qmljs/duchain/navigation/navigationwidget.cpp:44
#20 0x00007f34f913166c in QmlJS::QmlJSDUContext<KDevelop::DUContext, 111>::createNavigationWidget(KDevelop::Declaration*, KDevelop::TopDUContext*, QString const&, QString const&) const (this=0x56b48e0, decl=0x55cbe00, topContext=0x56cd7f0, htmlPrefix=..., htmlSuffix=...) at /opt/kde/src/extragear/kdevelop/kdevelop/languages/qmljs/duchain/qmljsducontext.cpp:52
#21 0x00007f350d305ada in ContextBrowserPlugin::showToolTip(KTextEditor::View*, KTextEditor::Cursor) (this=0x4a6e680, view=0x5782600, position=...) at /opt/kde/src/extragear/kdevelop/kdevplatform/plugins/contextbrowser/contextbrowser.cpp:447
#22 0x00007f350d305587 in ContextBrowserHintProvider::textHint(KTextEditor::View*, KTextEditor::Cursor const&) (this=0x4a6e7e8, view=0x5782600, cursor=...) at /opt/kde/src/extragear/kdevelop/kdevplatform/plugins/contextbrowser/contextbrowser.cpp:394
#23 0x00007f356700b923 in KateViewInternal::textHintTimeout() (this=0x5783ab0) at /opt/kde/src/frameworks/ktexteditor/src/view/kateviewinternal.cpp:3098
#24 0x00007f3567125901 in KateViewInternal::qt_static_metacall(QObject*, QMetaObject::Call, int, void) (_o=0x5783ab0, _c=QMetaObject::InvokeMetaMethod, _id=24, _a=0x7ffcd1fb2b10) at /opt/kde/build/frameworks/ktexteditor/src/moc_kateviewinternal.cpp:200
#25 0x00007f3562a8585d in QMetaObject::activate(QObject*, int, int, void
) (sender=0x5783cc8, signalOffset=3, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3730
#26 0x00007f3562a85064 in QMetaObject::activate(QObject*, QMetaObject const*, int, void) (sender=0x5783cc8, m=0x7f3562d54500 <QTimer::staticMetaObject>, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3595
#27 0x00007f3562b262b7 in QTimer::timeout(QTimer::QPrivateSignal) (this=0x5783cc8) at .moc/moc_qtimer.cpp:201
#28 0x00007f3562a91cf9 in QTimer::timerEvent(QTimerEvent*) (this=0x5783cc8, e=0x7ffcd1fb3550) at kernel/qtimer.cpp:247
#29 0x00007f3562a7ecfa in QObject::event(QEvent*) (this=0x5783cc8, e=0x7ffcd1fb3550) at kernel/qobject.cpp:1237
#30 0x00007f356363d4f2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=0x1516b70, receiver=0x5783cc8, e=0x7ffcd1fb3550) at kernel/qapplication.cpp:3804
#31 0x00007f356363a8bd in QApplication::notify(QObject*, QEvent*) (this=0x7ffcd1fb3ba0, receiver=0x5783cc8, e=0x7ffcd1fb3550) at kernel/qapplication.cpp:3163
#32 0x00007f3562a44bfa in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5783cc8, event=0x7ffcd1fb3550) at kernel/qcoreapplication.cpp:1015
#33 0x00007f3562a48c30 in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=0x5783cc8, event=0x7ffcd1fb3550) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:225
#34 0x00007f3562abd61a in QTimerInfoList::activateTimers() (this=0x1556450) at kernel/qtimerinfo_unix.cpp:637
#35 0x00007f3562abe938 in timerSourceDispatch(GSource*, GSourceFunc, gpointer) (source=0x15563f0) at kernel/qeventdispatcher_glib.cpp:176
#36 0x00007f3562abea1f in idleTimerSourceDispatch(GSource*, GSourceFunc, gpointer) (source=0x15507f0) at kernel/qeventdispatcher_glib.cpp:223
#37 0x00007f3554497137 in g_main_context_dispatch (context=0x7f35400016f0) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3154
#38 0x00007f3554497137 in g_main_context_dispatch (context=context@entry=0x7f35400016f0) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3769
#39 0x00007f3554497390 in g_main_context_iterate (context=context@entry=0x7f35400016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3840
#40 0x00007f355449743c in g_main_context_iteration (context=0x7f35400016f0, may_block=1) at /build/glib2.0-2CrUwg/glib2.0-2.48.0/./glib/gmain.c:3901
#41 0x00007f3562abf305 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x15925e0, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#42 0x00007f3547791e86 in QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x15925e0, flags=...) at eventdispatchers/qeventdispatcher_glib.cpp:115
#43 0x00007f3562a41570 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffcd1fb38a0, flags=...) at kernel/qeventloop.cpp:128
#44 0x00007f3562a4186c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffcd1fb38a0, flags=...) at kernel/qeventloop.cpp:204
#45 0x00007f3562a45344 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1285
#46 0x00007f3562e70598 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1607
#47 0x00007f356363a2a1 in QApplication::exec() () at kernel/qapplication.cpp:2979
#48 0x0000000000410471 in main(int, char
) (argc=1, argv=0x7ffcd1fb5d48) at /opt/kde/src/extragear/kdevelop/kdevelop/app/main.cpp:714

brauch edited edge metadata.May 16 2016, 11:44 AM

As said on IRC, I think this is the correct fix for the crash in the first place and should go in in any case. All other code in kdevplatform does not assume that type and idType are not null when calling that method, so qmljs shouldn't either.

For finding the actual reason, you might want to start by looking at the addBaseClass() calls in declarationbuilder.cpp. One of them must add the base class with a null type (maybe add some qDebugs() or conditional breakpoints). Then trace it back from there.

kfunk accepted this revision.May 16 2016, 9:05 PM
kfunk edited edge metadata.
This revision is now accepted and ready to land.May 16 2016, 9:05 PM
This revision was automatically updated to reflect the committed changes.