Application: kdevelop (6.3.250770 (25.07.70)) (Compiled from sources) ApplicationNotResponding [ANR]: false Qt Version: 6.8.3 Frameworks Version: 6.13.0 Operating System: Linux 6.14.4-gentoo x86_64 Windowing System: Wayland Distribution: "Gentoo Linux" DrKonqi: 6.3.4 [CoredumpBackend] -- Information about the crash: Open an .md file and say you don't want to use LSP. The crash can be reproduced every time. -- Backtrace (Reduced): #7 0x00007f6648aa3088 in __gnu_cxx::__verbose_terminate_handler () at /tmp/portage/sys-devel/gcc-15.1.0/work/gcc-15.1.0/libstdc++-v3/libsupc++/vterminate.cc:95 #8 0x00007f6648ade2dc in __cxxabiv1::__terminate (handler=<optimized out>) at /tmp/portage/sys-devel/gcc-15.1.0/work/gcc-15.1.0/libstdc++-v3/libsupc++/eh_terminate.cc:48 #9 0x00007f6648aa2a74 in std::terminate () at /tmp/portage/sys-devel/gcc-15.1.0/work/gcc-15.1.0/libstdc++-v3/libsupc++/eh_terminate.cc:58 #10 0x00007f6648ade586 in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x7f6648d056b8 <typeinfo for std::bad_alloc>, dest=0x7f6648adc590 <std::bad_alloc::~bad_alloc()>) at /tmp/portage/sys-devel/gcc-15.1.0/work/gcc-15.1.0/libstdc++-v3/libsupc++/eh_throw.cc:98 #11 0x00007f6648ec5ed6 in qBadAlloc() () at /usr/lib64/libQt6Core.so.6 Reported using DrKonqi
Created attachment 180916 [details] New crash information added by DrKonqi DrKonqi auto-attaching complete backtrace.
1. Do you have a "marksman" package installed? 2. Does the same crash affect Kate?
I have installed marksman, but was unable to reproduce either in Kate or in KDevelop.
Sorry for the late reply. I don't have marksman installed, Kate does not ask about LSP server for .md files.
Go to Kate/KDevelop settings=>LSP Client=>Allowed & Blocked Servers. If a marksman/markdown entry is present, right-click and delete it, then press Apply (the Apply button will be disabled after the removal, probably because of a bug in the LSP Client plugin, so check and uncheck some other entry to be able to save). Then open an .md file again. Does the dialog still appear only in KDevelop but not in Kate? What is the full command line in the "LSP server start requested" dialog where you choose not to start the markdown LSP server?
You'll have to enable the LSP plugin in Kate settings. Unlike Kate, KDevelop enables it by default.
I went to KDevelop LSP settings and found "Allowed and blocked servers" to be empty. After that KDevelop crashes upon opening .md files: Thread 1 "kdevelop" received signal SIGABRT, Aborted. 0x00007ffff686a73c in ?? () from /usr/lib64/libc.so.6 (gdb) bt #0 0x00007ffff686a73c in ??? () at /usr/lib64/libc.so.6 #1 0x00007ffff68122d6 in raise () at /usr/lib64/libc.so.6 #2 0x00007ffff67fa30b in abort () at /usr/lib64/libc.so.6 #3 0x00007ffff5ea3088 in __gnu_cxx::__verbose_terminate_handler () at /tmp/portage/sys-devel/gcc-15.1.0/work/gcc-15.1.0/libstdc++-v3/libsupc++/vterminate.cc:95 #4 0x00007ffff5ede2dc in __cxxabiv1::__terminate (handler=<optimized out>) at /tmp/portage/sys-devel/gcc-15.1.0/work/gcc-15.1.0/libstdc++-v3/libsupc++/eh_terminate.cc:48 #5 0x00007ffff5ea2a74 in std::terminate () at /tmp/portage/sys-devel/gcc-15.1.0/work/gcc-15.1.0/libstdc++-v3/libsupc++/eh_terminate.cc:58 #6 0x00007ffff5ede586 in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x7ffff61056b8 <typeinfo for std::bad_alloc>, dest=0x7ffff5edc590 <std::bad_alloc::~bad_alloc()>) at /tmp/portage/sys-devel/gcc-15.1.0/work/gcc-15.1.0/libstdc++-v3/libsupc++/eh_throw.cc:98 #7 0x00007ffff62c5ed6 in qBadAlloc() () at /usr/lib64/libQt6Core.so.6 #8 0x00007ffff62add0d in QString::QString(long long, Qt::Initialization) [clone .cold] () at /usr/lib64/libQt6Core.so.6 #9 0x00007ffff6466a25 in QString argToQStringImpl<QLatin1String>(QLatin1String, unsigned long, QtPrivate::ArgBase const**) () at /usr/lib64/libQt6Core.so.6 #10 0x00007ffff64671ef in QtPrivate::argToQString(QLatin1String, unsigned long, QtPrivate::ArgBase const**) () at /usr/lib64/libQt6Core.so.6 #11 0x00007ffff7cccaad in KTextEditorIntegration::ShowMessagesJob::postMessage(QMap<QString, QVariant> const&) () at /usr/lib64/libKDevPlatformShell.so.63 #12 0x00007ffff653c4de in QMetaMethodInvoker::invokeImpl(QMetaMethod, void*, Qt::ConnectionType, long long, void const* const*, char const* const*, QtPrivate::QMetaTypeInterface const* const*) () at /usr/lib64/libQt6Core.so.6 #13 0x00007ffff653d04e in QMetaObject::invokeMethodImpl(QObject*, char const*, Qt::ConnectionType, long long, void const* const*, char const* const*, QtPrivate::QMetaTypeInterface const* const*) () at /usr/lib64/libQt6Core.so.6 #14 0x00007fff7b75171c in Utils::showMessage(QMap<QString, QVariant> const&, KTextEditor::MainWindow*) () at /usr/lib64/libkateprivate.so.25.04.0 #15 0x00007fff8c13b510 in LSPClientPluginViewImpl::addMessage(LSPMessageType, QString const&, QString const&, QString const&) () at /usr/lib64/qt6/plugins/kf6/ktexteditor/lspclientplugin.so #16 0x00007fff8c13bba0 in LSPClientPluginViewImpl::onShowMessage(KTextEditor::Message::MessageType, QString const&) () at /usr/lib64/qt6/plugins/kf6/ktexteditor/lspclientplugin.so #17 0x00007ffff64f8534 in void doActivate<false>(QObject*, int, void**) () at /usr/lib64/libQt6Core.so.6 #18 0x00007fff8c12049a in LSPClientPlugin::showMessage(KTextEditor::Message::MessageType, QString const&) () at /usr/lib64/qt6/plugins/kf6/ktexteditor/lspclientplugin.so #19 0x00007fff8c192d40 in LSPClientServerManagerImpl::_findServer(KTextEditor::View*, KTextEditor::Document*, QJsonObject&) () at /usr/lib64/qt6/plugins/kf6/ktexteditor/lspclientplugin.so #20 0x00007fff8c195dad in LSPClientServerManagerImpl::findServer(KTextEditor::View*, bool) () at /usr/lib64/qt6/plugins/kf6/ktexteditor/lspclientplugin.so #21 0x00007fff8c1a286f in LSPClientSymbolViewImpl::refresh(bool, bool, int) () at /usr/lib64/qt6/plugins/kf6/ktexteditor/lspclientplugin.so #22 0x00007ffff64f8534 in void doActivate<false>(QObject*, int, void**) () at /usr/lib64/libQt6Core.so.6 #23 0x00007fff8c19d2fe in LSPClientViewTrackerImpl::viewChanged(KTextEditor::View*) () at /usr/lib64/qt6/plugins/kf6/ktexteditor/lspclientplugin.so #24 0x00007ffff64f8534 in void doActivate<false>(QObject*, int, void**) () at /usr/lib64/libQt6Core.so.6 #25 0x00007ffff3ca06f6 in KTextEditor::MainWindow::viewChanged(KTextEditor::View*) () at /usr/lib64/libKF6TextEditor.so.6 #26 0x00007ffff7cc2deb in QtPrivate::QCallableObject<KTextEditorIntegration::MainWindow::MainWindow(KDevelop::MainWindow*)::{lambda(Sublime::View*)#2}, QtPrivate::List<Sublime::View*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) () at /usr/lib64/libKDevPlatformShell.so.63 #27 0x00007ffff64f8534 in void doActivate<false>(QObject*, int, void**) () at /usr/lib64/libQt6Core.so.6 #28 0x00007ffff3f6ab26 in Sublime::MainWindow::activeViewChanged(Sublime::View*) () at /usr/lib64/libKDevPlatformSublime.so.63 #29 0x00007ffff3f6bdbf in Sublime::MainWindow::activateView(Sublime::View*, bool) () at /usr/lib64/libKDevPlatformSublime.so.63 #30 0x00007ffff64f8534 in void doActivate<false>(QObject*, int, void**) () at /usr/lib64/libQt6Core.so.6 #31 0x00007ffff3f58fc3 in Sublime::Container::activateView(Sublime::View*) () at /usr/lib64/libKDevPlatformSublime.so.63 #32 0x00007ffff64f8534 in void doActivate<false>(QObject*, int, void**) () at /usr/lib64/libQt6Core.so.6 #33 0x00007ffff7736312 in QTabBar::currentChanged(int) () at /usr/lib64/libQt6Widgets.so.6 --Type <RET> for more, q to quit, c to continue without paging-- #34 0x00007ffff3f5b75c in Sublime::Container::setCurrentWidget(QWidget*) () at /usr/lib64/libKDevPlatformSublime.so.63 #35 0x00007ffff3f6bdad in Sublime::MainWindow::activateView(Sublime::View*, bool) () at /usr/lib64/libKDevPlatformSublime.so.63 #36 0x00007ffff7d1a44b in KDevelop::DocumentControllerPrivate::openDocumentInternal(KDevelop::IDocument*, KTextEditor::Range const&, QFlags<KDevelop::IDocumentController::DocumentActivation>, KDevelop::IDocument*) () at /usr/lib64/libKDevPlatformShell.so.63 #37 0x00007ffff7d1f1a5 in KDevelop::DocumentControllerPrivate::openDocumentInternal(QUrl const&, QString const&, KTextEditor::Range const&, QString const&, QFlags<KDevelop::IDocumentController::DocumentActivation>, KDevelop::IDocument*) () at /usr/lib64/libKDevPlatformShell.so.63 #38 0x00007ffff7d16369 in KDevelop::DocumentController::openDocument(QUrl const&, KTextEditor::Range const&, QFlags<KDevelop::IDocumentController::DocumentActivation>, QString const&, KDevelop::IDocument*) () at /usr/lib64/libKDevPlatformShell.so.63 #39 0x00007fff8e4a1d45 in OpenWithPlugin::openDefault() const () at /usr/lib64/qt6/plugins/kdevplatform/63/kdevopenwith.so #40 0x00007fff8e4262e5 in ProjectManagerView::open(KDevelop::Path const&) () at /usr/lib64/qt6/plugins/kdevplatform/63/KDevProjectManagerView.so #41 0x00007ffff64f8534 in void doActivate<false>(QObject*, int, void**) () at /usr/lib64/libQt6Core.so.6 #42 0x00007fff8e42a67e in ProjectTreeView::slotActivated(QModelIndex const&) () at /usr/lib64/qt6/plugins/kdevplatform/63/KDevProjectManagerView.so #43 0x00007ffff64f8534 in void doActivate<false>(QObject*, int, void**) () at /usr/lib64/libQt6Core.so.6 #44 0x00007ffff765ba29 in QAbstractItemView::activated(QModelIndex const&) () at /usr/lib64/libQt6Widgets.so.6 #45 0x00007ffff76b47d0 in QAbstractItemView::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQt6Widgets.so.6 #46 0x00007ffff7940748 in QWidget::event(QEvent*) () at /usr/lib64/libQt6Widgets.so.6 #47 0x00007ffff7802c24 in QFrame::event(QEvent*) () at /usr/lib64/libQt6Widgets.so.6 #48 0x00007ffff6514304 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib64/libQt6Core.so.6 #49 0x00007ffff79304b9 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt6Widgets.so.6 #50 0x00007ffff79312da in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt6Widgets.so.6 #51 0x00007ffff6514588 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt6Core.so.6 #52 0x00007ffff7938bb6 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /usr/lib64/libQt6Widgets.so.6 #53 0x00007ffff793b65f in QWidgetWindow::handleMouseEvent(QMouseEvent*) () at /usr/lib64/libQt6Widgets.so.6 #54 0x00007ffff7941ef8 in QWidgetWindow::event(QEvent*) () at /usr/lib64/libQt6Widgets.so.6 #55 0x00007ffff79304c9 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt6Widgets.so.6 #56 0x00007ffff6514588 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt6Core.so.6 #57 0x00007ffff6d8458d in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib64/libQt6Gui.so.6 #58 0x00007ffff6ddfbfb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt6Gui.so.6 #59 0x00007ffff6ddfe78 in QWindowSystemInterface::flushWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt6Gui.so.6 #60 0x00007ffff6498850 in QObject::event(QEvent*) () at /usr/lib64/libQt6Core.so.6 #61 0x00007ffff79304c9 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt6Widgets.so.6 #62 0x00007ffff6514588 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt6Core.so.6 #63 0x00007ffff6538c4e in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQt6Core.so.6 #64 0x00007ffff62d3e57 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /usr/lib64/libQt6Core.so.6 #65 0x00007ffff1703b22 in g_main_dispatch () at /usr/lib64/libglib-2.0.so.0 #66 0x00007ffff1706f47 in g_main_context_iterate_unlocked.isra () at /usr/lib64/libglib-2.0.so.0 #67 0x00007ffff17076f0 in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0 --Type <RET> for more, q to quit, c to continue without paging-- #68 0x00007ffff62cc323 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt6Core.so.6 #69 0x00007ffff653d64a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt6Core.so.6 #70 0x00007ffff653d7e5 in QCoreApplication::exec() () at /usr/lib64/libQt6Core.so.6 #71 0x0000555555562fff in main ()
I mean KDevelop does not show the dialog anymore.
What about Kate? If Kate is unaffected by the crash, I suspect that your LSP plugin, which is distributed with Kate, and your KDevelop version have been built against different versions of the standard library, Qt or KF. That is, this might be a binary compatibility issue. You can check if using other supported Kate plugins - Snippets and Document Preview - causes a crash in KDevelop as well.
I believe it is not Kate-related. KDevelop does not crash when built with -Og but does crash with -O2 (and Kate is built with -O2, BTW), and when I tried to find out why, adding a simple debug print: diff --git a/kdevplatform/shell/ktexteditorpluginintegration.cpp b/kdevplatform/shell/ktexteditorpluginintegration.cpp index d64eaf58438e..8dd624e79dad 100644 --- a/kdevplatform/shell/ktexteditorpluginintegration.cpp +++ b/kdevplatform/shell/ktexteditorpluginintegration.cpp @@ -43,6 +43,8 @@ #include <algorithm> +#include <QDebug> + using namespace KDevelop; namespace { @@ -503,8 +505,11 @@ public: void postMessage(const QVariantMap& message) { + qDebug() << message; const auto category = message[QStringLiteral("category")].toString(); for (const auto textLine : QStringTokenizer(message[QStringLiteral("text")].toString(), QLatin1Char{'\n'})) { + qDebug() << "textLine.size():" << textLine.size(); + qDebug() << "textLine:" << textLine; const auto line = QLatin1String("%1: %2").arg(category, textLine); static_cast<OutputModel*>(model())->appendLine(line); } , it crashed in QDebug::putString(). The message was: QMap(("category", QVariant(QString, "LSP Client"))("text", QVariant(QString, "Failed to find server binary: marksman\nPlease check your PATH for the binary\nSee also https://github.com/artempyanykh/marksman for installation or details"))("type", QVariant(QString, "Warning"))) and I also got: textLine.size(): 38 textLine: "Failed to find server binary: marksman" textLine.size(): 37 textLine: "Please check your PATH for the binary" textLine.size(): 77 textLine: "See also https://github.com/artempyanykh/marksman for installation or details" textLine.size(): -1 The backtrace is: #0 0x00007ffff659aac8 in QDebug::putString(QChar const*, unsigned long) () at /usr/lib64/libQt6Core.so.6 #1 0x00007ffff7ccd619 in QDebug::operator<< (this=0x7fffffffa948, s="") at /usr/include/qt6/QtCore/qdebug.h:128 #2 KTextEditorIntegration::ShowMessagesJob::postMessage (this=0x555560565ad0, message=<optimized out>) at /usr/src/debug/dev-util/kdevelop-9999/kdevelop-9999/kdevplatform/shell/ktexteditorpluginintegration.cpp:513 #3 0x00007ffff653c4de in QMetaMethodInvoker::invokeImpl(QMetaMethod, void*, Qt::ConnectionType, long long, void const* const*, char const* const*, QtPrivate::QMetaTypeInterface const* const*) () at /usr/lib64/libQt6Core.so.6 #4 0x00007ffff653d04e in QMetaObject::invokeMethodImpl(QObject*, char const*, Qt::ConnectionType, long long, void const* const*, char const* const*, QtPrivate::QMetaTypeInterface const* const*) () at /usr/lib64/libQt6Core.so.6 #5 0x00007fff7b57371c in Utils::showMessage(QMap<QString, QVariant> const&, KTextEditor::MainWindow*) () at /usr/lib64/libkateprivate.so.25.04.0 #6 0x00007fff7b6b5510 in LSPClientPluginViewImpl::addMessage(LSPMessageType, QString const&, QString const&, QString const&) () at /usr/lib64/qt6/plugins/kf6/ktexteditor/lspclientplugin.so #7 0x00007fff7b6b5ba0 in LSPClientPluginViewImpl::onShowMessage(KTextEditor::Message::MessageType, QString const&) () at /usr/lib64/qt6/plugins/kf6/ktexteditor/lspclientplugin.so Built with GCC 15.1, Qt 6.8.3.
But Qt was built with GCC 14. maybe that broke binary compatibility somehow, at least I'm unaware of negative sizes for QStringView.
Does not crash when built with GCC 14 and -O2.
(In reply to Eugene Shalygin from comment #12) > Does not crash when built with GCC 14 and -O2. QMap wraps std::map. Maybe the ABI of std::map changed in libstdc++ version 15. See https://gcc.gnu.org/gcc-15/changes.html#libstdcxx
Rebuilding the whole KDE with GCC 15 makes the crash disappear. Also found this issue in the GCC bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57272
(In reply to Eugene Shalygin from comment #14) > Rebuilding the whole KDE with GCC 15 makes the crash disappear. Also found > this issue in the GCC bugzilla: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57272 Good, not a bug then, at least not a bug in KDevelop.