Summary: | kdevelop (clang parser) crash when selecting a specific line | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | RJVB <rjvbertin> |
Component: | general | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | kfunk, mail |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.0.1 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | macOS | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=363893 | ||
Latest Commit: | http://commits.kde.org/kdevplatform/8cdd0ade6755d76b6e4400adf05411397258f3ab | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Give IProblem public visibility. |
Description
RJVB
2016-10-13 11:21:44 UTC
Another one: Is this output from KDevelop too? "error: abstractnavigationwidget.cpp.o DWARF DIE at 0x000016b4 for class 'QWidget' has a base class 'QObject' that is a forward declaration, not a complete definition. Please file a bug against the compiler and include the preprocessed output for /Volumes/VMs/MPbuild/_Volumes_Debian_MP9_site-ports_kf5_kdevplatform5/kf5-kdevplatform-devel/work/kf5-kdevplatform-5/language/duchain/navigation/abstractnavigationwidget.cpp " Application: KDevelop (kdevelop), signal: Segmentation fault: 11 (lldb) process attach --pid 71568 Process 71568 stopped Executable module set to "/Applications/MacPorts/KF5/kdevelop.app/Contents/MacOS/kdevelop.bin". Architecture set to: x86_64-apple-macosx. (lldb) set set term-width 200 (lldb) thread info thread #1: tid = 0x42f856, 0x00007fff8f109e20 libsystem_kernel.dylib`__wait4 + 8, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP (lldb) bt all * thread #1: tid = 0x42f856, 0x00007fff8f109e20 libsystem_kernel.dylib`__wait4 + 8, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP * frame #0: 0x00007fff8f109e20 libsystem_kernel.dylib`__wait4 + 8 frame #1: 0x0000000108719dee libKF5Crash.5.dylib`KCrash::startProcess(int, char const**, bool) [inlined] startProcessInternal(argc=<unavailable>, directly=<unavailable>) + 125 at kcrash.cpp:649 frame #2: 0x0000000108719d71 libKF5Crash.5.dylib`KCrash::startProcess(argc=<unavailable>, argv=<unavailable>, waitAndExit=<unavailable>) + 17 at kcrash.cpp:631 frame #3: 0x0000000108719bb5 libKF5Crash.5.dylib`KCrash::defaultCrashHandler(sig=11) + 1061 at kcrash.cpp:528 frame #4: 0x00007fff8b6e15aa libsystem_platform.dylib`_sigtramp + 26 frame #5: 0x000000012138edbf libKDevClangPrivate.26.dylib`QVector<ClangFixit>::operator+=(this=0x00007fff578d2450, l=0x0000000000000040) + 31 at qvector.h:790 frame #6: 0x000000012138d4eb libKDevClangPrivate.26.dylib`ClangProblem::allFixits() const [inlined] QVector<ClangFixit>::operator<<(this=0x00007fff578d2450, l=<unavailable>) + 43 at qvector.h:275 frame #7: 0x000000012138d4e6 libKDevClangPrivate.26.dylib`ClangProblem::allFixits(this=0x0000000000000000) const + 38 at clangproblem.cpp:185 frame #8: 0x000000012138d60e libKDevClangPrivate.26.dylib`ClangProblem::allFixits(this=<unavailable>) const + 334 at clangproblem.cpp:190 frame #9: 0x000000012138d3de libKDevClangPrivate.26.dylib`ClangProblem::solutionAssistant(this=0x00007fd1ce7ae130) const + 30 at clangproblem.cpp:165 frame #10: 0x000000012138d782 libKDevClangPrivate.26.dylib`non-virtual thunk to ClangProblem::solutionAssistant(this=<unavailable>) const + 18 at clangproblem.cpp:163 frame #11: 0x000000010be2ec97 libKDevPlatformLanguage.10.dylib`KDevelop::ProblemNavigationContext::html(this=<unavailable>, shorten=<unavailable>) + 6551 at problemnavigationcontext.cpp:172 frame #12: 0x000000010be30f96 libKDevPlatformLanguage.10.dylib`KDevelop::AbstractNavigationWidget::update(this=0x00007fd1b99e6c00) + 54 at abstractnavigationwidget.cpp:148 frame #13: 0x000000010be30e70 libKDevPlatformLanguage.10.dylib`KDevelop::AbstractNavigationWidget::setContext(this=0x00007fd1b99e6c00, context=<unavailable>, initBrows=<unavailable>) + 224 at abstractnavigationwidget.cpp:116 frame #14: 0x00000001205ec2ec kdevcontextbrowser.so`ContextBrowserPlugin::navigationWidgetForPosition(this=0x00007fd1c554e290, view=0x00007fd1c6141ac0, position=<unavailable>) + 2748 at contextbrowser.cpp:530 frame #15: 0x00000001205eae9a kdevcontextbrowser.so`ContextBrowserPlugin::showToolTip(this=0x00007fd1c554e290, view=0x00007fd1c6141ac0, position=<unavailable>) + 90 at contextbrowser.cpp:576 frame #16: 0x00000001205eae24 kdevcontextbrowser.so`ContextBrowserHintProvider::textHint(this=0x00007fd1c554e408, view=<unavailable>, cursor=0x0000002300000099) + 324 at contextbrowser.cpp:407 frame #17: 0x0000000109034297 libKF5TextEditor.5.dylib`KateViewInternal::textHintTimeout(this=0x00007fd1c618e780) + 311 at kateviewinternal.cpp:3101 frame #18: 0x0000000109129f35 libKF5TextEditor.5.dylib`KateViewInternal::qt_static_metacall(_o=<unavailable>, _c=<unavailable>, _id=<unavailable>, _a=<unavailable>) + 885 at moc_kateviewinternal.cpp:200 frame #19: 0x000000010b59b9a4 QtCore`QMetaObject::activate(sender=0x00007fd1c618e998, signalOffset=<unavailable>, local_signal_index=<unavailable>, argv=<unavailable>) + 3028 at qobject.cpp:3730 frame #20: 0x000000010b593ca0 QtCore`QObject::event(this=0x00007fd1c618e998, e=<unavailable>) + 48 at qobject.cpp:1237 frame #21: 0x000000010a4131e6 QtWidgets`QApplicationPrivate::notify_helper(this=<unavailable>, receiver=0x00007fd1c618e998, e=0x00007fff578d32b8) + 294 at qapplication.cpp:3804 frame #22: 0x000000010a416726 QtWidgets`QApplication::notify(this=<unavailable>, receiver=<unavailable>, e=<unavailable>) + 8470 at qapplication.cpp:3767 frame #23: 0x000000010b567687 QtCore`QCoreApplication::notifyInternal2(receiver=0x00007fd1c618e998, event=0x00007fff578d32b8) + 167 at qcoreapplication.cpp:1020 frame #24: 0x000000010b5c08a1 QtCore`QTimerInfoList::activateTimers() [inlined] QCoreApplication::sendEvent(receiver=<unavailable>, event=0x000000010b7d2150) + 1329 at qcoreapplication.h:225 frame #25: 0x000000010b5c0894 QtCore`QTimerInfoList::activateTimers(this=0x00007fd1c2e60210) + 1316 at qtimerinfo_unix.cpp:637 frame #26: 0x0000000114d9d482 libqcocoa.dylib`QCocoaEventDispatcherPrivate::activateTimersSourceCallback(info=0x00007fd1c2e60190) + 18 at qcocoaeventdispatcher.mm:119 frame #27: 0x00007fff8fae65b1 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 frame #28: 0x00007fff8fad7c62 CoreFoundation`__CFRunLoopDoSources0 + 242 frame #29: 0x00007fff8fad73ef CoreFoundation`__CFRunLoopRun + 831 frame #30: 0x00007fff8fad6e75 CoreFoundation`CFRunLoopRunSpecific + 309 frame #31: 0x00007fff8f7eaa0d HIToolbox`RunCurrentEventLoopInMode + 226 frame #32: 0x00007fff8f7ea7b7 HIToolbox`ReceiveNextEventCommon + 479 frame #33: 0x00007fff8f7ea5bc HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 65 frame #34: 0x00007fff947ce24e AppKit`_DPSNextEvent + 1434 frame #35: 0x00007fff947cd89b AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122 frame #36: 0x00007fff947c199c AppKit`-[NSApplication run] + 553 frame #37: 0x0000000114d9e08d libqcocoa.dylib`QCocoaEventDispatcher::processEvents(this=0x00007fd1c2e61ba0, flags=<unavailable>) + 2189 at qcocoaeventdispatcher.mm:416 frame #38: 0x000000010b563aa1 QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 401 at qeventloop.cpp:128 frame #39: 0x000000010b563a84 QtCore`QEventLoop::exec(this=0x00007fff578d4c30, flags=<unavailable>) + 372 at qeventloop.cpp:204 frame #40: 0x000000010b567d15 QtCore`QCoreApplication::exec() + 325 at qcoreapplication.cpp:1290 frame #41: 0x00000001083434da kdevelop.bin`main + 53066 frame #42: 0x00007fff8eb355fd libdyld.dylib`start + 1 frame #43: 0x00007fff8eb355fd libdyld.dylib`start + 1 thread #2: tid = 0x42f85c, 0x00007fff8f109e22 libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.libdispatch-manager' frame #0: 0x00007fff8f109e22 libsystem_kernel.dylib`__wait4 + 10 frame #1: 0x0000000108719dee libKF5Crash.5.dylib`KCrash::startProcess(int, char const**, bool) [inlined] startProcessInternal(argc=<unavailable>, directly=<unavailable>) + 125 at kcrash.cpp:649 frame #2: 0x0000000108719d71 libKF5Crash.5.dylib`KCrash::startProcess(argc=<unavailable>, argv=<unavailable>, waitAndExit=<unavailable>) + 17 at kcrash.cpp:631 frame #3: 0x0000000108719bb5 libKF5Crash.5.dylib`KCrash::defaultCrashHandler(sig=11) + 1061 at kcrash.cpp:528 frame #4: 0x00007fff8b6e15aa libsystem_platform.dylib`_sigtramp + 26 frame #5: 0x00007fff8f10a663 libsystem_kernel.dylib`kevent64 + 11 frame #6: 0x00007fff91e2d136 libdispatch.dylib`_dispatch_mgr_thread + 52 thread #3: tid = 0x42f872, 0x00007fff8f1099aa libsystem_kernel.dylib`__select + 10, name = 'QDBusConnectionManager' frame #0: 0x00007fff8f1099aa libsystem_kernel.dylib`__select + 10 frame #1: 0x000000010b5bd2c4 QtCore`qt_safe_select(nfds=8, fdread=0x00007fd1c3837798, fdwrite=0x00007fd1c3837a28, fdexcept=0x00007fd1c3837cb8, orig_timeout=<unavailable>) + 564 at qcore_unix.cpp:75 frame #2: 0x000000010b5be449 QtCore`QEventDispatcherUNIXPrivate::doSelect(this=0x00007fd1c3837600, timeout=<unavailable>, flags=<unavailable>) + 665 at qeventdispatcher_unix.cpp:192 frame #3: 0x000000010b5bf56e QtCore`QEventDispatcherUNIX::processEvents(this=0x00007fd1c2e77a30, flags=<unavailable>) + 222 at qeventdispatcher_unix.cpp:607 frame #4: 0x000000010b563aa1 QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 401 at qeventloop.cpp:128 frame #5: 0x000000010b563a84 QtCore`QEventLoop::exec(this=0x0000000117f15e28, flags=<unavailable>) + 372 at qeventloop.cpp:204 frame #6: 0x000000010b3a47a5 QtCore`QThread::exec(this=<unavailable>) + 117 at qthread.cpp:500 frame #7: 0x0000000109bd6b63 QtDBus`QDBusConnectionManager::run(this=0x00007fd1c2cd7aa0) + 19 at qdbusconnection.cpp:189 frame #8: 0x000000010b3a81ab QtCore`QThreadPrivate::start(arg=0x00007fd1c2cd7aa0) + 363 at qthread_unix.cpp:341 frame #9: 0x00007fff968ea899 libsystem_pthread.dylib`_pthread_body + 138 frame #10: 0x00007fff968ea72a libsystem_pthread.dylib`_pthread_start + 137 frame #11: 0x00007fff968eefc9 libsystem_pthread.dylib`thread_start + 13 thread #4: tid = 0x42f876, 0x00007fff8f105a1a libsystem_kernel.dylib`mach_msg_trap + 10 frame #0: 0x00007fff8f105a1a libsystem_kernel.dylib`mach_msg_trap + 10 frame #1: 0x00007fff8f104d18 libsystem_kernel.dylib`mach_msg + 64 frame #2: 0x00007fff8fad7f15 CoreFoundation`__CFRunLoopServiceMachPort + 181 frame #3: 0x00007fff8fad7539 CoreFoundation`__CFRunLoopRun + 1161 frame #4: 0x00007fff8fad6e75 CoreFoundation`CFRunLoopRunSpecific + 309 frame #5: 0x00007fff9496e05e AppKit`_NSEventThread + 144 frame #6: 0x00007fff968ea899 libsystem_pthread.dylib`_pthread_body + 138 frame #7: 0x00007fff968ea72a libsystem_pthread.dylib`_pthread_start + 137 frame #8: 0x00007fff968eefc9 libsystem_pthread.dylib`thread_start + 13 thread #5: tid = 0x42fab4, 0x00007fff8f109716 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'QThread' frame #0: 0x00007fff8f109716 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff968ecc3b libsystem_pthread.dylib`_pthread_cond_wait + 727 frame #2: 0x000000010b3a9950 QtCore`QWaitConditionPrivate::wait_relative(this=0x00007fd1c56a9580, time=<unavailable>) + 288 at qwaitcondition_unix.cpp:126 frame #3: 0x000000010b3a978b QtCore`QWaitConditionPrivate::wait(this=0x00007fd1c56a9580, time=1000) + 43 at qwaitcondition_unix.cpp:134 frame #4: 0x000000010b3a965b QtCore`QWaitCondition::wait(this=0x00007fd1c5844b88, mutex=0x00007fd1c5844b90, time=1000) + 155 at qwaitcondition_unix.cpp:208 frame #5: 0x000000010bd6ac9f libKDevPlatformLanguage.10.dylib`KDevelop::DUChainPrivate::CleanupThread::run(this=<unavailable>) + 79 at duchain.cpp:282 frame #6: 0x000000010b3a81ab QtCore`QThreadPrivate::start(arg=0x00007fd1c5844b70) + 363 at qthread_unix.cpp:341 frame #7: 0x00007fff968ea899 libsystem_pthread.dylib`_pthread_body + 138 frame #8: 0x00007fff968ea72a libsystem_pthread.dylib`_pthread_start + 137 frame #9: 0x00007fff968eefc9 libsystem_pthread.dylib`thread_start + 13 thread #6: tid = 0x42fac5, 0x00007fff8f1099aa libsystem_kernel.dylib`__select + 10, name = 'KDevelop::CompletionWorkerThread' frame #0: 0x00007fff8f1099aa libsystem_kernel.dylib`__select + 10 frame #1: 0x000000010b5bd2c4 QtCore`qt_safe_select(nfds=13, fdread=0x00007fd1c3939998, fdwrite=0x00007fd1c3939c28, fdexcept=0x00007fd1c3939eb8, orig_timeout=<unavailable>) + 564 at qcore_unix.cpp:75 frame #2: 0x000000010b5be449 QtCore`QEventDispatcherUNIXPrivate::doSelect(this=0x00007fd1c3939800, timeout=<unavailable>, flags=<unavailable>) + 665 at qeventdispatcher_unix.cpp:192 frame #3: 0x000000010b5bf56e QtCore`QEventDispatcherUNIX::processEvents(this=0x00007fd1c55b0af0, flags=<unavailable>) + 222 at qeventdispatcher_unix.cpp:607 frame #4: 0x000000010b563aa1 QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 401 at qeventloop.cpp:128 frame #5: 0x000000010b563a84 QtCore`QEventLoop::exec(this=0x00000001251bfda8, flags=<unavailable>) + 372 at qeventloop.cpp:204 frame #6: 0x000000010b3a47a5 QtCore`QThread::exec(this=<unavailable>) + 117 at qthread.cpp:500 frame #7: 0x000000010be5a784 libKDevPlatformLanguage.10.dylib`KDevelop::CompletionWorkerThread::run(this=0x00007fd1c58b94b0) + 388 at codecompletionmodel.cpp:89 frame #8: 0x000000010b3a81ab QtCore`QThreadPrivate::start(arg=0x00007fd1c58b94b0) + 363 at qthread_unix.cpp:341 frame #9: 0x00007fff968ea899 libsystem_pthread.dylib`_pthread_body + 138 frame #10: 0x00007fff968ea72a libsystem_pthread.dylib`_pthread_start + 137 frame #11: 0x00007fff968eefc9 libsystem_pthread.dylib`thread_start + 13 thread #7: tid = 0x42fad6, 0x00007fff8f1099aa libsystem_kernel.dylib`__select + 10, name = 'com.apple.CFSocket.private' frame #0: 0x00007fff8f1099aa libsystem_kernel.dylib`__select + 10 frame #1: 0x00007fff8fb23a03 CoreFoundation`__CFSocketManager + 867 frame #2: 0x00007fff968ea899 libsystem_pthread.dylib`_pthread_body + 138 frame #3: 0x00007fff968ea72a libsystem_pthread.dylib`_pthread_start + 137 frame #4: 0x00007fff968eefc9 libsystem_pthread.dylib`thread_start + 13 thread #8: tid = 0x42fb80, 0x00007fff8f109716 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Queue(0x7fd1c57117c0)[01]' frame #0: 0x00007fff8f109716 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff968ecc3b libsystem_pthread.dylib`_pthread_cond_wait + 727 frame #2: 0x000000010b3a97ab QtCore`QWaitConditionPrivate::wait(this=0x00007fd1c5725f90, time=<unavailable>) + 75 at qwaitcondition_unix.cpp:136 frame #3: 0x000000010b3a965b QtCore`QWaitCondition::wait(this=0x00007fd1c57039b0, mutex=0x00007fd1c571d680, time=18446744073709551615) + 155 at qwaitcondition_unix.cpp:208 frame #4: 0x000000010d234674 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) [inlined] ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked(this=<unavailable>, th=<unavailable>) + 804 at weaver.cpp:594 frame #5: 0x000000010d23465d libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(this=<unavailable>, th=0x00007fd1c71b1be0, threadWasBusy=<unavailable>, suspendIfInactive=<unavailable>, justReturning=<unavailable>) + 781 at weaver.cpp:554 frame #6: 0x000000010d238fc0 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=0x00007fd1c5523680, th=0x00007fd1c71b1be0, wasBusy=false) + 64 at workinghardstate.cpp:66 frame #7: 0x000000010d2390c5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75 frame #8: 0x000000010d234972 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=false) + 50 at weaver.cpp:568 frame #9: 0x000000010d239005 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 133 at workinghardstate.cpp:73 frame #10: 0x000000010d2390c5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75 frame #11: 0x000000010d234972 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=true) + 50 at weaver.cpp:568 frame #12: 0x000000010d236a36 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Thread::run(this=0x00007fd1c71b1be0) + 118 at thread.cpp:103 frame #13: 0x000000010b3a81ab QtCore`QThreadPrivate::start(arg=0x00007fd1c71b1be0) + 363 at qthread_unix.cpp:341 frame #14: 0x00007fff968ea899 libsystem_pthread.dylib`_pthread_body + 138 frame #15: 0x00007fff968ea72a libsystem_pthread.dylib`_pthread_start + 137 frame #16: 0x00007fff968eefc9 libsystem_pthread.dylib`thread_start + 13 thread #9: tid = 0x42fb81, 0x00007fff8f109716 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Queue(0x7fd1c57117c0)[02]' frame #0: 0x00007fff8f109716 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff968ecc3b libsystem_pthread.dylib`_pthread_cond_wait + 727 frame #2: 0x000000010b3a97ab QtCore`QWaitConditionPrivate::wait(this=0x00007fd1c5725f90, time=<unavailable>) + 75 at qwaitcondition_unix.cpp:136 frame #3: 0x000000010b3a965b QtCore`QWaitCondition::wait(this=0x00007fd1c57039b0, mutex=0x00007fd1c571d680, time=18446744073709551615) + 155 at qwaitcondition_unix.cpp:208 frame #4: 0x000000010d234674 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) [inlined] ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked(this=<unavailable>, th=<unavailable>) + 804 at weaver.cpp:594 frame #5: 0x000000010d23465d libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(this=<unavailable>, th=0x00007fd1c6143870, threadWasBusy=<unavailable>, suspendIfInactive=<unavailable>, justReturning=<unavailable>) + 781 at weaver.cpp:554 frame #6: 0x000000010d238fc0 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=0x00007fd1c5523680, th=0x00007fd1c6143870, wasBusy=false) + 64 at workinghardstate.cpp:66 frame #7: 0x000000010d2390c5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75 frame #8: 0x000000010d234972 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=false) + 50 at weaver.cpp:568 frame #9: 0x000000010d239005 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 133 at workinghardstate.cpp:73 frame #10: 0x000000010d2390c5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75 frame #11: 0x000000010d234972 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=false) + 50 at weaver.cpp:568 frame #12: 0x000000010d239005 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 133 at workinghardstate.cpp:73 frame #13: 0x000000010d2390c5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75 frame #14: 0x000000010d234972 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=false) + 50 at weaver.cpp:568 frame #15: 0x000000010d239005 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 133 at workinghardstate.cpp:73 frame #16: 0x000000010d2390c5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75 frame #17: 0x000000010d234972 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=false) + 50 at weaver.cpp:568 frame #18: 0x000000010d239005 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 133 at workinghardstate.cpp:73 frame #19: 0x000000010d2390c5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75 frame #20: 0x000000010d234972 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=true) + 50 at weaver.cpp:568 frame #21: 0x000000010d236a36 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Thread::run(this=0x00007fd1c6143870) + 118 at thread.cpp:103 frame #22: 0x000000010b3a81ab QtCore`QThreadPrivate::start(arg=0x00007fd1c6143870) + 363 at qthread_unix.cpp:341 frame #23: 0x00007fff968ea899 libsystem_pthread.dylib`_pthread_body + 138 frame #24: 0x00007fff968ea72a libsystem_pthread.dylib`_pthread_start + 137 frame #25: 0x00007fff968eefc9 libsystem_pthread.dylib`thread_start + 13 thread #10: tid = 0x42fb82, 0x00007fff8f109716 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Queue(0x7fd1c57117c0)[03]' frame #0: 0x00007fff8f109716 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff968ecc3b libsystem_pthread.dylib`_pthread_cond_wait + 727 frame #2: 0x000000010b3a97ab QtCore`QWaitConditionPrivate::wait(this=0x00007fd1c5725f90, time=<unavailable>) + 75 at qwaitcondition_unix.cpp:136 frame #3: 0x000000010b3a965b QtCore`QWaitCondition::wait(this=0x00007fd1c57039b0, mutex=0x00007fd1c571d680, time=18446744073709551615) + 155 at qwaitcondition_unix.cpp:208 frame #4: 0x000000010d234674 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) [inlined] ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked(this=<unavailable>, th=<unavailable>) + 804 at weaver.cpp:594 frame #5: 0x000000010d23465d libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(this=<unavailable>, th=0x00007fd1c71b1ff0, threadWasBusy=<unavailable>, suspendIfInactive=<unavailable>, justReturning=<unavailable>) + 781 at weaver.cpp:554 frame #6: 0x000000010d238fc0 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=0x00007fd1c5523680, th=0x00007fd1c71b1ff0, wasBusy=true) + 64 at workinghardstate.cpp:66 frame #7: 0x000000010d2390c5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75 frame #8: 0x000000010d234972 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=true) + 50 at weaver.cpp:568 frame #9: 0x000000010d236a36 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Thread::run(this=0x00007fd1c71b1ff0) + 118 at thread.cpp:103 frame #10: 0x000000010b3a81ab QtCore`QThreadPrivate::start(arg=0x00007fd1c71b1ff0) + 363 at qthread_unix.cpp:341 frame #11: 0x00007fff968ea899 libsystem_pthread.dylib`_pthread_body + 138 frame #12: 0x00007fff968ea72a libsystem_pthread.dylib`_pthread_start + 137 frame #13: 0x00007fff968eefc9 libsystem_pthread.dylib`thread_start + 13 thread #11: tid = 0x42fc07, 0x00007fff8f1099aa libsystem_kernel.dylib`__select + 10, name = 'OutputFilterThread' frame #0: 0x00007fff8f1099aa libsystem_kernel.dylib`__select + 10 frame #1: 0x000000010b5bd2c4 QtCore`qt_safe_select(nfds=135, fdread=0x00007fd1c3cbd398, fdwrite=0x00007fd1c3cbd628, fdexcept=0x00007fd1c3cbd8b8, orig_timeout=<unavailable>) + 564 at qcore_unix.cpp:75 frame #2: 0x000000010b5be449 QtCore`QEventDispatcherUNIXPrivate::doSelect(this=0x00007fd1c3cbd200, timeout=<unavailable>, flags=<unavailable>) + 665 at qeventdispatcher_unix.cpp:192 frame #3: 0x000000010b5bf56e QtCore`QEventDispatcherUNIX::processEvents(this=0x00007fd1c5529f70, flags=<unavailable>) + 222 at qeventdispatcher_unix.cpp:607 frame #4: 0x000000010b563aa1 QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 401 at qeventloop.cpp:128 frame #5: 0x000000010b563a84 QtCore`QEventLoop::exec(this=0x0000000129171e58, flags=<unavailable>) + 372 at qeventloop.cpp:204 frame #6: 0x000000010b3a47a5 QtCore`QThread::exec(this=<unavailable>) + 117 at qthread.cpp:500 frame #7: 0x000000010b3a81ab QtCore`QThreadPrivate::start(arg=0x00007fd1ca836588) + 363 at qthread_unix.cpp:341 frame #8: 0x00007fff968ea899 libsystem_pthread.dylib`_pthread_body + 138 frame #9: 0x00007fff968ea72a libsystem_pthread.dylib`_pthread_start + 137 frame #10: 0x00007fff968eefc9 libsystem_pthread.dylib`thread_start + 13 (lldb) detach Process 71568 detached Found it, this is another example of the danger of using Q_ASSERT : ClangFixits ClangProblem::allFixits() const { ClangFixits result; result << m_fixits; for (const IProblem::Ptr& diagnostic : diagnostics()) { const Ptr problem(dynamic_cast<ClangProblem*>(diagnostic.data())); Q_ASSERT(problem); result << problem->allFixits(); } return result; } a dynamic_cast can fail even if diagnostic.data() != NULL, for instance because of (or related to) the issue reported in ticket 363893. When code is built in "production" mode, Q_ASSERTs are noops, and this leads directly to the crash and backtrace shown above. I cannot assess to what extent a NULL problem should cause KDevelop to abort. I am currently trying the fix below, and with that implementation I see exactly the same (popup error reporting) as I see on Linux. Curiously the warning hasn't been printed yet, even. ClangFixits ClangProblem::allFixits() const { ClangFixits result; result << m_fixits; for (const IProblem::Ptr& diagnostic : diagnostics()) { const Ptr problem(dynamic_cast<ClangProblem*>(diagnostic.data())); Q_ASSERT(problem); if (problem) { result << problem->allFixits(); } else { qWarning() << Q_FUNC_INFO << "dynamic cast to ClangProblem failed of" << diagnostic.data(); } } return result; } scrap that about not seeing the warning: ClangFixits ClangProblem::allFixits() const dynamic cast to ClangProblem failed of 0x7fa2e1f475a8 ClangFixits ClangProblem::allFixits() const dynamic cast to ClangProblem failed of 0x7fa2e1f480e8 ClangFixits ClangProblem::allFixits() const dynamic cast to ClangProblem failed of 0x7fa2e1f48568 ClangFixits ClangProblem::allFixits() const dynamic cast to ClangProblem failed of 0x7fa2e1f489e8 ClangFixits ClangProblem::allFixits() const dynamic cast to ClangProblem failed of 0x7fa2e1f48c28 ClangFixits ClangProblem::allFixits() const dynamic cast to ClangProblem failed of 0x7fa2e1f48e68 ClangFixits ClangProblem::allFixits() const dynamic cast to ClangProblem failed of 0x7fa2e1f492e8 Your "possibly related" bug seems like a hint to the reason. Did you investigate that? Maybe for Mac you need to export both types, or so? I could imagine ClangProblem is not exported. Add a KDEVBLUBB_EXPORT macro and see if that fixes it. Your proposed fix looks wrong to me. What can possibly wrong about the fix? If a variable shouldn't be NULL and there are apparently reasons why it can happen outside of reasonable precautions, NOT checking is wrong. And clearly this is NOT a situation where an occasional failing dynamic_cast is something from which you cannot recover (i.e. it's a transient failure), so there's no need to abort when it happens in code built in production mode. And IMHO that's independent from a possible fix for *this* case of failing dynamic_cast. I can try to add the macro to both ClangProblem and the other mentioned class to see if that changes anything. Do I have to include anything additional or make other changes to do this? Anyway, I doubt a bit if that will be the ideal fix because I'm only seeing the error messages in question sporadically. There's been only instance where this kind of fix has been a sufficient solution (ktimetracker in KDE PIM4), but there the dynamic_cast failed systematically. I'm currently seeing the errors often because of KDE PIM4, but that code apparently handles the issue elegantly, and I have failed to figure out which classes to export to make the error go away, probably somehow related to the fact that the base class is purely abstract. I should verify first if we're in the same situation here, i.e. if the cast ever succeeds. It almost certainly does, because otherwise I should caught this crash much earlier. FWIW, I think this doesn't have anything to do with Mac vs. Linux, but with libc++ vs. libstdc++ . The cast shouldn't fail. The code obviously excepts that only objects that can be cast into a ClangProblem are in the vector. The dynamic_cast is only there to make it easier to debug if it fails. Your fix is wrong because it works around the failing cast instead of finding the reason for why it fails. Ok, let's not call it a fix then, but a sensible protection. It's still wrong to just let code fail somewhere down the line by allowing it to dereference a null pointer. And if the dynamic_cast isn't required it could simply be skipped in production builds ... BTW, I see that ClangProblem already has a KDEVCLANGPRIVATE_EXPORT macro in its definition; its parents have KDEVPLATFORMLANGUAGE_EXPORT except for IProblem. Am I correct that this changes your proposition to add KDEVBLUBB_EXPORT macros? So, changing the "assert's" else clause to const auto ptr = diagnostic.data(); qWarning() << Q_FUNC_INFO << "dynamic cast to ClangProblem failed of" << ptr << "type" << typeid(*ptr).name(); I now see: ClangFixits ClangProblem::allFixits() const dynamic cast to ClangProblem failed of 0x7f953f2d1b98 type 12ClangProblem which means that it's really the dynamic_cast that fails, not the input type that is wrong. It does seem that the dynamic_cast succeeds sometimes, but even then I see the dynamic_cast error appear in the system.log. I'd forgotten that this message doesn't appear when I use a newer libc++ than the one from OS X 10.9 ... For now failure or success of the dynamic_cast seems to be random, or maybe even determined when the code is built. I certainly hope there a proper fix for that (and independent of libc++ version). For now the patch below seems to be a proper fix but I cannot vouch if it's a definite fix too. Created attachment 101587 [details]
Give IProblem public visibility.
Git commit e4fb596442fe7cb1f5a96c377a08c0aee917b05c by Sven Brauch, on behalf of René J.V. Bertin. Committed on 16/10/2016 at 14:21. Pushed by brauch into branch '5.0'. export IProblem Otherwise, dynamic_casts away from that type fail on macOS, apparently. M +1 -1 interfaces/iproblem.h http://commits.kde.org/kdevplatform/e4fb596442fe7cb1f5a96c377a08c0aee917b05c Yes, that looks like a solution to the problem. Thanks for the patch! Git commit 8cdd0ade6755d76b6e4400adf05411397258f3ab by Sven Brauch, on behalf of René J.V. Bertin. Committed on 16/10/2016 at 14:29. Pushed by brauch into branch 'master'. export IProblem Otherwise, dynamic_casts away from that type fail on macOS, apparently. M +1 -1 interfaces/iproblem.h http://commits.kde.org/kdevplatform/8cdd0ade6755d76b6e4400adf05411397258f3ab Let's just hope that it's the only fix required. As I said, it's not like I had systematic error messages about the dynamic_cast or even systematic failures, making this somewhat of a Heisenbug. I'll be running the additional protection in ClangProblem::allFixits for the time being. |