| Summary: | Sometimes notifications are the wrong type | ||
|---|---|---|---|
| Product: | [Applications] Tokodon | Reporter: | Joshua Goins <josh> |
| Component: | general | Assignee: | Unassigned bugs <unassigned-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | carl, josh |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/network/tokodon/-/commit/4b115bcf2e366fa494a060e0e929eec1a5af10e5 | Version Fixed/Implemented In: | 24.12.1 |
| Sentry Crash Report: | |||
Git commit 4b115bcf2e366fa494a060e0e929eec1a5af10e5 by Joshua Goins. Committed on 26/12/2024 at 20:38. Pushed by redstrate into branch 'master'. Fix crash when receiving unknown notifications There's a Q_UNREACHABLE() in the default case, but this turns out to be pretty bad. The server can send unknown notifications behind our back or we don't send it post it as a notification yet. This fixes a regular crash I've seen when receiving push notifications. I also added a warning I can grep for in the logs whenever a notification type is unknown. M +4 -2 src/account/notificationhandler.cpp M +7 -1 src/timeline/notification.cpp M +2 -1 src/timeline/notification.h M +5 -0 src/tokodon.notifyrc https://invent.kde.org/network/tokodon/-/commit/4b115bcf2e366fa494a060e0e929eec1a5af10e5 |
See this backtrace: [KCrash Handler] #4 0x00007fb49fc7f0f4 in __pthread_kill_implementation () at /lib64/libc.so.6 #5 0x00007fb49fc25fde in raise () at /lib64/libc.so.6 #6 0x00007fb49fc0d942 in abort () at /lib64/libc.so.6 #7 0x00007fb4a021b85b in ??? () at /lib64/libQt6Core.so.6 #8 0x00007fb4a026ce78 in ??? () at /lib64/libQt6Core.so.6 #9 0x00007fb4a021ce0d in QMessageLogger::fatal(char const*, ...) const () at /lib64/libQt6Core.so.6 #10 0x00007fb4a021b90c in qt_assert_x(char const*, char const*, char const*, int) () at /lib64/libQt6Core.so.6 #11 0x000055e51ca6e116 in NotificationHandler::handle (this=0x55e53eec85f0, notification=std::shared_ptr<Notification> (use count 5, weak count 0) = {...}, account=0x55e53f077e30) at /home/josh/kde/src/tokodon/src/account/notificationhandler.cpp:149 #12 0x000055e51ca41d42 in operator() (__closure=0x55e53eece7e0, n=std::shared_ptr<Notification> (empty) = {...}) at /home/josh/kde/src/tokodon/src/account/accountmanager.cpp:137 Instead of Q_UNREACHBLE, it should be a warning of an unhandled type and then a generic "A new notification was recieved".