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

Error: parse error: invalid character read: value limit exceeded reading newly created hybrid torrent #38

Open
htnyquist opened this issue Jul 18, 2022 · 0 comments

Comments

@htnyquist
Copy link

I used torrenttools to create a hybrid torrent on about 1TiB of data. The resulting file is about 20MB and can't be opened by qBittorrent ("the v1 and v2 metadata does not match"), but actually even torrenttools info out.torrent fails with an exception:

Catchpoint 1 (exception thrown), 0x00007ffff76a91b1 in __cxxabiv1::__cxa_throw (obj=0x555555989dd0, tinfo=0x55555593f598 <typeinfo for bencode::parsing_error>, dest=0x55555568b080 <bencode::parsing_error::~parsing_error()>) at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:81
81      ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc: No such file or directory.
(gdb) bt
#0  0x00007ffff76a91b1 in __cxxabiv1::__cxa_throw (obj=0x555555989dd0, tinfo=0x55555593f598 <typeinfo for bencode::parsing_error>, dest=0x55555568b080 <bencode::parsing_error::~parsing_error()>) at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:81
#1  0x000055555574f93e in bencode::decode_view (view="d8:announce34:udp://tracker.coppersurfer.tk:696913:announce-listll34:udp://tracker.coppersurfer.tk:6969el40:udp://tracker.leechers-paradise.org:6969el28:udp://exodus.desync.com:6969el42:udp://tracker."...)
    at /code/build/torrenttools/build/_deps/bencode-src/include/bencode/detail/decode_view.hpp:24
#2  0x000055555574d1ca in dottorrent::read_metafile (view="d8:announce34:udp://tracker.coppersurfer.tk:696913:announce-listll34:udp://tracker.coppersurfer.tk:6969el40:udp://tracker.leechers-paradise.org:6969el28:udp://exodus.desync.com:6969el42:udp://tracker."...)
    at /code/build/torrenttools/build/_deps/dottorrent-src/src/metafile.cpp:262
#3  0x000055555574d7d6 in dottorrent::load_metafile (path=filesystem::path "/some/redacted/path/out.torrent" = {...}) at /code/build/torrenttools/build/_deps/dottorrent-src/src/metafile.cpp:324
#4  0x0000555555674291 in run_info_app (main_options=..., options=...) at /code/build/torrenttools/src/info.cpp:52
#5  0x000055555568dd9c in main (argc=3, argv=0x7fffffffd408) at /code/build/torrenttools/src/main.cpp:71

The exception message is Error: parse error: invalid character read at position 9302219: value limit exceeded.
Here is the (lightly redacted) start of the log, during the torrent creation:

Scanning target directory: 56509 files processed
Sorting file list... Done.
Adding files to metafile... Done.
Metafile:          /some/redacted/path/out.torrent
Protocol version:  v1 + v2 (hybrid)
Piece size:        4 MiB (4194304 bytes)
Piece count:       263162
Created by:        torrenttools/0.6.2
Created on:        2022-07-18 19:46:21 UTC
Private:           false
Name:              test
Source:            
Comment:           
Announce-urls:     tier 1  - udp://tracker.coppersurfer.tk:6969
                   tier 2  - udp://tracker.leechers-paradise.org:6969
                   tier 3  - udp://exodus.desync.com:6969
                   tier 4  - udp://tracker.opentrackr.org:1337/announce
                   tier 5  - udp://tracker.uw0.xyz:6969/announce
DHT nodes:         
Web seeds:         
HTTP seeds:        
Similar torrents:  
Collections:       Test collection
Other info fields: 

Files:

Metafile contains more than 1000 files: skipping file tree ...

  1 TiB in 6516 directories, 57385 files


Hashing files...
[progress snipped]

I can provide the 20MB output torrent privately if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant