Registered Member
|
Many times when torrent is 99.5%. Status goes to "Stalled" and download stop. I have to restart Ktorrent to continue downloading.
|
Moderator
|
|
Registered Member
|
Hi,
I also have this issue, using version 1.2 under Suse 10.0 Torrents stall when they are almost done. Can't get them to start unless you exit the program and restart it. Trying to Stop&Start the torrents does not help. Anyway, thanks for your efforts. The program is shaping up nicely. One thing I really like is that Ktorrent STARTS downloading the torrents FAST. Not sure how you do that, but your program kicks-into-gear faster than any other I have tried. Usually torrents start slow before they get faster, but Ktorrent that start FAST. |
Registered Member
|
I think, I found where is the problem.
If Hash verification error is detected on some chunk this chunk is not downloaded again. In function Downloader::pieceRecieved, whent the chunk is received it is deleted from current_chunks list, but if verification check failed it is not saved. So we have a chunk that is not in the current_chunks list, but its status is not NOT_DOWNLOADED. And in the function Downloader::downloadFrom, the condition if (cman.prepareChunk(c)) failed, because the status of the chunk is not NOT_DOWNLOADED. |
Moderator
|
That probably is it, I have fixed it and we will see if that's it.
Btw, if you upgrade, we have just added encryption and for this you need the GNU MP library. Look for gmp in your package manager. It is probably installed by default, but the development packages are probably not installed. |
Registered Member
|
Just one issue - In case of hash verification error the value of num_non_idle is not decreased. In this case if lot of hash errors are detected ktorrent stalled because of limit_exceeded.
I think in Downloader::finished when an error is detected, the memory used by the chunk should be free and num_non_idle should be decreased. I think this caused [bug svn 535539] 1 utorrent 1.5.0.0 seeder get stalled http://ktorrent.org/forum/viewtopic.php?t=439 |
Moderator
|
Indeed I forgot that. I have made some more changes and everything should be OK now. |
Registered Member
|
I believe, I found another similar problem.
In function Downloader::onExcluded, excluded chunuks are removed from current_chunks list, but they status remain the same (probably sometimes different than NOT_DOWNLOADED) So when I include them again, their status can be different from NOT_DOWNLOADED and ChunkManager::prepareChunk will reject them and as a result torrent will stalled. |
Moderator
|
Indeed, I need to reset those chunks to. Should work now. Lets hope this is the last of the chunk in the wrong state errors. A big thanks for discovering them Nikolay !. |
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]