Discussion:
[libtorrent] Can't seed very huge torrent with error "bencoded item count limit exceeded"
Jeong Woo Seo
2015-10-22 08:10:15 UTC
Permalink
------------------------------------------------------------------------------
Jeong Woo Seo
2015-10-23 00:04:11 UTC
Permalink
I don't know why contens of mail were empty. anyway i am re-sending a mail. I am sorry for that.

Hi all.

I'm trying to seed a game which is called 'World of warship'. Its size is about 16GB and it has 166,027 files.
I made a torrent file of it with make_torrent. Size of the torrent file is about 16.5MB.
When i tried to open the torrent file with client_test, it showed error bencoded item count limit exceeded".
What should i do to fix it?

link of the torrent file: https://drive.google.com/file/d/0B9RbxyXNort1dnM5b01NT0tveEE/view?usp=sharing


Thank you.


Seo

------------------------------------------------------------------------------
Arvid Norberg
2015-10-23 04:01:18 UTC
Permalink
You hit the default limit on the size of bencoded structures when parsing.
See: http://libtorrent.org/reference-Bencoding.html#lazy_bdecode()

You can raise that limit to something more appropriate for your application.

In some cases this default limit is implied by the API, for instance, when
constructing a torrent_info object from a filename, there's no way to
override the default. What you can do instead is to parse the torrent
(using lazy_bdecode()) and then construct the torrent_info from the decoded
structure.
Post by Jeong Woo Seo
I don't know why contens of mail were empty. anyway i am re-sending a
mail. I am sorry for that.
Hi all.
I'm trying to seed a game which is called 'World of warship'. Its size is
about 16GB and it has 166,027 files.
I made a torrent file of it with make_torrent. Size of the torrent file is about 16.5MB.
When i tried to open the torrent file with client_test, it showed error
bencoded item count limit exceeded".
What should i do to fix it?
https://drive.google.com/file/d/0B9RbxyXNort1dnM5b01NT0tveEE/view?usp=sharing
Thank you.
Seo
------------------------------------------------------------------------------
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
--
Arvid Norberg
------------------------------------------------------------------------------
Jeong Woo Seo
2015-10-23 06:44:55 UTC
Permalink
Then, what exactly should i raise in 'client_test'?
I am newer then newbie for programming, but i am digging it.
And i appreciate for your answer.

Thank you!



-----Original Message-----
From: "Arvid Norberg"<***@gmail.com>
To: "Jeong Woo Seo"<***@xsinc.co.kr>; "General discussion about libtorrent"<libtorrent-***@lists.sourceforge.net>;
Cc:
Sent: 2015-10-23 (금) 13:01:18
Subject: Re: [libtorrent] Can't seed very huge torrent with error "bencoded item count limit exceeded"

You hit the default limit on the size of bencoded structures when parsing. See: http://libtorrent.org/reference-Bencoding.html#lazy_bdecode() You can raise that limit to something more appropriate for your application. In some cases this default limit is implied by the API, for instance, when constructing a torrent_info object from a filename, there's no way to override the default. What you can do instead is to parse the torrent (using lazy_bdecode()) and then construct the torrent_info from the decoded structure.
On Thu, Oct 22, 2015 at 8:04 PM, Jeong Woo Seo <***@xsinc.co.kr> wrote:
I don't know why contens of mail were empty. anyway i am re-sending a mail. I am sorry for that.



Hi all.



I'm trying to seed a game which is called 'World of warship'. Its size is about 16GB and it has 166,027 files.

I made a torrent file of it with make_torrent. Size of the torrent file is about 16.5MB.

When i tried to open the torrent file with client_test, it showed error bencoded item count limit exceeded".

What should i do to fix it?



link of the torrent file: https://drive.google.com/file/d/0B9RbxyXNort1dnM5b01NT0tveEE/view?usp=sharing





Thank you.





Seo



------------------------------------------------------------------------------

_______________________________________________

Libtorrent-discuss mailing list

Libtorrent-***@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss


--
Arvid Norberg


------------------------------------------------------------------------------
Arvid Norberg
2015-10-23 23:17:47 UTC
Permalink
something along these lines:

index 36c1166..92cde13 100644
--- a/examples/client_test.cpp
+++ b/examples/client_test.cpp
@@ -826,7 +826,17 @@ void add_torrent(libtorrent::session& ses

boost::intrusive_ptr<torrent_info> t;
error_code ec;
- t = new torrent_info(torrent.c_str(), ec);
+
+ std::vector<char> buf;
+ int ret = load_file(torrent, buf, ec);
+ if (ret < 0) throw invalid_torrent_file(ec);
+ lazy_entry e;
+ int pos;
+ if (buf.size() == 0 || lazy_bdecode(&buf[0], &buf[0] + buf.size(),
e, ec
+ , &pos, 1000, 100000000) != 0)
+ throw invalid_torrent_file(ec);
+
+ t = new torrent_info(e, ec);
if (ec)
{
fprintf(stderr, "%s: %s\n", torrent.c_str(),
ec.message().c_str());
Post by Jeong Woo Seo
Then, what exactly should i raise in 'client_test'?
I am newer then newbie for programming, but i am digging it.
And i appreciate for your answer.
Thank you!
-----Original Message-----
*Cc:*
*Sent:* 2015-10-23 (금) 13:01:18
*Subject:* Re: [libtorrent] Can't seed very huge torrent with error
"bencoded item count limit exceeded"
You hit the default limit on the size of bencoded structures when parsing.
See: http://libtorrent.org/reference-Bencoding.html#lazy_bdecode()
You can raise that limit to something more appropriate for your application.
In some cases this default limit is implied by the API, for instance, when
constructing a torrent_info object from a filename, there's no way to
override the default. What you can do instead is to parse the torrent
(using lazy_bdecode()) and then construct the torrent_info from the decoded
structure.
I don't know why contens of mail were empty. anyway i am re-sending a
mail. I am sorry for that.
Hi all.
I'm trying to seed a game which is called 'World of warship'. Its size is
about 16GB and it has 166,027 files.
I made a torrent file of it with make_torrent. Size of the torrent file is about 16.5MB.
When i tried to open the torrent file with client_test, it showed error
bencoded item count limit exceeded".
What should i do to fix it?
https://drive.google.com/file/d/0B9RbxyXNort1dnM5b01NT0tveEE/view?usp=sharing
Thank you.
Seo
------------------------------------------------------------------------------
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
--
Arvid Norberg
--
Arvid Norberg
------------------------------------------------------------------------------
Jeong Woo Seo
2015-10-24 04:36:21 UTC
Permalink
------------------------------------------------------------------------------
sledgehammer999
2015-10-24 17:38:37 UTC
Permalink
Or if you don't want to poke with code, then just use a bigger piece size
when creating your torrent. You **might** avoid the error this way.
Post by Jeong Woo Seo
------------------------------------------------------------------------------
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------------------------
Jeong Woo Seo
2015-10-26 03:59:02 UTC
Permalink
------------------------------------------------------------------------------
Loading...