question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ArgumentOutOfRangeException in TorrentParser.CreateTorrent()

See original GitHub issue

Parsing a specific torrent file fails with ArgumentOutOfRangeException:

System.ArgumentOutOfRangeException: Value to add was out of range.
Parameter name: value
   at System.DateTime.Add(Double value, Int32 scale)
   at BencodeNET.Objects.BNumber.op_Implicit(BNumber number)
   at BencodeNET.Parsing.TorrentParser.CreateTorrent(BDictionary data)
   at BencodeNET.Parsing.BencodeParser.Parse[T](BencodeStream stream)
   at BencodeNET.Parsing.BencodeParser.Parse[T](Byte[] bytes)

qbittorent opens file without any errors or warnings.

Please find the torrent file in question attached.

3AC38643197FE34CD73DC311BBB75DF416E617E6.zip

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Krusencommented, Aug 2, 2017

The issue was the creation date timestamp being in milliseconds instead of seconds which it should be according to the specification.

I’ve added support for this in v2.2.4, which should be available on NuGet shortly.

0reactions
Krusencommented, Aug 4, 2017

Actually it’s not even microseconds, it just seems to be invalid.

2,2.5 should be available soon and will just return epoch (1970-01-01) if the timestamp is not in either seconds or milliseconds.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet run gives ArgumentOutOfRangeException error at ...
I installed .NET 6.0.1 SDK, and turned out that I cannot use command dotnet run at all, because it keeps giving me ArgumentOutOfRangeException...
Read more >
ArgumentOutOfRangeException Class (System)
The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked...
Read more >
Exception thrown: System.ArgumentOutOfRangeException
I am following a Youtube video tutorial, so it should be straightforward with everything working since someone already worked out the errors....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found