Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load the torrent: metadata too large #1889

Closed
qqqqq8 opened this issue Aug 21, 2014 · 13 comments

Comments

Projects
None yet
7 participants
@qqqqq8
Copy link

commented Aug 21, 2014

When I try to open this torrent file I get this error (Failed to load the torrent: metadata too large)
http://www.nyaa.se/?page=view&tid=473067

@SamyCookie

This comment has been minimized.

Copy link

commented Aug 21, 2014

Seems to be the same issue as #1041 and #1459. It may be fixed when #894 will be implemented.

@sledgehammer999

This comment has been minimized.

Copy link
Contributor

commented Oct 5, 2014

Reopening because it isn't fixed. And marking for v3.1.11

@sledgehammer999 sledgehammer999 added this to the possible v3.1.11 milestone Oct 5, 2014

@sledgehammer999

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2014

I am transferring this for v3.2.0.
The solution is quite intrusive code-wise and I am afraid that I might introduce a bug. If we v3.1.11 wasn't the last of the v3.1.x I would make the change.

@sledgehammer999 sledgehammer999 modified the milestones: v3.2.0, possible v3.1.11 Oct 22, 2014

@sorokin

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2014

@sledgehammer999 Why is it intrusive?

// torrent_info.cpp:485
int load_file(std::string const& filename, std::vector<char>& v, error_code& ec, int limit = 8000000)
{
    ec.clear();
    file f;
    if (!f.open(filename, file::read_only, ec)) return -1;
    size_type s = f.get_size(ec);
    if (ec) return -1;
    if (s > limit)
    {
        ec = error_code(errors::metadata_too_large, get_libtorrent_category());
        return -2;
    }

Doesn't replacing 8000000 with something greater work?

@sledgehammer999

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2014

That particular function wasn't supposed to be used as public API, that's why it is removed in libtorrent 1.0.0. (I have asked arvid).
So now we either use the constructor that takes buffer or the constructor that takes a lazy_entry.
Either way we have to create IMO a wrapper function, we construct torrent_info objects in various places.
It's true that the solution might seem simple enough, but I don't want to risk it this late to the series for ONE instance of a big torrent.

@sorokin

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2014

I mean could you just change this in code of libtorrent for windows builds?

Then we could ask arvid for increasing limit or expose this limit parameter in public API for us or read file manually and initialize torrent_info from lazy_entry.

@sledgehammer999

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2014

I mean could you just change this in code of libtorrent for windows builds?

This isn't a true solution. What would happen with the rest of the OSes?
I don't believe in poking other libs, unless the patch is to be merged upstream.

@sorokin

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2014

I don't believe in poking other libs, unless the patch is to be merged upstream.

Perhaps you are right.

I thought we could just hack it to make user happy. And then for 3.2.0 we could develop a proper workaround or change an interface of libtorrent.

I've read the conversation in libtorrent-discuss, I don't understand why arvid doesn't want simply to bump this limit.

@sledgehammer999

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2014

He said something about API and ABI compatibility. I am not sure when ABI breakage occurs, but I assume that this is one of the cases.

@AsaRossoff

This comment has been minimized.

Copy link

commented Oct 22, 2014

Paradoxical workaround for that particular content, for those with the storage space, is probably the original lossless content 1.25 TiB version of the torrent, with an "only" 7.01MiB torrent file. Untested.

@alexeightsix

This comment has been minimized.

Copy link

commented Mar 31, 2015

was this ever fixed??

@sledgehammer999

This comment has been minimized.

Copy link
Contributor

commented Mar 31, 2015

Yes, but try the v3.2.0beta builds on the forum.
I don't think that I backported this in the v3.1.x series.

@illeatmyhat

This comment has been minimized.

Copy link

commented May 2, 2016

I've tried this on v3.3.4 and I get the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.