Commit 08f0b86
committed
Merge #267: New binary to parse torrent files (only for debugging purposes)
d9cdd65 feat: new binary to par torrent files (Jose Celano)
Pull request description:
I'm trying to fix bug #266
When I try to upload this torrent:
https://academictorrents.com/details/3cd18ff2d3eec881207dcc5ca5a2c3a2a3afe462
I get this error trying to parse it:
```
InvalidType("Invalid Type: sequence (expected: `field identifier`)")
```
I've tried to reproduce the error with a clean project:
https://github.com/torrust/torrust-parse-torrent
But It works.
I've added a binary to reproduce the error in this project. You can run it with:
```
cargo run --bin parse_torrent ./tests/fixtures/torrents/MC_GRID.zip-3cd18ff2d3eec881207dcc5ca5a2c3a2a3afe462.torrent
```
Output:
```s
Reading the torrent file ...
Decoding torrent with standard serde implementation ...
InvalidType("Invalid Type: sequence (expected: `field identifier`)")
Error: Custom { kind: Other, error: "Error: invalid torrent!. Invalid Type: sequence (expected: `field identifier`)" }
```
I need more ideas about how to solve this bug. I've checked the dependencies, and It does not work even if I use the same "serde" dependencies in this project.
The torrent only has two different things:
- The "pieces" field is big.
- It has an extra field from BEP 19.
I only have two more things to test:
- ~~Create another torrent with a big "pieces" field. Only to check if the size is the problem~~. DONE.
- Clone the "serve" crate and try to debug the code. I think the error is thrown [here](https://github.com/serde-rs/serde/blob/dad15b9fd0bef97b7a7c90a8a165b6ffbc682cae/serde/src/de/mod.rs#L1646). It seems the deserializer is expecting a file identifier (I guess for a Dictionary) and is getting a sequence.
Top commit has no ACKs.
Tree-SHA512: c9f02021801d492e34b7550662cfb6747bbf81f3724c3afdd3d92e22061066c400b721f35e80100d3253ff79fbda10d0bf0f7ea29df964f57ee97a1607b50fd3File tree
3 files changed
+76
-0
lines changed- .vscode
- src/bin
- tests/fixtures/torrents
3 files changed
+76
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
Binary file not shown.
0 commit comments