Jump to content

uTorrent not opening torrent it created itself


TimPlethor

Recommended Posts

I ran into a funny problem. Situtation, I wanted to test a comment I read about auto-detect allowing peice sizes above 4MB when creating .torrents with uTorrent.

So I used one of my larger directories (1.2TB) and created a torrent with uTorrent + auto-detect. uTorrent was all happy and spit out "Torrent Created Successfully", however, when trying to open said torrent with uTorrent it said "Invalid Torrent File".

I was then forced to use Vuze/MooPolice/Azureze/etc, basically every torrent client worked/hashed the directory at 100% except uTorrent *aka the creator of the torrent LOL*.

When in Vuze I looked at the piece size which indeed uTorrent used 4MB @ 314k pieces when creating the torrent. Conclusion, auto-detect doesn't go above the max 4MB, and, uTorrent torrent creator makes terrible choices for larger torrent sizes.

1. Fix the utorrent torrent creator by crippling it [sic], or, fix uTorrent to work with torrents created with its own creator. Regardless of which side, it shouldn't be wishywashy; in my opinion both needs to be fixed to allow higher piece sizes / # of peices.

2. If you still insist on crippling your software, I suggest two more things.

a) put more detailed error messages than "Invalid Torrent File", as according to the BT-spec it is not invalid, and indeed works with all other torrent clients I tested. For example "Invalid Torrent File: 16MB+ peice size, use different client".

B) Update uTorrents mantra from "µTorrent - a (very) tiny BitTorrent client" to "µTorrent - a (very) tiny BitTorrent client for (very) tiny .torrent files".

As a little help I digged up uTorrents source code to help the devs fix their problems: uTorrent's TorrentCheck.cpp

void CheckTorrent() {
uint piece_size;
uint num_of_pieces;
ulong total_size;
bool invalid_torrent, bens_standards;
[...]
if(piece_size * num_of_pieces < total_size)
invalid_torrent = true; /* CORRUPT TORRENT FILE */

/* Okay, technical stuff out of the way, torrent is valid according to
* the "BT Spec", now to check "Bens BT Easter Egg Spec" */
if(total_size > get_folder_size("C:\BensPics\"))
bens_standards = true; /* Bens has a lot of pics, no one needs to be using torrent files
larger than Bens Directory, he has a lot of pics. */

if(piece_size > 16MB)
bens_standards = true; /* Ben uses 16MB peice size for his torrent, so that
is what we will force you to use too */

if(random_other_variable > 3)
bens_standards = true; /* Oww no you don't, my BT-Spec says nothing about this, 3 is
good enough for you */

/* Checks Done, Finish Up */
if(invalid_torrent || bens_standards) {
#ifdef LONGHELP
MessageBox.Show("Ben says no");
#else
MessageBox.Show("Invalid Torrent File");
#endif
exit(0); /* Kill app, the goat was not properly sacrificed, where is Ben? */
}

/* Yay Ben standards adhered, you may continue */
[...]
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...