Crash when trying to load a torrent file that was just created
See original GitHub issueWorks fine in 2.0.7 but breaks in 3.0.0-beta.rev0106 (Edit: happens on a master build as well)
Exception:
MonoTorrent.TorrentException: Inconsistent hybrid torrent, mismatch in v1 and v2 files.
at MonoTorrent.Torrent.ProcessInfo(BEncodedDictionary dictionary, PieceHashesV1& hashesV1, Boolean& hasV1Data, Boolean& hasV2Data)
at MonoTorrent.Torrent.LoadInternal(BEncodedDictionary torrentInformation, RawInfoHashes infoHashes)
at MonoTorrent.Torrent..ctor(BEncodedDictionary torrentInformation, RawInfoHashes infoHashes)
at MonoTorrent.Torrent.Load(Stream stream, ReadOnlySpan`1 buffer)
at MonoTorrent.Torrent.Load(String path)
at Program.<Main>$(String[] args) in Program.cs:line 183
Code:
var tc = new TorrentCreator
{
Announce = trackerAnnounceStringHttp,
Comment = "...",
CreatedBy = "...",
Name = name,
Private = true,
StoreMD5 = false,
};
// Write the torrent file, overwrite existing
tc.Create(new TorrentFileSource(contentsPath, true), torrentPath);
var torrent = Torrent.Load(torrentPath);
I can send the created torrent file if necessary. contentsPath
contains around 10 files in a single directory, nothing special maybe except for some files having Japanese characters in their file names.
Edit: The exact same torrent file generated by 2.0.7 loads without issues in beta builds. Edit2: Torrent file generated by 2.0.7 is 10KB while one generated by a master build is 25KB.
Issue Analytics
- State:
- Created 8 months ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
My pc start to crash when I am torrenting. the torrent will ...
My pc start to crash when I am torrenting. the torrent will keep downloading, but the pc will be very slow and crashy...
Read more >FOUND the cause of Utorrent CRASHING!
There has been a known memory leak in Utorrent under certain circumstances in all versions after 2.2.1 but has never been solved. What...
Read more >How to Fix Torrent Keeps Crashing in Windows 10
Uninstall and Reinstall the Torrent. When Torrent Keeps Crashing in Windows 10 issue may occur because of the overwritten of system files. So,...
Read more >u torrent client crashes everytime a new torrent is added
Whenever I try to add a new torrent for download on my u torrent client, it reports an application crash and exits creating...
Read more >Version 4.4 is crashing when i add a new torrent ...
Crash report basically as i say in the title it just crashes, ... Any download from magnet Links or torrent files was enough...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is monotorrent on both sides, I’ll add logging for these events and see what happens then. Edit: Oh yeah, I forgot to mention that using an external application (either one of the above) to download from the seed seems to always work correctly.
The joys of .Net being culture-specific instead of invariant/ordinal by default, I’ve had plenty a bug like this 😉
By the way, the malformed torrent file seems to work just fine in qBittorrent and uTorrent 2.x, other than showing the padding as a file.