Bug 439804 - Crash in LspTooltip
Summary: Crash in LspTooltip
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-13 14:30 UTC by Ahmad Samir
Modified: 2021-07-15 19:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Samir 2021-07-13 14:30:21 UTC
Application: kate (21.11.70)

Qt Version: 5.15.2
Frameworks Version: 5.85.0
Operating System: Linux 5.13.0-1-vanilla x86_64
Windowing System: X11
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.22.80 [KCrashBackend]

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault

[KCrash Handler]
#6  QScreen::availableGeometry (this=0x0) at kernel/qscreen.cpp:430
#7  0x00007f7eb2909002 in Tooltip::place (p=..., this=0x564f4c4496d0) at /usr/src/debug/kate-21.11.70git.20210710T195813~63ceea1e1-ku.65.2.x86_64/addons/lspclient/lsptooltip.cpp:174
#8  LspTooltip::show (manual=208, v=<optimized out>, pos=..., text=...) at /usr/src/debug/kate-21.11.70git.20210710T195813~63ceea1e1-ku.65.2.x86_64/addons/lspclient/lsptooltip.cpp:250
#9  LSPClientHoverImpl::showTextHint(KTextEditor::View*, KTextEditor::Cursor const&, bool)::{lambda(LSPHover const&)#1}::operator()(LSPHover const&) const (info=..., __closure=<optimized out>) at /usr/src/debug/kate-21.11.70git.20210710T195813~63ceea1e1-ku.65.2.x86_64/addons/lspclient/lspclienthover.cpp:84
#10 std::__invoke_impl<void, LSPClientHoverImpl::showTextHint(KTextEditor::View*, KTextEditor::Cursor const&, bool)::{lambda(LSPHover const&)#1}&, LSPHover const&>(std::__invoke_other, LSPClientHoverImpl::showTextHint(KTextEditor::View*, KTextEditor::Cursor const&, bool)::{lambda(LSPHover const&)#1}&, LSPHover const&) (__f=...) at /usr/include/c++/11/bits/invoke.h:61
#11 std::__invoke_r<void, LSPClientHoverImpl::showTextHint(KTextEditor::View*, KTextEditor::Cursor const&, bool)::{lambda(LSPHover const&)#1}&, LSPHover const&>(LSPClientHoverImpl::showTextHint(KTextEditor::View*, KTextEditor::Cursor const&, bool)::{lambda(LSPHover const&)#1}&, LSPHover const&) (__fn=...) at /usr/include/c++/11/bits/invoke.h:111
#12 std::_Function_handler<void (LSPHover const&), LSPClientHoverImpl::showTextHint(KTextEditor::View*, KTextEditor::Cursor const&, bool)::{lambda(LSPHover const&)#1}>::_M_invoke(std::_Any_data const&, LSPHover const&) (__functor=..., __args#0=...) at /usr/include/c++/11/bits/std_function.h:291
#13 0x00007f7eb29350b1 in std::function<void (LSPApplyWorkspaceEditResponse const&)>::operator()(LSPApplyWorkspaceEditResponse const&) const (__args#0=..., this=0x564f47cdd650) at /usr/include/c++/11/bits/std_function.h:560
#14 operator() (m=..., __closure=0x564f47cdd640) at /usr/src/debug/kate-21.11.70git.20210710T195813~63ceea1e1-ku.65.2.x86_64/addons/lspclient/lspclientserver.cpp:1525
#15 std::__invoke_impl<void, make_handler<LSPHover>(ReplyHandler<LSPHover>&, const QObject*, utils::identity<std::function<LSPHover(const QJsonValue&)> >::type)::<lambda(const GenericReplyType&)>&, const QJsonValue&> (__f=...) at /usr/include/c++/11/bits/invoke.h:61
#16 std::__invoke_r<void, make_handler<LSPHover>(ReplyHandler<LSPHover>&, const QObject*, utils::identity<std::function<LSPHover(const QJsonValue&)> >::type)::<lambda(const GenericReplyType&)>&, const QJsonValue&> (__fn=...) at /usr/include/c++/11/bits/invoke.h:111
#17 std::_Function_handler<void(const QJsonValue&), make_handler<LSPHover>(ReplyHandler<LSPHover>&, const QObject*, utils::identity<std::function<LSPHover(const QJsonValue&)> >::type)::<lambda(const GenericReplyType&)> >::_M_invoke(const std::_Any_data &, const QJsonValue &) (__functor=..., __args#0=...) at /usr/include/c++/11/bits/std_function.h:291
#18 0x00007f7eb2931b22 in std::function<void (LSPApplyWorkspaceEditResponse const&)>::operator()(LSPApplyWorkspaceEditResponse const&) const (__args#0=..., this=0x7ffdb02aa930) at /usr/include/c++/11/bits/std_function.h:560
#19 LSPClientServer::LSPClientServerPrivate::read (this=0x564f46f94a90) at /usr/src/debug/kate-21.11.70git.20210710T195813~63ceea1e1-ku.65.2.x86_64/addons/lspclient/lspclientserver.cpp:1121
#20 0x00007f7ebdee3fb3 in QtPrivate::QSlotObjectBase::call (a=0x7ffdb02aaa40, r=0x564f46f94ad8, this=0x564f4671c9f0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#21 doActivate<false> (sender=0x564f46f94ad8, signal_index=3, argv=0x7ffdb02aaa40) at kernel/qobject.cpp:3886
#22 0x00007f7ebdedd47f in QMetaObject::activate (sender=sender@entry=0x564f46f94ad8, m=m@entry=0x7f7ebe17a260, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3946
#23 0x00007f7ebdddc0c0 in QIODevice::readyRead (this=this@entry=0x564f46f94ad8) at .moc/moc_qiodevice.cpp:190
#24 0x00007f7ebde1e647 in QProcessPrivate::tryReadFromChannel (this=0x564f466a2dd0, channel=0x564f466a2ee0) at io/qprocess.cpp:1068
#25 0x00007f7ebde1ea65 in QProcessPrivate::_q_canReadStandardError (this=<optimized out>) at io/qprocess.cpp:1092
#26 QProcess::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7ffdb02aac00) at .moc/moc_qprocess.cpp:210
#27 0x00007f7ebdee3fe8 in doActivate<false> (sender=0x564f478eb2f0, signal_index=3, argv=0x7ffdb02aac00) at kernel/qobject.cpp:3898
#28 0x00007f7ebdedd47f in QMetaObject::activate (sender=sender@entry=0x564f478eb2f0, m=m@entry=0x7f7ebe17daa0 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffdb02aac00) at kernel/qobject.cpp:3946
#29 0x00007f7ebdee738f in QSocketNotifier::activated (this=this@entry=0x564f478eb2f0, _t1=..., _t2=<optimized out>, _t3=...) at .moc/moc_qsocketnotifier.cpp:178
#30 0x00007f7ebdee7b8b in QSocketNotifier::event (this=0x564f478eb2f0, e=0x7ffdb02aad20) at kernel/qsocketnotifier.cpp:302
#31 0x00007f7ebea93a7f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x564f478eb2f0, e=0x7ffdb02aad20) at kernel/qapplication.cpp:3632
#32 0x00007f7ebdead96a in QCoreApplication::notifyInternal2 (receiver=0x564f478eb2f0, event=0x7ffdb02aad20) at kernel/qcoreapplication.cpp:1064
#33 0x00007f7ebdf05a0d in socketNotifierSourceDispatch (source=0x564f45b84560) at kernel/qeventdispatcher_glib.cpp:107
#34 0x00007f7ebbf4c80f in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#35 0x00007f7ebbf4cb98 in ?? () from /lib64/libglib-2.0.so.0
#36 0x00007f7ebbf4cc4f in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#37 0x00007f7ebdf04e54 in QEventDispatcherGlib::processEvents (this=0x564f45ba0510, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#38 0x00007f7ebdeac36b in QEventLoop::exec (this=this@entry=0x7ffdb02aaf30, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#39 0x00007f7ebdeb4650 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#40 0x00007f7ebe2fa1dc in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#41 0x00007f7ebea939f5 in QApplication::exec () at kernel/qapplication.cpp:2824
#42 0x0000564f458c1ec0 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kate-21.11.70git.20210710T195813~63ceea1e1-ku.65.2.x86_64/kate/main.cpp:688
[Inferior 1 (process 6318) detached]
Comment 1 Christoph Cullmann 2021-07-15 19:11:52 UTC
Git commit 615c62a7f09b79cd21ea54f1cfcb90ebc8e266f1 by Christoph Cullmann.
Committed on 15/07/2021 at 19:11.
Pushed by cullmann into branch 'master'.

handle nullptr return of screenAt()

avoid crash if point is out of range

M  +7    -1    addons/lspclient/lsptooltip.cpp

https://invent.kde.org/utilities/kate/commit/615c62a7f09b79cd21ea54f1cfcb90ebc8e266f1