Bug 385398

Summary: kdevelop : crash after hitting enter in code editor
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: RJVB <rjvbertin>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: kde, mail
Priority: NOR Keywords: drkonqi
Version: 5.38.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description RJVB 2017-10-05 13:27:55 UTC
Application: kdevelop (5.1.80)
 (Compiled from sources)
Qt Version: 5.8.0
Frameworks Version: 5.38.0
Operating System: Darwin 13.4.0 x86_64
Distribution (Platform): MacPorts Packages

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

I added a debug statement (qWarning()), in a file that may not yet include the corresponding header. I got a crash after hitting the enter key but am not entirely certain if that was the actual trigger (I type fast and there was background parsing activity).

- Unusual behaviour I noticed:
2 things:
- the crash in libclang
- error messages printed and drkonqi started twice (a usual thing on this machine)
libclang: crash detected in code completion
kdevelop.languages.clang: Something went wrong during 'clang_codeCompleteAt' for file "/Volumes/Debian/Users/bertin/work/src/new/KDE/KF5/kdevelop-git-5/kdevplatform/shell/documentationcontroller.cpp"
libclang: crash detected in code completion
kdevelop.languages.clang: Something went wrong during 'clang_codeCompleteAt' for file "/Volumes/Debian/Users/bertin/work/src/new/KDE/KF5/kdevelop-git-5/kdevplatform/shell/documentationcontroller.cpp"
KCrash: Application 'kdevelop.bin' crashing...
KCrash: Application 'kdevelop.bin' crashing...
KCrash: Attempting to start /opt/local/libexec/kde5/drkonqi directly
KCrash: Attempting to start /opt/local/libexec/kde5/drkonqi directly

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault: 11
(lldb) process attach --pid 55563
Process 55563 stopped
Executable module set to "/Applications/MacPorts/KF5/kdevelop.app/Contents/MacOS/kdevelop.bin".
Architecture set to: x86_64-apple-macosx.
(lldb) set term-width 200
(lldb) thread info
thread #1: tid = 0x22b9a16, 0x00007fff8fb78e20 libsystem_kernel.dylib`__wait4 + 8, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP

