(05-14-2017, 11:14 AM)''detelosk' Wrote: (06-21-2017, 02:58 PM)'FeRDNYC' Wrote: You may want to also look at the other options regarding file-creation in the Files pane, most especially the ones like "Enable incremental file creation" and "Append data to files as downloaded and reorder pieces as the download progresses". Those should be disabled unless you absolutely need them, as they complicate Vuze's management of downloaded files.
I believe that I recently resetted Vuze's preferences yet the "Append data to files as downloaded and reorder pieces as the download progresses" is set. I will have to try and understand why.
Hmm. It sounds to me like that's
probably the reason for the first issue you raised in your original post...
(07-23-2017, 11:09 AM)'detelosk' Wrote: For not well understood reasons, some of my completed torrents now contain valid files to which (invalid) data has been appended. At some point Vuze has singled out some of the cases, showing an error about the file size being too large but doing little else; in the rest of the cases, forcing a re-check on torrents with corrupt files has not caused the problem to be detected by Vuze.
But if they were
completed torrents, then it still isn't a very satisfactory explanation, in my mind. Especially if Vuze wasn't able to
detect the corrupted files. It should've been able to do that.
My only guess is that there may be some sort of bug in the file-checking logic that doesn't notice when the reordering part of "Append data... and reorder pieces" leaves pieces hanging off the end of files.
As you probably know, the base unit of measurement in which peers organize and exchange torrent data is the "piece". While the size of each piece varies from torrent to torrent, for a given torrent each piece (except the last) is the same size. When those pieces are mapped onto files of arbitrary size the boundaries don't match up, except occasionally by pure coincidence. So a single piece will start with the end of one file, and end with the beginning of another.
That's why, when you download only a portion of the files in a large torrent, Vuze will create partial files for some of the ones you
didn't select: Those files share a piece with one of the files that's marked for download, so Vuze has to receive the entire piece in order to get the part containing the file data you need. It has to save the rest of the piece for re-checking purposes, and to upload the data to peers that request it. Sometimes, if the torrent contains very small files, Vuze will download an
entire file even though you set it "Do not download" — that file is smaller than the piece size, and it was contained in a piece needed for one of the enabled files.
This is also why, when you add existing files to an incomplete torrent, Vuze can actually damage those files when it performs a re-check — if there are adjacent files missing, then Vuze has to consider any of the pieces shared between the existing files and the missing files to be invalid. To download those pieces it needs to clear space for them in the files on disk, and the partial-piece section of the existing file is wiped out in the process.
The point of this is, I suspect what you're seeing is sort of the
opposite problem. The data appended to the end of your valid files is most likely the
rest of the data for the last piece in the file, the one that's shared with the next adjacent file. That could explain why Vuze doesn't detect the extra data when re-checking — technically it's
not extra data, it's the remainder of the data that's
supposed to be in that piece of the torrent. The fact that it's accidentally saved in the wrong place / in two places... is something it probably
should notice, and be able to either flag as a problem or even just automatically correct on its own. But it sounds like it's not currently doing that, at least in some situations.
Assuming my theory is correct, of course, because that's all it is. Parg would be the one who'd know for sure whether I'm even on the right track, unfortunately nobody seems to know when or if we'll be able to get his input on this. But it sounds
possible to me that something, perhaps the "Append data... and reorder pieces" option, is causing a strange side-effect. That could particularly be the case (I'm guessing) if it's turned on or off while active or incomplete torrents are still in the queue, and that ends up confusing Vuze's idea of where it's
supposed to place the piece data for "border" pieces, and/or where it should expect to find that data when checking pieces.
I know for a fact something like that can happen with the "Add suffix to incomplete files" option, where Vuze can occasionally forget to rename files when they're completed, or can get confused and double-suffix incomplete files. (They're rare and weird corner cases, which I've mostly seen when adding external files to an incomplete torrent. Because when you have a complete file being added to an incomplete torrent, should you name it TheFile.mp4.part and let Vuze rename it? Or should it be TheFile.mp4 because it's already complete? I can never remember, and that's how I end up confusing Vuze. But mis-named files are easily corrected and don't affect the integrity of the file data itself, unlike the issue you're seeing.)
End of the day, if disabling "Append data... and reorder pieces" makes the problem go away and you don't see any more files with extraneous data tacked on the end, then problem solved, and now we have another reason to avoid that option.