Bug 467327 - NeoChat crash while rejecting invitation from notification
Summary: NeoChat crash while rejecting invitation from notification
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2023-03-14 12:19 UTC by Kevin Wolf
Modified: 2024-01-05 14:30 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Wolf 2023-03-14 12:19:45 UTC
Application: neochat (23.03.70)
 (Compiled from sources)
Qt Version: 5.15.8
Frameworks Version: 5.103.0
Operating System: Linux 6.1.15-200.fc37.x86_64 x86_64
Windowing System: X11
Distribution: Fedora Linux 37 (Thirty Seven)
DrKonqi: 5.27.2 [KCrashBackend]

-- Information about the crash:
I ran into this crash when I got a bunch of invitations (after setting up a Matrix bridge) and clicked through each notification accepting or rejecting it. The stack trace suggests that I rejected this one, and I remember that I did reject an invitation shortly before it crashed, so I'm willing to believe it.

While processing the rest of the invitations after restarting NeoChat, I couldn't reproduce the crash or figure out what the exact conditions are for it. Accepting and rejecting other invitations from the notifications worked fine.

NeoChat is compiled from git commit 39388e204ede5d8b8a570c12258207901d12abfb.

It may or may not be useful, but the id for m_lastCurrentRoom looks suspicious if it's not only related to the warning:

(gdb) p *room.d.id.d
$23 = {<QArrayData> = {ref = {atomic = {_q_value = std::atomic<int> = { 8 }}}, size = 42, alloc = 43, capacityReserved = 0, offset = 24, static shared_null = {{ref = {atomic = {
            _q_value = std::atomic<int> = { -1 }}}, size = 0, alloc = 0, capacityReserved = 0, offset = 24, static shared_null = <same as static member of an already seen type>}, {ref = {
          atomic = {_q_value = std::atomic<int> = { 0 }}}, size = 0, alloc = 0, capacityReserved = 0, offset = 0, 
        static shared_null = <same as static member of an already seen type>}}}, <No data fields>}
