Summary: | NeoChat Crashes at launch | ||
---|---|---|---|
Product: | [Applications] NeoChat | Reporter: | Aranjedeath <orangewinds> |
Component: | General | Assignee: | Tobias Fella <fella> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | carl, clay, dikey0ficial |
Priority: | NOR | Keywords: | drkonqi |
Version First Reported In: | 23.01.0 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/network/neochat/commit/f6ba4f2ecd470487f1133a570459086059750775 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | New crash information added by DrKonqi |
Description
Aranjedeath
2023-02-24 02:21:47 UTC
This will go away with https://invent.kde.org/network/neochat/-/merge_requests/808 Git commit da1c664f941b96d650e64240253ba09f46ed291a by James Graham. Committed on 13/03/2023 at 18:18. Pushed by nvrwhere into branch 'release/23.04'. Cherrypick Improve Text Handling to 23.04 Improve the handling of text both when sending and receiving. The main feature is to fix the linked bug (and a host of others that are unreported but similar) which is caused by the fact that we don't properly clean html. This mr does that as per the matrix spec https://spec.matrix.org/v1.5/client-server-api/#mroommessage-msgtypes. So any disallowed tags or attributes are removed and it does the special handling for certain attributes. Additionally the functions are also designed to cover any other text formatting required, particularly fro received strings. The receive side is covered by 2 functions `handleRecieveRichText` and `handleRecievePlainText`. The rich/plain in the function name refers to the output type not the input type (both can take plain and rich input), so `handleRecieveRichText` is called to get a string suitable to go in a rich text control and `handleRecievePlainText` for a plain control. The functions also handle the following some of which was previously handled by `eventToString` in `NeoChatRoom`: - Strip and reply from the string - Format any user mentions - Linkify links in plain strings - Handle mxc urls in rich text (uses the new `room->makeMediaUrl` functionality from libQuotient) - `handleRecievePlainText` also deals with markup making `NeoChatRoom->subtitle` redundant There is also an extensive test suite which defines the behaviour and the best way to review this is probably to look at the tests and decide whether you agree with the expected output given the inputs and/or if there is any missing behaviour. The final aim especially with the test suite is to give us a framework to make further updates in the future easier and hopefully prevent a new feature breaking old behaviour with the tests. Related: bug 463932, bug 466930 (cherry picked from commit f6ba4f2ecd470487f1133a570459086059750775) M +6 -0 autotests/CMakeLists.txt M +1 -1 autotests/neochatroomtest.cpp A +482 -0 autotests/texthandlertest.cpp [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)] M +1 -1 src/CMakeLists.txt M +5 -17 src/actionshandler.cpp M +0 -2 src/actionshandler.h M +0 -1 src/models/messageeventmodel.cpp M +1 -1 src/models/roomlistmodel.cpp M +28 -76 src/neochatroom.cpp M +2 -8 src/neochatroom.h M +4 -2 src/notificationsmanager.cpp M +2 -19 src/qml/Component/Timeline/RichLabel.qml A +378 -0 src/texthandler.cpp [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)] A +131 -0 src/texthandler.h [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)] D +0 -4 src/utils.cpp D +0 -16 src/utils.h https://invent.kde.org/network/neochat/commit/da1c664f941b96d650e64240253ba09f46ed291a Git commit f6ba4f2ecd470487f1133a570459086059750775 by James Graham. Committed on 13/03/2023 at 17:28. Pushed by nvrwhere into branch 'master'. Improve Text Handling Improve the handling of text both when sending and receiving. The main feature is to fix the linked bug (and a host of others that are unreported but similar) which is caused by the fact that we don't properly clean html. This mr does that as per the matrix spec https://spec.matrix.org/v1.5/client-server-api/#mroommessage-msgtypes. So any disallowed tags or attributes are removed and it does the special handling for certain attributes. Additionally the functions are also designed to cover any other text formatting required, particularly fro received strings. The receive side is covered by 2 functions `handleRecieveRichText` and `handleRecievePlainText`. The rich/plain in the function name refers to the output type not the input type (both can take plain and rich input), so `handleRecieveRichText` is called to get a string suitable to go in a rich text control and `handleRecievePlainText` for a plain control. The functions also handle the following some of which was previously handled by `eventToString` in `NeoChatRoom`: - Strip and reply from the string - Format any user mentions - Linkify links in plain strings - Handle mxc urls in rich text (uses the new `room->makeMediaUrl` functionality from libQuotient) - `handleRecievePlainText` also deals with markup making `NeoChatRoom->subtitle` redundant There is also an extensive test suite which defines the behaviour and the best way to review this is probably to look at the tests and decide whether you agree with the expected output given the inputs and/or if there is any missing behaviour. The final aim especially with the test suite is to give us a framework to make further updates in the future easier and hopefully prevent a new feature breaking old behaviour with the tests. Related: bug 463932, bug 466930 M +6 -0 autotests/CMakeLists.txt M +1 -1 autotests/neochatroomtest.cpp A +482 -0 autotests/texthandlertest.cpp [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)] M +1 -1 src/CMakeLists.txt M +5 -17 src/actionshandler.cpp M +0 -2 src/actionshandler.h M +0 -1 src/models/messageeventmodel.cpp M +1 -1 src/models/roomlistmodel.cpp M +28 -76 src/neochatroom.cpp M +2 -8 src/neochatroom.h M +4 -2 src/notificationsmanager.cpp M +2 -19 src/qml/Component/Timeline/RichLabel.qml A +378 -0 src/texthandler.cpp [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)] A +131 -0 src/texthandler.h [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)] D +0 -4 src/utils.cpp D +0 -16 src/utils.h https://invent.kde.org/network/neochat/commit/f6ba4f2ecd470487f1133a570459086059750775 Created attachment 162130 [details]
New crash information added by DrKonqi
neochat (23.08.1) using Qt 5.15.10
Just installed NeoChat from main repo (openSUSE Tumbleweed), crashes just after launching.
Is there enough data?
-- Backtrace (Reduced):
#4 Quotient::RoomStateView::RoomStateView(Quotient::RoomStateView const&) (this=this@entry=0x7fff37ef1468) at /usr/src/debug/libQuotient-0.8.1.2/Quotient/roomstateview.h:24
#5 Quotient::Room::currentState() const (this=this@entry=0x0) at /usr/src/debug/libQuotient-0.8.1.2/Quotient/room.cpp:1574
#6 0x0000555b5af28939 in ImagePacksModel::reloadImages() (this=this@entry=0x555b5d4300f0) at /usr/src/debug/neochat-23.08.1/src/models/imagepacksmodel.cpp:105
#7 0x0000555b5af29b5d in ImagePacksModel::setRoom(NeoChatRoom*) (room=<optimized out>, this=0x555b5d4300f0) at /usr/src/debug/neochat-23.08.1/src/models/imagepacksmodel.cpp:73
#8 ImagePacksModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x555b5d4300f0, _c=_c@entry=QMetaObject::WriteProperty, _id=_id@entry=0, _a=_a@entry=0x7fff37ef1690) at /usr/src/debug/neochat-23.08.1/build/src/neochat_autogen/include/moc_imagepacksmodel.cpp:167
|