Jump to content

Certain characters in filenames cause random pieces to fail hashcheck


shizzles

Recommended Posts

I have encountered and verified (as far as I could) the following using both the older 1.x uTorrent as well as 2.x stable and unstable.

I (accidently) created a torrent with several files containing a right single quote like this one: '

They where very hard to spot as they look like simple apostrophes that work fine in torrents to my experience.

The result was very interesting:

- After uploading my torrent to a private torrent site, and then downloading it again to seed, the torrent would have a (mostly single, sometimes two) completely random piece fail the hash check.

By random, I mean: every single time I added the torrent file to uTorrent a different piece would fail the hash check. The torrent file was unchanged, not even re-downloaded, in between. So, adding a 100% identical torrent file on 100% identical data produced different results.

- The problem seems independent of which program is used to create the torrent as far as I tested: it doesn't matter if the torrent is created using uTorrent or MakeTorrent.

- There was no data in the torrent that was changing that could have caused.

- I have excluded the possibility of data corruption by moving both the torrent as well as the data the torrent distributes to a different hard disk but the problem persisted.

- After removing the right single quotes from the name: everything worked fine.

What I did to reproduce:

- My testing torrent was about 6 GB in size, 90 files spread over 4 folders.

- There where 3 or 4 files with a right single quote in the filename. In phrases like: I'm, I'll, etc.

- I haven't tested with smaller torrents.

Link to comment
Share on other sites

  • 3 weeks later...

Of course;

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

Excuse the contents but this was what made me encounter this bug. The torrent contents are 7 GB in size in 95 files, 4 folders.

I also tried making a smaller torrent with one single "bad" filename, but that one came out okay so perhaps smaller torrents are less effected.

This torrent has a single filename with a right single quote. (The one that starts with "I'll make you") All others have simple apostrophes. This is just to illustrate how difficult these are to find by the eye.

A torrent with the same content but without the right single quote in the filename checks out fine.

Link to comment
Share on other sites

  • 4 months later...

Do you need more info to fix this bug? It's quite annoying when a torrent "corrupts" without knowing the exact cause. Very frustrating.

Today I experienced this on uT 2.0.4 build 21586, when creating a new torrent. I couldn't discover anything wrong with the file names this time. So I had to guess to which files where causing the problem.

I ended up removing a bunch of files that had underscores in them (between words), and then the problem was gone. I can't find anything unusual about the file names except for the underscores though.

Link to comment
Share on other sites

Okay thank you :)

I currently have no clue as to what routine/piece of code could cause this behaviour but if someone can explain to me the relation between characters in the file name and the hash check I'd be more than willing to see what comes to mind.

What is the current specification on filenames in a torrent? Is it as free as Unicode or very restricted?

Link to comment
Share on other sites

  • 3 weeks later...

I'm running an English version of Windows 7 64-bit, all target partitions and drives had NTFS. They where formatted with the default cluster size.

Could it be a problem with uTorrent reading UTF-characters in filenames?

The code for the right single quote is "\u2019" according to this page on unicode characters.

Looking at the wiki on NTFS the filesystem should accept the characters without problems:

In Posix namespace, any UTF-16 code unit (case sensitive) except U+0000 (NUL) and / (slash). In Win32 namespace, any UTF-16 code unit (case insensitive) except U+0000 (NUL) / (slash) \ (backslash) : (colon) * (asterisk) ? (Question mark) " (quote) < (less than) > (greater than) and | (pipe)

Perhaps I'll have some time to construct a smaller, working torrent on a open torrent site that demonstrates the issue. Any torrent sites that you recommend for this test?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...