Bug 415580 - KTorrent does not save magnets unless properly shut down
Summary: KTorrent does not save magnets unless properly shut down
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: 5.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
: 425898 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-26 12:42 UTC by Linus Kardell
Modified: 2024-03-08 22:10 UTC (History)
3 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 Linus Kardell 2019-12-26 12:42:09 UTC
SUMMARY
The magnet link list seems to only save when KTorrent is properly shut down. If KTorrent is killed, or crashes, the magnet link will have not been saved, no matter how long time has passed.

STEPS TO REPRODUCE
1. Add a magnet link, or start a download from a magnet link thus removing it
2. Kill KTorrent
3. Restart KTorrent

OBSERVED RESULT
Magnet link list reset to state before step 1

EXPECTED RESULT
Magnet link list should be same as after 1

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: OpenSUSE Tumbleweed
(available in About System)
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.1
Comment 1 Jack Hill 2023-11-11 18:11:31 UTC
*** Bug 425898 has been marked as a duplicate of this bug. ***
Comment 2 Gabriel Barros 2023-12-26 12:38:57 UTC
Confirmed on 23.08.4

Also ask to increase importance/severity as a regular KDE shutdown lately will send SIGHUP in the same split second as SIGTERM, resulting on everything being improperly killed. (lots of bugs from the mix of systemd, QTDBus, wayland being worked on).
Comment 3 Bug Janitor Service 2024-02-13 11:38:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/ktorrent/-/merge_requests/112
Comment 4 Andrius Štikonas 2024-03-08 22:10:54 UTC
Git commit 4424f34fb005c43e6aee109e9d474fbc99d293d2 by Andrius Štikonas, on behalf of Jack Hill.
Committed on 08/03/2024 at 22:09.
Pushed by stikonas into branch 'master'.

Save magnet queue whenever the queue is updated

I.e. when magnets are added to the queue. Previously the queue was only
saved when KTorrent was closed, so all magnets added in a session were lost
if KTorrent crashed.

Test-plan: import a stale magnet link then send a SIGHUP to KTorrent and
restart the app. Previously the magnet link did not appear on the
magnets list after the restart, now it does.

M  +3    -0    ktorrent/core.cpp

https://invent.kde.org/network/ktorrent/-/commit/4424f34fb005c43e6aee109e9d474fbc99d293d2