(lldb) bt all
* thread #1: tid = 0x22b9a16, 0x00007fff8fb78e20 libsystem_kernel.dylib`__wait4 + 8, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007fff8fb78e20 libsystem_kernel.dylib`__wait4 + 8
    frame #1: 0x0000000107f7bcde libKF5Crash.5.dylib`KCrash::startProcess(int, char const**, bool) [inlined] startProcessInternal(argc=<unavailable>, directly=<unavailable>) + 125 at kcrash.cpp:651
    frame #2: 0x0000000107f7bc61 libKF5Crash.5.dylib`KCrash::startProcess(argc=<unavailable>, argv=<unavailable>, waitAndExit=<unavailable>) + 17 at kcrash.cpp:633
    frame #3: 0x0000000107f7baa5 libKF5Crash.5.dylib`KCrash::defaultCrashHandler(sig=11) + 1061 at kcrash.cpp:530
    frame #4: 0x00007fff929405aa libsystem_platform.dylib`_sigtramp + 26
    frame #5: 0x000000010b23dd78
    frame #6: 0x0000000108ed7609 QtQml`QV4::SimpleScriptFunction::call(that=<unavailable>, scope=0x00007f95a8181200, callData=<unavailable>) + 633 at qv4functionobject.cpp:593
    frame #7: 0x0000000108f514cf QtQml`QV4::Runtime::method_callActivationProperty(QV4::ExecutionEngine*, int, QV4::CallData*) [inlined] QV4::Object::call(scope=0x00007f95a8181200, d=<unavailable>) const + 1135 at qv4object_p.h:352
    frame #8: 0x0000000108f514b4 QtQml`QV4::Runtime::method_callActivationProperty(engine=<unavailable>, nameIndex=<unavailable>, callData=<unavailable>) + 1108 at qv4runtime.cpp:982
    frame #9: 0x000000010983f956
    frame #10: 0x0000000108ed7609 QtQml`QV4::SimpleScriptFunction::call(that=<unavailable>, scope=0x00007f95a8181200, callData=<unavailable>) + 633 at qv4functionobject.cpp:593
    frame #11: 0x0000000108f514cf QtQml`QV4::Runtime::method_callActivationProperty(QV4::ExecutionEngine*, int, QV4::CallData*) [inlined] QV4::Object::call(scope=0x00007f95a8181200, d=<unavailable>) const + 1135 at qv4object_p.h:352
    frame #12: 0x0000000108f514b4 QtQml`QV4::Runtime::method_callActivationProperty(engine=<unavailable>, nameIndex=<unavailable>, callData=<unavailable>) + 1108 at qv4runtime.cpp:982
    frame #13: 0x0000000109702c03
    frame #14: 0x0000000108ed7609 QtQml`QV4::SimpleScriptFunction::call(that=<unavailable>, scope=0x00007f95a8181200, callData=<unavailable>) + 633 at qv4functionobject.cpp:593
    frame #15: 0x0000000108e53472 QtQml`QJSValue::call(QList<QJSValue> const&) [inlined] QV4::Object::call(scope=0x00007f95a8181200, d=<unavailable>) const + 402 at qv4object_p.h:352
    frame #16: 0x0000000108e5345b QtQml`QJSValue::call(this=<unavailable>, args=<unavailable>) + 379 at qjsvalue.cpp:669
    frame #17: 0x00000001081f8a1f libKF5TextEditor.5.dylib`KateIndentScript::indent(this=0x00007f95b598e6c0, view=<unavailable>, position=<unavailable>, indentWidth=<unavailable>, typedCharacter=<unavailable>) + 655 at kateindentscript.cpp:75
    frame #18: 0x00000001082cb79f libKF5TextEditor.5.dylib`KateAutoIndent::scriptIndent(this=0x00007f95b5b86c00, view=<unavailable>, position=0x00007fff580b4818, typedChar=<unavailable>) + 63 at kateautoindent.cpp:278
    frame #19: 0x00000001082cc1bd libKF5TextEditor.5.dylib`KateAutoIndent::userTypedChar(this=<unavailable>, view=<unavailable>, position=<unavailable>, typedChar=<unavailable>) + 189 at kateautoindent.cpp:453
    frame #20: 0x00000001081dad3e libKF5TextEditor.5.dylib`KTextEditor::DocumentPrivate::newLine(this=0x00007f95b9fa7980, v=0x00007f95a67a2b60) + 254 at katedocument.cpp:3111
    frame #21: 0x00000001082885a8 libKF5TextEditor.5.dylib`KateViewInternal::keyPressEvent(QKeyEvent*) [inlined] KateViewInternal::doReturn() + 16 at kateviewinternal.cpp:880
    frame #22: 0x0000000108288598 libKF5TextEditor.5.dylib`KateViewInternal::keyPressEvent(this=0x00007f95aaf177e0, e=0x00007fff580b51b0) + 472 at kateviewinternal.cpp:2461
    frame #23: 0x00000001082880ef libKF5TextEditor.5.dylib`KateViewInternal::eventFilter(this=0x00007f95aaf177e0, obj=0x00007f95aaf177e0, e=0x00007fff580b51b0) + 95 at kateviewinternal.cpp:2370
    frame #24: 0x000000010ab3ba1e QtCore`QCoreApplicationPrivate::sendThroughObjectEventFilters(receiver=0x00007f95aaf177e0, event=0x00007fff580b51b0) + 222 at qcoreapplication.cpp:1106
    frame #25: 0x0000000109b48a58 QtWidgets`QApplicationPrivate::notify_helper(this=<unavailable>, receiver=0x00007f95aaf177e0, e=0x00007fff580b51b0) + 248 at qapplication.cpp:3741
    frame #26: 0x0000000109b4a308 QtWidgets`QApplication::notify(this=<unavailable>, receiver=<unavailable>, e=0x00007fff580b51b0) + 1432 at qapplication.cpp:3127
    frame #27: 0x000000010ab3b717 QtCore`QCoreApplication::notifyInternal2(receiver=0x00007f95aaf177e0, event=0x00007fff580b51b0) + 167 at qcoreapplication.cpp:995
    frame #28: 0x0000000109ba9c9e QtWidgets`QWidgetWindow::event(this=0x00007f95b5bbb100, event=0x00007fff580b51b0) + 382 at qwidgetwindow.cpp:232
    frame #29: 0x0000000109b48a6d QtWidgets`QApplicationPrivate::notify_helper(this=<unavailable>, receiver=0x00007f95b5bbb100, e=0x00007fff580b51b0) + 269 at qapplication.cpp:3745
    frame #30: 0x0000000109b4bde2 QtWidgets`QApplication::notify(this=<unavailable>, receiver=<unavailable>, e=<unavailable>) + 8306 at qapplication.cpp:3708
    frame #31: 0x000000010ab3b717 QtCore`QCoreApplication::notifyInternal2(receiver=0x00007f95b5bbb100, event=0x00007fff580b51b0) + 167 at qcoreapplication.cpp:995
    frame #32: 0x000000010a374846 QtGui`QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) [inlined] QCoreApplication::sendSpontaneousEvent(receiver=<unavailable>, event=0x000000010a6c48a0) + 182 at qcoreapplication.h:234
    frame #33: 0x000000010a374836 QtGui`QGuiApplicationPrivate::processKeyEvent(e=0x00007f95be08a4e0) + 166 at qguiapplication.cpp:2044
    frame #34: 0x000000010a372d37 QtGui`QGuiApplicationPrivate::processWindowSystemEvent(e=0x00007f95be08a4e0) + 599 at qguiapplication.cpp:1721
    frame #35: 0x000000010a35b0bb QtGui`QWindowSystemInterface::sendWindowSystemEvents(flags=<unavailable>) + 171 at qwindowsysteminterface.cpp:710
    frame #36: 0x000000010a35a020 QtGui`QWindowSystemInterface::flushWindowSystemEvents(flags=(i = 0)) + 576 at qwindowsysteminterface.cpp:688
    frame #37: 0x00000001145db4b7 libqaltcocoa.dylib`-[QNSView handleKeyEvent:eventType:](self=<unavailable>, _cmd=<unavailable>, nsevent=0x00007f95aacbcca0, eventType=6) + 1719 at qnsview.mm:1603
    frame #38: 0x00000001145db5e8 libqaltcocoa.dylib`-[QNSView keyDown:](self=0x00007f95b5bbb9f0, _cmd=<unavailable>, nsevent=0x00007f95aacbcca0) + 88 at qnsview.mm:1615
    frame #39: 0x00007fff8f09556b AppKit`-[NSWindow sendEvent:] + 1843
    frame #40: 0x00000001145c88a7 libqaltcocoa.dylib`-[QNSWindow superSendEvent:](self=<unavailable>, _cmd=<unavailable>, theEvent=<unavailable>) + 39 at qcocoawindow.mm:299
    frame #41: 0x00000001145c81ca libqaltcocoa.dylib`-[QNSWindowHelper handleWindowEvent:](self=0x00007f95b59652e0, _cmd=<unavailable>, theEvent=<unavailable>) + 554 at qcocoawindow.mm:194
    frame #42: 0x00007fff8f036b32 AppKit`-[NSApplication sendEvent:] + 3395
    frame #43: 0x00000001145e4be9 libqaltcocoa.dylib`-[QNSApplication sendEvent:](self=0x00007f95b2e5b170, _cmd=<unavailable>, event=0x00007f95aacbcca0) + 89 at qcocoaapplication.mm:194
    frame #44: 0x00007fff8ee869f9 AppKit`-[NSApplication run] + 646
    frame #45: 0x00000001145e1266 libqaltcocoa.dylib`QCocoaEventDispatcher::processEvents(this=0x00007f95b2ec8b10, flags=<unavailable>) + 2918 at qcocoaeventdispatcher.mm:431
    frame #46: 0x000000010ab3790e QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(this=<unavailable>, flags=<unavailable>) + 398 at qeventloop.cpp:134
    frame #47: 0x000000010ab378f4 QtCore`QEventLoop::exec(this=0x00007fff580b5da0, flags=<unavailable>) + 372 at qeventloop.cpp:212
    frame #48: 0x000000010ab3bdfa QtCore`QCoreApplication::exec() + 346 at qcoreapplication.cpp:1268
    frame #49: 0x0000000107b62766 kdevelop.bin`main(argc=<unavailable>, argv=0x00007fff580b60d8) + 52438 at main.cpp:917
    frame #50: 0x00007fff906e25fd libdyld.dylib`start + 1
    frame #51: 0x00007fff906e25fd libdyld.dylib`start + 1

  thread #2: tid = 0x22b9a19, 0x00007fff8fb78e22 libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x00007fff8fb78e22 libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0x0000000107f7bcde libKF5Crash.5.dylib`KCrash::startProcess(int, char const**, bool) [inlined] startProcessInternal(argc=<unavailable>, directly=<unavailable>) + 125 at kcrash.cpp:651
    frame #2: 0x0000000107f7bc61 libKF5Crash.5.dylib`KCrash::startProcess(argc=<unavailable>, argv=<unavailable>, waitAndExit=<unavailable>) + 17 at kcrash.cpp:633
    frame #3: 0x0000000107f7baa5 libKF5Crash.5.dylib`KCrash::defaultCrashHandler(sig=11) + 1061 at kcrash.cpp:530
    frame #4: 0x00007fff929405aa libsystem_platform.dylib`_sigtramp + 26
    frame #5: 0x00007fff8fb79663 libsystem_kernel.dylib`kevent64 + 11
    frame #6: 0x00007fff93ec8136 libdispatch.dylib`_dispatch_mgr_thread + 52

  thread #3: tid = 0x22b9a24, 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10, name = 'QDBusConnectionManager'
    frame #0: 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10
    frame #1: 0x000000010ab8dcd0 QtCore`qt_safe_poll(pollfd*, unsigned int, timespec const*) [inlined] qt_ppoll(fds=0x00007f95b2d31e38, nfds=2) + 528 at qcore_unix.cpp:83
    frame #2: 0x000000010ab8dcbb QtCore`qt_safe_poll(fds=0x00007f95b2d31e38, nfds=2, timeout_ts=0x0000000000000000) + 507 at qcore_unix.cpp:102
    frame #3: 0x000000010ab8f359 QtCore`QEventDispatcherUNIX::processEvents(this=<unavailable>, flags=<unavailable>) + 857 at qeventdispatcher_unix.cpp:500
    frame #4: 0x000000010ab3790e QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(this=<unavailable>, flags=<unavailable>) + 398 at qeventloop.cpp:134
    frame #5: 0x000000010ab378f4 QtCore`QEventLoop::exec(this=0x0000000117741e30, flags=<unavailable>) + 372 at qeventloop.cpp:212
    frame #6: 0x000000010a977e62 QtCore`QThread::exec(this=<unavailable>) + 114 at qthread.cpp:507
    frame #7: 0x000000010978c783 QtDBus`QDBusConnectionManager::run(this=0x00007f95b2d3cb00) + 19 at qdbusconnection.cpp:170
    frame #8: 0x000000010a97b867 QtCore`QThreadPrivate::start(arg=0x00007f95b2d3cb00) + 359 at qthread_unix.cpp:368
    frame #9: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #10: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #11: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13

  thread #4: tid = 0x22b9a4a, 0x00007fff8fb74a1a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #0: 0x00007fff8fb74a1a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff8fb73d18 libsystem_kernel.dylib`mach_msg + 64
    frame #2: 0x00007fff9a52bf15 CoreFoundation`__CFRunLoopServiceMachPort + 181
    frame #3: 0x00007fff9a52b539 CoreFoundation`__CFRunLoopRun + 1161
    frame #4: 0x00007fff9a52ae75 CoreFoundation`CFRunLoopRunSpecific + 309
    frame #5: 0x00007fff8f03305e AppKit`_NSEventThread + 144
    frame #6: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #7: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #8: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13

  thread #5: tid = 0x22b9a4d, 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10, name = 'QThread'
    frame #0: 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10
    frame #1: 0x000000010ab8db30 QtCore`qt_safe_poll(pollfd*, unsigned int, timespec const*) [inlined] qt_ppoll(fds=0x00007f95b5b0b6a8, nfds=1) + 112 at qcore_unix.cpp:83
    frame #2: 0x000000010ab8daf5 QtCore`qt_safe_poll(fds=0x00007f95b5b0b6a8, nfds=1, timeout_ts=0x000000011ae6ad10) + 53 at qcore_unix.cpp:111
    frame #3: 0x000000010ab8f359 QtCore`QEventDispatcherUNIX::processEvents(this=<unavailable>, flags=<unavailable>) + 857 at qeventdispatcher_unix.cpp:500
    frame #4: 0x000000010ab3790e QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(this=<unavailable>, flags=<unavailable>) + 398 at qeventloop.cpp:134
    frame #5: 0x000000010ab378f4 QtCore`QEventLoop::exec(this=0x000000011ae6ade0, flags=<unavailable>) + 372 at qeventloop.cpp:212
    frame #6: 0x000000010a977e62 QtCore`QThread::exec(this=<unavailable>) + 114 at qthread.cpp:507
    frame #7: 0x000000010b28490f libKDevPlatformLanguage.52.dylib`KDevelop::DUChainPrivate::CleanupThread::run(this=0x00007f95b59a5a40) + 159 at duchain.cpp:283
    frame #8: 0x000000010a97b867 QtCore`QThreadPrivate::start(arg=0x00007f95b59a5a40) + 359 at qthread_unix.cpp:368
    frame #9: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #10: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #11: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13

  thread #6: tid = 0x22b9a52, 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10, name = 'Qt bearer thread'
    frame #0: 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10
    frame #1: 0x000000010ab8dcd0 QtCore`qt_safe_poll(pollfd*, unsigned int, timespec const*) [inlined] qt_ppoll(fds=0x00007f95b5888978, nfds=1) + 528 at qcore_unix.cpp:83
    frame #2: 0x000000010ab8dcbb QtCore`qt_safe_poll(fds=0x00007f95b5888978, nfds=1, timeout_ts=0x0000000000000000) + 507 at qcore_unix.cpp:102
    frame #3: 0x000000010ab8f359 QtCore`QEventDispatcherUNIX::processEvents(this=<unavailable>, flags=<unavailable>) + 857 at qeventdispatcher_unix.cpp:500
    frame #4: 0x000000010ab3790e QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(this=<unavailable>, flags=<unavailable>) + 398 at qeventloop.cpp:134
    frame #5: 0x000000010ab378f4 QtCore`QEventLoop::exec(this=0x00000001218d4e60, flags=<unavailable>) + 372 at qeventloop.cpp:212
    frame #6: 0x000000010a977e62 QtCore`QThread::exec(this=<unavailable>) + 114 at qthread.cpp:507
    frame #7: 0x000000010a97b867 QtCore`QThreadPrivate::start(arg=0x00007f95b59f7440) + 359 at qthread_unix.cpp:368
    frame #8: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #9: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #10: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13

  thread #7: tid = 0x22b9a55, 0x00007fff8fb789aa libsystem_kernel.dylib`__select + 10, name = 'com.apple.CFSocket.private'
    frame #0: 0x00007fff8fb789aa libsystem_kernel.dylib`__select + 10
    frame #1: 0x00007fff9a577a03 CoreFoundation`__CFSocketManager + 867
    frame #2: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #3: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #4: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13

  thread #8: tid = 0x22b9a58, 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10, name = 'KDevelop::CompletionWorkerThread'
    frame #0: 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10
    frame #1: 0x000000010ab8dcd0 QtCore`qt_safe_poll(pollfd*, unsigned int, timespec const*) [inlined] qt_ppoll(fds=0x00007f95b5e9dd78, nfds=1) + 528 at qcore_unix.cpp:83
    frame #2: 0x000000010ab8dcbb QtCore`qt_safe_poll(fds=0x00007f95b5e9dd78, nfds=1, timeout_ts=0x0000000000000000) + 507 at qcore_unix.cpp:102
    frame #3: 0x000000010ab8f359 QtCore`QEventDispatcherUNIX::processEvents(this=<unavailable>, flags=<unavailable>) + 857 at qeventdispatcher_unix.cpp:500
    frame #4: 0x000000010ab3790e QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(this=<unavailable>, flags=<unavailable>) + 398 at qeventloop.cpp:134
    frame #5: 0x000000010ab378f4 QtCore`QEventLoop::exec(this=0x0000000125249db0, flags=<unavailable>) + 372 at qeventloop.cpp:212
    frame #6: 0x000000010a977e62 QtCore`QThread::exec(this=<unavailable>) + 114 at qthread.cpp:507
    frame #7: 0x000000010b370c84 libKDevPlatformLanguage.52.dylib`KDevelop::CompletionWorkerThread::run(this=0x00007f95b5e99770) + 388 at codecompletionmodel.cpp:79
    frame #8: 0x000000010a97b867 QtCore`QThreadPrivate::start(arg=0x00007f95b5e99770) + 359 at qthread_unix.cpp:368
    frame #9: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #10: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #11: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13

  thread #9: tid = 0x22b9a76, 0x00007fff8fb78716 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Queue(0x7f95b586f170)[01]'
    frame #0: 0x00007fff8fb78716 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff8dc7fc3b libsystem_pthread.dylib`_pthread_cond_wait + 727
    frame #2: 0x000000010a97cdbb QtCore`QWaitConditionPrivate::wait(this=0x00007f95b58681b0, time=<unavailable>) + 75 at qwaitcondition_unix.cpp:143
    frame #3: 0x000000010a97cd4c QtCore`QWaitCondition::wait(this=0x00007f95b5868120, mutex=0x00007f95b58011b0, time=18446744073709551615) + 156 at qwaitcondition_unix.cpp:215
    frame #4: 0x000000010c20e604 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: 0x000000010c20e5ed libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(this=<unavailable>, th=0x00007f95b6cbd6a0, threadWasBusy=<unavailable>, suspendIfInactive=<unavailable>, justReturning=<unavailable>) + 781 at weaver.cpp:554
    frame #6: 0x000000010c212ff0 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=0x00007f95b586f000, th=0x00007f95b6cbd6a0, wasBusy=false) + 64 at workinghardstate.cpp:66
    frame #7: 0x000000010c2130f5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75
    frame #8: 0x000000010c20e902 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=false) + 50 at weaver.cpp:568
    frame #9: 0x000000010c213035 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 133 at workinghardstate.cpp:73
    frame #10: 0x000000010c2130f5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75
    frame #11: 0x000000010c20e902 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=true) + 50 at weaver.cpp:568
    frame #12: 0x000000010c210a66 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Thread::run(this=0x00007f95b6cbd6a0) + 118 at thread.cpp:103
    frame #13: 0x000000010a97b867 QtCore`QThreadPrivate::start(arg=0x00007f95b6cbd6a0) + 359 at qthread_unix.cpp:368
    frame #14: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #15: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #16: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13

  thread #10: tid = 0x22b9a77, 0x00007fff8fb78716 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Queue(0x7f95b586f170)[02]'
    frame #0: 0x00007fff8fb78716 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff8dc7fc3b libsystem_pthread.dylib`_pthread_cond_wait + 727
    frame #2: 0x000000010a97cdbb QtCore`QWaitConditionPrivate::wait(this=0x00007f95b58681b0, time=<unavailable>) + 75 at qwaitcondition_unix.cpp:143
    frame #3: 0x000000010a97cd4c QtCore`QWaitCondition::wait(this=0x00007f95b5868120, mutex=0x00007f95b58011b0, time=18446744073709551615) + 156 at qwaitcondition_unix.cpp:215
    frame #4: 0x000000010c20e604 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: 0x000000010c20e5ed libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(this=<unavailable>, th=0x00007f95ba05f870, threadWasBusy=<unavailable>, suspendIfInactive=<unavailable>, justReturning=<unavailable>) + 781 at weaver.cpp:554
    frame #6: 0x000000010c212ff0 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=0x00007f95b586f000, th=0x00007f95ba05f870, wasBusy=false) + 64 at workinghardstate.cpp:66
    frame #7: 0x000000010c2130f5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75
    frame #8: 0x000000010c20e902 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=false) + 50 at weaver.cpp:568
    frame #9: 0x000000010c213035 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 133 at workinghardstate.cpp:73
    frame #10: 0x000000010c2130f5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75
    frame #11: 0x000000010c20e902 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=false) + 50 at weaver.cpp:568
    frame #12: 0x000000010c213035 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 133 at workinghardstate.cpp:73
    frame #13: 0x000000010c2130f5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75
    frame #14: 0x000000010c20e902 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=false) + 50 at weaver.cpp:568
    frame #15: 0x000000010c213035 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 133 at workinghardstate.cpp:73
    frame #16: 0x000000010c2130f5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75
    frame #17: 0x000000010c20e902 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=true) + 50 at weaver.cpp:568
    frame #18: 0x000000010c210a66 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Thread::run(this=0x00007f95ba05f870) + 118 at thread.cpp:103
    frame #19: 0x000000010a97b867 QtCore`QThreadPrivate::start(arg=0x00007f95ba05f870) + 359 at qthread_unix.cpp:368
    frame #20: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #21: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #22: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13

  thread #11: tid = 0x22b9a78, 0x00007fff8fb78716 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Queue(0x7f95b586f170)[03]'
    frame #0: 0x00007fff8fb78716 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff8dc7fc3b libsystem_pthread.dylib`_pthread_cond_wait + 727
    frame #2: 0x000000010a97cdbb QtCore`QWaitConditionPrivate::wait(this=0x00007f95b58681b0, time=<unavailable>) + 75 at qwaitcondition_unix.cpp:143
    frame #3: 0x000000010a97cd4c QtCore`QWaitCondition::wait(this=0x00007f95b5868120, mutex=0x00007f95b58011b0, time=18446744073709551615) + 156 at qwaitcondition_unix.cpp:215
    frame #4: 0x000000010c20e604 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: 0x000000010c20e5ed libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(this=<unavailable>, th=0x00007f95b927e660, threadWasBusy=<unavailable>, suspendIfInactive=<unavailable>, justReturning=<unavailable>) + 781 at weaver.cpp:554
    frame #6: 0x000000010c212ff0 libKF5ThreadWeaver.5.dylib`ThreadWeaver::WorkingHardState::applyForWork(this=0x00007f95b586f000, th=0x00007f95b927e660, wasBusy=true) + 64 at workinghardstate.cpp:66
    frame #7: 0x000000010c2130f5 libKF5ThreadWeaver.5.dylib`non-virtual thunk to ThreadWeaver::WorkingHardState::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=<unavailable>) + 21 at workinghardstate.cpp:75
    frame #8: 0x000000010c20e902 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Weaver::applyForWork(this=<unavailable>, th=<unavailable>, wasBusy=true) + 50 at weaver.cpp:568
    frame #9: 0x000000010c210a66 libKF5ThreadWeaver.5.dylib`ThreadWeaver::Thread::run(this=0x00007f95b927e660) + 118 at thread.cpp:103
    frame #10: 0x000000010a97b867 QtCore`QThreadPrivate::start(arg=0x00007f95b927e660) + 359 at qthread_unix.cpp:368
    frame #11: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #12: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #13: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13

  thread #12: tid = 0x22b9b96, 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10, name = 'OutputFilterThread'
    frame #0: 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10
    frame #1: 0x000000010ab8dcd0 QtCore`qt_safe_poll(pollfd*, unsigned int, timespec const*) [inlined] qt_ppoll(fds=0x00007f95baf5c3d8, nfds=1) + 528 at qcore_unix.cpp:83
    frame #2: 0x000000010ab8dcbb QtCore`qt_safe_poll(fds=0x00007f95baf5c3d8, nfds=1, timeout_ts=0x0000000000000000) + 507 at qcore_unix.cpp:102
    frame #3: 0x000000010ab8f359 QtCore`QEventDispatcherUNIX::processEvents(this=<unavailable>, flags=<unavailable>) + 857 at qeventdispatcher_unix.cpp:500
    frame #4: 0x000000010ab3790e QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(this=<unavailable>, flags=<unavailable>) + 398 at qeventloop.cpp:134
    frame #5: 0x000000010ab378f4 QtCore`QEventLoop::exec(this=0x000000011b6b1e60, flags=<unavailable>) + 372 at qeventloop.cpp:212
    frame #6: 0x000000010a977e62 QtCore`QThread::exec(this=<unavailable>) + 114 at qthread.cpp:507
    frame #7: 0x000000010a97b867 QtCore`QThreadPrivate::start(arg=0x00007f95baacb338) + 359 at qthread_unix.cpp:368
    frame #8: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #9: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #10: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13

  thread #13: tid = 0x22b9da6, 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10, name = 'QQmlThread'
    frame #0: 0x00007fff8fb7994a libsystem_kernel.dylib`poll + 10
    frame #1: 0x000000010ab8dcd0 QtCore`qt_safe_poll(pollfd*, unsigned int, timespec const*) [inlined] qt_ppoll(fds=0x00007f95b9b4d678, nfds=1) + 528 at qcore_unix.cpp:83
    frame #2: 0x000000010ab8dcbb QtCore`qt_safe_poll(fds=0x00007f95b9b4d678, nfds=1, timeout_ts=0x0000000000000000) + 507 at qcore_unix.cpp:102
    frame #3: 0x000000010ab8f359 QtCore`QEventDispatcherUNIX::processEvents(this=<unavailable>, flags=<unavailable>) + 857 at qeventdispatcher_unix.cpp:500
    frame #4: 0x000000010ab3790e QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(this=<unavailable>, flags=<unavailable>) + 398 at qeventloop.cpp:134
    frame #5: 0x000000010ab378f4 QtCore`QEventLoop::exec(this=0x000000011c58be40, flags=<unavailable>) + 372 at qeventloop.cpp:212
    frame #6: 0x000000010a977e62 QtCore`QThread::exec(this=<unavailable>) + 114 at qthread.cpp:507
    frame #7: 0x0000000109003159 QtQml`QQmlThreadPrivate::run(this=0x00007f95bf0c2600) + 57 at qqmlthread.cpp:147
    frame #8: 0x000000010a97b867 QtCore`QThreadPrivate::start(arg=0x00007f95bf0c2600) + 359 at qthread_unix.cpp:368
    frame #9: 0x00007fff8dc7d899 libsystem_pthread.dylib`_pthread_body + 138
    frame #10: 0x00007fff8dc7d72a libsystem_pthread.dylib`_pthread_start + 137
    frame #11: 0x00007fff8dc81fc9 libsystem_pthread.dylib`thread_start + 13
