Jump to content

Force Re-Check problem with a few bytes oversized files


ty1

Recommended Posts

I think there is a problem with Force Re-Check.

If i append a few bytes after the end of a downloaded file,

the Force Re-Check can't find any error.

It's checking data bytes only for the length which is in the .torrent file.

It's don't detect the different file size and the extra bytes.

This problem is present in the 1.8.2 and newer clients also.

Link to comment
Share on other sites

I uploaded an example.

FRC_Bug_ex.zip - 4547 bytes

http://www.mediafire.com/?u8wjj217x8y4gjl

How to test the bug:

- Add the MyExampleTorrent.torrent file in uTorrent (don't allow to start)

- Go to popup menu/advanced/Set Download Location/Choose the MyExampleTorrent (original) folder

- Go to popup menu/Force Re-Check.

It will run for 100 %, and the status of the torrent changing to completed.

- Change the original example.hex (4125 bytes) to the corrupted example.hex (4147 bytes)

and run the Force Re-Check again.

- The Force Re-Check don't detect the extra bytes.

Link to comment
Share on other sites

I tried and in fact, µT doesn't detect the extra bytes after the forced recheck.

I guess it's because the piece size is 64 kB and both of your files have a size ~ 4 kB, i.e. inferior to the piece size.

I'm (almost) sure if you create a 2nd test file with a file size of 70 or 80 kB and a new .torrent with a piece size of 64 kB, the forced check shouldn't fail.

Link to comment
Share on other sites

Doubtful. The problem more likely lies in the fact that the file length specified in the .torrent file is lower than the problem file's size, so µTorrent checks only the number of bytes specified in the .torrent file.

Regardless, I've reproduced the problem, and it looks to me like a valid bug. And a pretty bad one at that -- µTorrent can't tell if a file is good or bad.

Link to comment
Share on other sites

It's easy to check.

Going to edit the file.

CTRL-A,

CTRL-C,

CTRL-END

CTRL-V - (hold down for 20s), file size is about 1M.

Force Re-Check doesn't detect problem.

It's checking the bytes only in the nominal file size and doesn't check the length of the file.

It's - looks like for me - common with the checking method when downloading new files.

I realised it when downloaded a program and it didn't run because of the extra bytes in a config file.

Link to comment
Share on other sites

it's common with the checking method when downloading new files.

µTorrent doesn't create oversized files when it downloads new files, so there's no reason it would ever happen with new files. It only happens if you already have an existing file that is oversized and tell µTorrent to use that file.

As far as fixing force recheck goes, I'd be on the fence about it. Rechecking is just that -- rechecking. It's supposed to be a read-only operation that just tells µTorrent to internally mark which pieces are good and no good; the file itself doesn't change, and its name ("rechecking") would imply as much. Certainly, something needs to be done about this problem, but I think force recheck isn't where it should be done. That is, force recheck should detect that the file is oversized, but I don't think it shouldn't actually truncate the file. That should probably be done elsewhere.

Link to comment
Share on other sites

Ok. I don't know the source code. I modified my last reply, and added "looks like for me" :)

I know only that somehow when my download finished one of the downloaded files was longer

and it did contain some extra bytes.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...