Bug 422245 - KTorrent loses data upon failed integrity check of ignored files
Summary: KTorrent loses data upon failed integrity check of ignored files
Status: NEEDSINFO WORKSFORME
Alias: None
Product: ktorrent
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-29 21:35 UTC by Matthieu Vergne
Modified: 2025-05-02 03:47 UTC (History)
1 user (show)

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


Attachments
Torrent & data to reproduce the bug (57.36 KB, application/zip)
2020-05-29 21:35 UTC, Matthieu Vergne
Details
attachment-2261961-0.html (1.81 KB, text/html)
2025-04-17 16:24 UTC, Matthieu Vergne
Details
attachment-2269864-0.html (983 bytes, text/html)
2025-04-17 16:55 UTC, Matthieu Vergne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Vergne 2020-05-29 21:35:19 UTC
Created attachment 128922 [details]
Torrent & data to reproduce the bug

SUMMARY

When executing integrity check, having a missing file although it is ignored completely ruins the data by failing the integrity check and considering all (non ignored) files at 0% too, thus downloading everything again.

STEPS TO REPRODUCE

1. Download the attachment, it contains a folder of 3 files (a, b, and c) and a torrent of this folder
2. Run the torrent in ktorrent and store the download somewhere else
3. Copy the three files of the folder into the download folder to complete them
4. Run the integrity check in ktorrent -> 100% OK
5. Unselect file a to ignore its download
6. Run the integrity check in ktorrent -> 100% OK
7. Remove file a from the download folder
8. Run the integrity check in ktorrent

OBSERVED RESULT

- The last check fails with a missing file message
- It resets the completion of the whole torrent to 0%, including the files still there (although the data seems to be there)

EXPECTED RESULT

- The last check should be successful because the missing file is not supposed to be downloaded (it has been unselected)
- The torrent completion should not be reset to 0% for the available files

SOFTWARE/OS VERSIONS

Kubuntu 20.04
Linux (x86_64) release 5.4.0-33-generic

ADDITIONAL INFORMATION

The context motivating this use case is a torrent with many or several big files. Once the files are downloaded, the user may want to move them elsewhere manually. If the torrent is not at 100% but some files are already complete (because some priorities were set), the user may then unselect these files in the download list and move them. The user would expect the unselected files to not be checked or downloaded again.

The issue is worsen with automatic integrity check after download: the check fails, thus resetting everything to 0%, thus restarting the download from scratch immediately. Once it completes, it automatically runs the integrity check, fails again (the missing file was still unselected, so it has not been downloaded), and the download restarts from 0% again in an infinite loop.
Comment 1 ulterno 2025-04-17 15:53:56 UTC
I tried reproducing the bug with master using your example.

After step 8, I got 0% completion as expected.
However, it did not lead to deletion of other files.

Furthermore, after restarting the torrent, it gave an option to either recreate or not download the torrent.

VERSIONS

KTorrent: 25.07.70 (master 72e27ef24941fccfc23c8abc2bb12a57d0f9d81e)
KDE Frameworks: 6.12.0
Qt: Using 6.9.0 and built against 6.9.0
EndeavourOS (Wayland)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.14.2-arch1-1
Comment 2 Matthieu Vergne 2025-04-17 16:24:23 UTC
Created attachment 180357 [details]
attachment-2261961-0.html

The issue was opened 5 years ago. With the struggles and limits of
ktorrent, I just switched to qBittorrent. But thanks for your effort.

Le jeu. 17 avr. 2025 à 17:53, <bugzilla_noreply@kde.org> a écrit :

> https://bugs.kde.org/show_bug.cgi?id=422245
>
> ulterno@gmail.com changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>          Resolution|---                         |WORKSFORME
>              Status|REPORTED                    |NEEDSINFO
>
> --- Comment #1 from ulterno@gmail.com ---
> I tried reproducing the bug with master using your example.
>
> After step 8, I got 0% completion as expected.
> However, it did not lead to deletion of other files.
>
> Furthermore, after restarting the torrent, it gave an option to either
> recreate
> or not download the torrent.
>
> VERSIONS
>
> KTorrent: 25.07.70 (master 72e27ef24941fccfc23c8abc2bb12a57d0f9d81e)
> KDE Frameworks: 6.12.0
> Qt: Using 6.9.0 and built against 6.9.0
> EndeavourOS (Wayland)
> Build ABI: x86_64-little_endian-lp64
> Kernel: linux 6.14.2-arch1-1
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 ulterno 2025-04-17 16:53:07 UTC
I came from Tixati.

qBitTorrent felt like a great downgrade.

So I though I might as well go all the way and now maybe add some desirable stuff to it.
Maybe check back in a year or so and you might get some nice stuff in here.
Comment 4 Matthieu Vergne 2025-04-17 16:55:17 UTC
Created attachment 180358 [details]
attachment-2269864-0.html

Noted. {^_^}b

Le jeu. 17 avr. 2025 à 18:53, <bugzilla_noreply@kde.org> a écrit :

> https://bugs.kde.org/show_bug.cgi?id=422245
>
> --- Comment #3 from ulterno@gmail.com ---
> I came from Tixati.
>
> qBitTorrent felt like a great downgrade.
>
> So I though I might as well go all the way and now maybe add some desirable
> stuff to it.
> Maybe check back in a year or so and you might get some nice stuff in here.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 5 Bug Janitor Service 2025-05-02 03:47:25 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!