(gdb) p *m_lastCurrentRoom.d.id.d
warning: RTTI symbol not found for class 'QQmlPropertyPrivate'
Cannot access memory at address 0x100000009
(gdb) p m_lastCurrentRoom.d.id
warning: RTTI symbol not found for class 'QQmlPropertyPrivate'
$24 = {d = 0x100000009}
(gdb) p *m_lastCurrentRoom
warning: RTTI symbol not found for class 'QQmlPropertyPrivate'
$27 = {<Quotient::Room> = {<QObject> = {<No data fields>}, static staticMetaObject = {d = {superdata = {direct = 0x7f3045d553e0 <QObject::staticMetaObject>}, 
        stringdata = 0x7f3048196cc0 <_ZL33qt_meta_stringdata_Quotient__Room.lto_priv.0>, data = 0x7f30481957c0 <_ZL27qt_meta_data_Quotient__Room.lto_priv.0>, 
        static_metacall = 0x7f3048100140 <Quotient::Room::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d = 0x7f2fb038cfe0}, 
  static staticMetaObject = {d = {superdata = {direct = 0x7f30481f3060 <Quotient::Room::staticMetaObject>}, stringdata = 0x6e2300 <qt_meta_stringdata_NeoChatRoom>, 
      data = 0x6e3be0 <qt_meta_data_NeoChatRoom>, static_metacall = 0x462cd0 <NeoChatRoom::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, 
      relatedMetaObjects = 0x883110 <qt_meta_extradata_NeoChatRoom>, extradata = 0x0}}, highlights = {q_hash = {{d = 0xb03a968, e = 0xb03a968}}}, m_hasFileUploading = 144, 
  m_fileUploadingProgress = 0, m_currentPushNotificationState = 21778304, m_pushNotificationStateUpdating = false, m_chatBoxText = {d = 0x7fff0b521560}, m_editText = {d = 0x95286d0}, 
  m_chatBoxReplyId = {d = 0x862b910}, m_chatBoxEditId = {d = 0x27060200260006}, m_chatBoxAttachmentPath = {d = 0x10f00ffff001c}, m_mentions = {d = 0x0}, m_editMentions = {
    d = 0x7f3048a980d0 <QQuickItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}, m_savedText = {d = 0xffff000000000000}, m_polls = {f = 0xffff0000ffffffff, l = 0x0, 
    hash = {{d = 0x0, e = 0x0}}, mx = -1707250198, total = 0}}

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: NeoChat (neochat), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f3045968450 in operator==(QString const&, QString const&) () at /lib64/libQt5Core.so.5
#5  0x00000000006167c8 in RoomManager::leaveRoom(NeoChatRoom*) (this=0x8966a0 <RoomManager::instance()::_instance>, room=0xa086720) at /home/kwolf/source/kde/neochat/src/roommanager.cpp:264
#6  0x0000000000654ebc in operator()() const (__closure=0x64e1a30) at /home/kwolf/source/kde/neochat/src/notificationsmanager.cpp:121
#7  0x0000000000658bf3 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, NotificationsManager::postInviteNotification(NeoChatRoom*, const QString&, const QString&, const QImage&)::<lambda()> >::call(struct {...} &, void **) (f=..., arg=0x7fff0b520a80) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:146
#8  0x0000000000658a69 in QtPrivate::Functor<NotificationsManager::postInviteNotification(NeoChatRoom*, const QString&, const QString&, const QImage&)::<lambda()>, 0>::call<QtPrivate::List<>, void>(struct {...} &, void *, void **) (f=..., arg=0x7fff0b520a80) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:256
#9  0x0000000000658842 in QtPrivate::QFunctorSlotObject<NotificationsManager::postInviteNotification(NeoChatRoom*, const QString&, const QString&, const QImage&)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x64e1a20, r=0x896b40 <NotificationsManager::instance()::_instance>, a=0x7fff0b520a80, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:443
#10 0x00007f3045ad0e96 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
#11 0x00007f3048ebd305 in KNotification::activate(unsigned int) () at /lib64/libKF5Notifications.so.5
#12 0x00007f3048ec009d in KNotificationManager::notificationActivated(int, int) () at /lib64/libKF5Notifications.so.5
#13 0x00007f3045ad0e96 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
#14 0x00007f3048eb8c4c in KNotificationPlugin::actionInvoked(int, int) () at /lib64/libKF5Notifications.so.5
#15 0x00007f3048ed13a5 in NotifyByPopup::onNotificationActionInvoked(unsigned int, QString const&) () at /lib64/libKF5Notifications.so.5
#16 0x00007f3045ad0e96 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
#17 0x00007f3048edb795 in OrgFreedesktopNotificationsInterface::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () at /lib64/libKF5Notifications.so.5
#18 0x00007f3048edc23b in OrgFreedesktopNotificationsInterface::qt_metacall(QMetaObject::Call, int, void**) () at /lib64/libKF5Notifications.so.5
#19 0x00007f3046e230bb in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) () at /lib64/libQt5DBus.so.5
#20 0x00007f3045ac8134 in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#21 0x00007f30467aed62 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#22 0x00007f3045a9d4e8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#23 0x00007f3045aa0854 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib64/libQt5Core.so.5
#24 0x00007f3045aeeb07 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#25 0x00007f3045138c7f in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#26 0x00007f304518f118 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#27 0x00007f3045135f00 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#28 0x00007f3045aee5fa in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#29 0x00007f3045a9bf3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#30 0x00007f3045aa4002 in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#31 0x0000000000434ef5 in main(int, char**) (argc=1, argv=0x7fff0b521a58) at /home/kwolf/source/kde/neochat/src/main.cpp:336
[Inferior 1 (process 6305) detached]

Reported using DrKonqi
Comment 1 James Graham 2024-01-05 14:30:17 UTC
Fixed by https://invent.kde.org/network/neochat/-/merge_requests/1501