Skip to content

Fix crash after logout

Nikita Karpei requested to merge nkarpei/neochat:fix-crash-after-logout into master

NeoChat can crash after logout

AddressSanitizer:DEADLYSIGNAL
=================================================================
==45465==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000018 (pc 0x7f8d317173c9 bp 0x000000000000 sp 0x7ffe380d02e0 T0)
==45465==The signal is caused by a READ memory access.
==45465==Hint: address points to the zero page.
    #0 0x7f8d317173c9 in Quotient::Connection::accountData(QString const&) const (/usr/lib/libQuotient.so.0.7+0x833c9)
    #1 0x7f8d31717457 in Quotient::Connection::accountDataJson(QString const&) const (/usr/lib/libQuotient.so.0.7+0x83457)
    #2 0x5589832492a3 in NotificationsManager::updateNotificationRules(QString const&) /home/archie/kde/src/neochat/src/notificationsmanager.cpp:271
    #3 0x558983247490 in operator() /home/archie/kde/src/neochat/src/notificationsmanager.cpp:47
    #4 0x55898324bc86 in call /usr/include/qt/QtCore/qobjectdefs_impl.h:146
    #5 0x55898324bb32 in call<QtPrivate::List<>, void> /usr/include/qt/QtCore/qobjectdefs_impl.h:256
    #6 0x55898324b71b in impl /usr/include/qt/QtCore/qobjectdefs_impl.h:443
    #7 0x7f8d2f0be930  (/usr/lib/libQt5Core.so.5+0x2be930)
    #8 0x5589830242e6 in Controller::activeConnectionChanged() /home/archie/kde/build/neochat/src/neochat_autogen/EWIEGA46WW/moc_controller.cpp:698
    #9 0x55898303d7a3 in Controller::setActiveConnection(Quotient::Connection*) /home/archie/kde/src/neochat/src/controller.cpp:615
    #10 0x55898303aebb in Controller::logout(Quotient::Connection*, bool) /home/archie/kde/src/neochat/src/controller.cpp:283
    #11 0x558983022c7e in Controller::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/archie/kde/build/neochat/src/neochat_autogen/EWIEGA46WW/moc_controller.cpp:339
    #12 0x558983023ea2 in Controller::qt_metacall(QMetaObject::Call, int, void**) /home/archie/kde/build/neochat/src/neochat_autogen/EWIEGA46WW/moc_controller.cpp:597
    #13 0x7f8d31a76543  (/usr/lib/libQt5Qml.so.5+0x276543)
    #14 0x7f8d31977670  (/usr/lib/libQt5Qml.so.5+0x177670)
    #15 0x7f8d3197cde1 in QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const (/usr/lib/libQt5Qml.so.5+0x17cde1)
    #16 0x7f8d3198eda2  (/usr/lib/libQt5Qml.so.5+0x18eda2)
    #17 0x7f8d31994803  (/usr/lib/libQt5Qml.so.5+0x194803)
    #18 0x7f8d31936c35 in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*) (/usr/lib/libQt5Qml.so.5+0x136c35)
    #19 0x7f8d31a971ac in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) (/usr/lib/libQt5Qml.so.5+0x2971ac)
    #20 0x7f8d31a537f0 in QQmlBoundSignalExpression::evaluate(void**) (/usr/lib/libQt5Qml.so.5+0x2537f0)
    #21 0x7f8d31a5476b  (/usr/lib/libQt5Qml.so.5+0x25476b)
    #22 0x7f8d31a7647e in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (/usr/lib/libQt5Qml.so.5+0x27647e)
    #23 0x7f8d2f0be5ff  (/usr/lib/libQt5Core.so.5+0x2be5ff)
    #24 0x7f8d2ecf3a59 in QQuickAbstractButtonPrivate::handleRelease(QPointF const&) (/usr/lib/libQt5QuickTemplates2.so.5+0x91a59)
    #25 0x7f8d2ed0ed38 in QQuickControl::mouseReleaseEvent(QMouseEvent*) (/usr/lib/libQt5QuickTemplates2.so.5+0xacd38)
    #26 0x7f8d32040848 in QQuickItem::event(QEvent*) (/usr/lib/libQt5Quick.so.5+0x240848)
    #27 0x7f8d2fd78b5b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x178b5b)
    #28 0x7f8d2f08de07 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x28de07)
    #29 0x7f8d3204edc4 in QQuickWindowPrivate::deliverMouseEvent(QQuickPointerMouseEvent*) (/usr/lib/libQt5Quick.so.5+0x24edc4)
    #30 0x7f8d3204f811 in QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent*) (/usr/lib/libQt5Quick.so.5+0x24f811)
    #31 0x7f8d2f5559f4 in QWindow::event(QEvent*) (/usr/lib/libQt5Gui.so.5+0x1559f4)
    #32 0x7f8d2fd78b5b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x178b5b)
    #33 0x7f8d2f08de07 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x28de07)
    #34 0x7f8d2f53efbb in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (/usr/lib/libQt5Gui.so.5+0x13efbb)
    #35 0x7f8d2f528884 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Gui.so.5+0x128884)
    #36 0x7f8d2d55ea54  (/usr/lib/libQt5WaylandClient.so.5+0xaea54)
    #37 0x7f8d2fac182a in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x5582a)
    #38 0x7f8d2fb18cc8  (/usr/lib/libglib-2.0.so.0+0xaccc8)
    #39 0x7f8d2fac00e1 in g_main_context_iteration (/usr/lib/libglib-2.0.so.0+0x540e1)
    #40 0x7f8d2f0d8b2b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2d8b2b)
    #41 0x7f8d2f0865ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2865ab)
    #42 0x7f8d2f0910d8 in QCoreApplication::exec() (/usr/lib/libQt5Core.so.5+0x2910d8)
    #43 0x558982fd6424 in main /home/archie/kde/src/neochat/src/main.cpp:337
    #44 0x7f8d2e83c28f  (/usr/lib/libc.so.6+0x2328f)
    #45 0x7f8d2e83c349 in __libc_start_main (/usr/lib/libc.so.6+0x23349)
    #46 0x558982fd0fc4 in _start (/home/archie/kde/build/neochat/bin/neochat+0x50fc4)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/lib/libQuotient.so.0.7+0x833c9) in Quotient::Connection::accountData(QString const&) const
==45465==ABORTING

Merge request reports

Loading