(lldb) detach
Process 55563 detached

Possible duplicates by query: bug 385346, bug 385333, bug 385190, bug 385179, bug 385064.

Reported using DrKonqi
Comment 1 RJVB 2017-10-05 13:35:46 UTC
Turns out this is reproducible:
- Use the proposed "recover data" feature after reopening the session and parsing stopped.
- hit enter after the new line

The line in question, in DocumentationController::documentationProviders():

    qWarning() << Q_FUNC_INFO << "Current documentation providers:" << ret;

inserted before the return statement, with an empty line above and below the qWarning line.

The crash disappears after reverting to KTextEditor 5.35.0 .
Comment 2 Kevin Funk 2017-10-05 13:38:43 UTC

*** This bug has been marked as a duplicate of bug 384404 ***
Comment 3 RJVB 2017-10-05 16:58:04 UTC
OK, now I'm curious. The stack backtrace in 384404 doesn't look like the one I get at all, at least not the part in QtQML. How can you know it's the same bug?

It'd be extremely nice if there were a workaround/fix for this, applicable either to KTextEditor or to Qt < 5.9 . 5.9 drops support for older OS versions on Mac.

FWIW, this is what I get on Linux:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffce25dd77 in ?? ()
(gdb) bt
#0  0x00007fffce25dd77 in ?? ()
#1  0x0000000000fc6a40 in ?? ()
#2  0x0003200000000000 in ?? ()
#3  0x00007fffbd54f540 in ?? ()
#4  0x0000000000fc6a40 in ?? ()
#5  0x0000000000fc6a40 in ?? ()
#6  0x00007ffff244d108 in getValue (attrs=..., v=..., this=0xfc6a40)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtdeclarative/src/qml/jsruntime/qv4object_p.h:230
#7  QV4::Object::internalGet (this=0xfc6a40, name=0x7fffbd54f548, hasProperty=0x7fffbd54f418)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtdeclarative/src/qml/jsruntime/qv4object.cpp:629
#8  0x00007ffff2419553 in get (hasProperty=0x7ffff2863d60 <QV4::CallContext::static_vtbl>, name=0x7fffbd54f4a0, 
    this=<optimised out>)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtdeclarative/include/QtQml/5.8.0/QtQml/private/../../../../../src/qml/jsruntime/qv4object_p.h:326
