Bug 478024

Summary: Neochat crashes when selecting the emoji tab in the settings with no accounts configured
Product: [Applications] NeoChat Reporter: Roberto Orsini <roberto.orsini>
Component: GeneralAssignee: Tobias Fella <fella>
Status: RESOLVED FIXED    
Severity: crash CC: carl
Priority: NOR Keywords: drkonqi
Version First Reported In: 23.08.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Roberto Orsini 2023-12-04 04:37:43 UTC
Application: neochat (23.08.1)

Qt Version: 5.15.10
Frameworks Version: 5.110.0
Operating System: Linux 6.5.0-13-generic x86_64
Windowing System: Wayland
Distribution: Ubuntu 23.10
DrKonqi: 5.27.8 [KCrashBackend]

-- Information about the crash:
Just as the title says: Neochat crashes every time when I select the emoji tab in the settings with no accounts configured.

The crash can be reproduced every time.

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

[KCrash Handler]
#4  0x00007f3726f07d48 in Quotient::Connection::hasAccountData(QString const&) const () from /lib/x86_64-linux-gnu/libQuotient.so.0.7
#5  0x0000563d5b9953f9 in ?? ()
#6  0x0000563d5b99792b in ?? ()
#7  0x00007f37272f42ce in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#8  0x00007f37272f5dc6 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#9  0x00007f37272f3734 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#10 0x00007f3727300f3a in QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#11 0x00007f372728feac in QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#12 0x00007f3727292409 in QQmlComponentPrivate::completeCreate() () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#13 0x00007f37272930f5 in QQmlComponent::createWithInitialProperties(QMap<QString, QVariant> const&, QQmlContext*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#14 0x00007f36f7af60c3 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/libKirigamiPlugin.so
#15 0x00007f36f7af6955 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/libKirigamiPlugin.so
#16 0x00007f36f7afa0f3 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/libKirigamiPlugin.so
#17 0x00007f36f7afa87b in ?? () from /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/libKirigamiPlugin.so
#18 0x00007f37272d0ac3 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#19 0x00007f37271a99b9 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#20 0x00007f37271ab8e0 in QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#21 0x00007f37271c898d in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#22 0x00007f37271cc107 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#23 0x00007f372715d566 in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#24 0x00007f37272eb521 in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#25 0x00007f372729c1ef in QQmlBoundSignalExpression::evaluate(void**) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#26 0x00007f372729d978 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#27 0x00007f37272d059f in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#28 0x00007f3725305a6c in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007f3724af2186 in QQuickAction::triggered(QObject*) () from /lib/x86_64-linux-gnu/libQt5QuickTemplates2.so.5
#30 0x00007f3724af31e2 in ?? () from /lib/x86_64-linux-gnu/libQt5QuickTemplates2.so.5
#31 0x00007f3724aeef40 in QQuickAbstractButtonPrivate::trigger() () from /lib/x86_64-linux-gnu/libQt5QuickTemplates2.so.5
#32 0x00007f3724af0db1 in QQuickAbstractButtonPrivate::handleRelease(QPointF const&) () from /lib/x86_64-linux-gnu/libQt5QuickTemplates2.so.5
#33 0x00007f3724b106f9 in QQuickControl::mouseReleaseEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5QuickTemplates2.so.5
#34 0x00007f3727864ec8 in QQuickItem::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#35 0x00007f3725f6bc82 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007f37252cc7a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x00007f3727882e3e in QQuickWindowPrivate::deliverMouseEvent(QQuickPointerMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#38 0x00007f3727884541 in QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent*) () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#39 0x00007f37278856dd in QQuickWindowPrivate::handleMouseEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#40 0x00007f372574fe05 in QWindow::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#41 0x00007f3725f6bc82 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#42 0x00007f37252cc7a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007f3725743bdb in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#44 0x00007f372571762c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#45 0x00007f3723164b74 in ?? () from /lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#46 0x00007f3724113b2c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007f372416f46f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007f3724111d20 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007f3725327daa in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#50 0x00007f37252cb15b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#51 0x00007f37252d3904 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#52 0x0000563d5b8780b9 in ?? ()
#53 0x00007f37248280d0 in __libc_start_call_main (main=main@entry=0x563d5b8756e0, argc=argc@entry=1, argv=argv@entry=0x7ffda7a826f8) at ../sysdeps/nptl/libc_start_call_main.h:58
#54 0x00007f3724828189 in __libc_start_main_impl (main=0x563d5b8756e0, argc=1, argv=0x7ffda7a826f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffda7a826e8) at ../csu/libc-start.c:360
#55 0x0000563d5b901fe5 in ?? ()
[Inferior 1 (process 44208) detached]

Reported using DrKonqi
Comment 1 Bug Janitor Service 2023-12-10 21:26:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/1481
Comment 2 James Graham 2023-12-13 18:35:02 UTC
Git commit ddc0bfe78697461e9a0ff79ea40d060d3a5c9cff by James Graham.
Committed on 13/12/2023 at 19:34.
Pushed by nvrwhere into branch 'master'.

Make sure that a nullptr connection is not accessed in AccountEmoticonModel

I don't think it possible to open settings without an account connected anymore, however just to make sure I've made sure that a nullptr connection is handled in `AccountEmoticonsModel`.

M  +26   -0    src/models/accountemoticonmodel.cpp

https://invent.kde.org/network/neochat/-/commit/ddc0bfe78697461e9a0ff79ea40d060d3a5c9cff