#9  QV4::ExecutionContext::getPropertyAndBase (this=0x7fffbd54f418, name=0x7fffbd54f4a0, base=0x0)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtdeclarative/src/qml/jsruntime/qv4context.cpp:509
#10 0x00007ffff24a4273 in call (d=0x7fffbd54f458, scope=..., this=<optimised out>)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtdeclarative/src/qml/jsruntime/qv4object_p.h:352
#11 QV4::Runtime::method_callActivationProperty (engine=<optimised out>, nameIndex=<optimised out>, 
    callData=0x7fffbd54f458)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtdeclarative/src/qml/jsruntime/qv4runtime.cpp:982
#12 0x00007fffce2a1956 in ?? ()
#13 0x0000000000000001 in ?? ()
#14 0x0000000000000000 in ?? ()
Comment 4 Sven Brauch 2017-10-05 18:19:05 UTC
I guess simply because it's very unlikely there are two crash bugs in QtScript which trigger when pressing enter in kate.
Comment 5 RJVB 2017-10-05 19:00:37 UTC
Yeah, that was my null hypothesis too, but I was kind of hoping it'd be wrong.

This irks me, I cannot help but feel that it ought to be possible to tweak the "incriminated" QML function so that it doesn't trigger the bug. I'd tinker with that, but don't have an inkling where even to start.

I'm now figuring out a patch that will revert KTextEdit to something that works with Qt 5.7 and 5.8, in hopes it'll be useful for others too. It seems one just has to revert #fc510adaecf1dc83416eaf4392925ee4f3c5a1e0 and then #878797830dbd3b29bd5dcd8241c17ea20fb6914e ... crossing fingers, toes and eyes they'll keep applying (mostly) cleanly until I get to update to Qt 5.9 .
Comment 6 Allan Sandfeld 2017-10-06 14:49:47 UTC
What makes you think the issue is solved in 5.9? Have you tried?
Comment 7 RJVB 2017-10-06 15:12:25 UTC
No, I haven't, it's a conclusion drawn on the linked bug report (384404)