IceDynamix / reliquary-archiver

tool to create a relic export from network packets of a certain turn-based anime game
MIT License
199 stars 19 forks source link

Application crashes with message "attempt to add with overflow" #41

Closed fuwaai closed 4 months ago

fuwaai commented 4 months ago

App crashes the moment when I click to start in game.

Log:

2024-07-06T06:29:10.825862Z  INFO config_map: reliquary_archiver::export::fribbels: initializing database from online sources, this might take a while...
2024-07-06T06:30:06.218077Z  INFO live_capture: reliquary_archiver: instructions: go to main menu screen and go to the "Click to Start" screen
2024-07-06T06:30:06.218172Z  INFO live_capture: reliquary_archiver: listening with a timeout of 120 seconds...
2024-07-06T06:30:19.597786Z  INFO live_capture: reliquary_archiver: detected connection established
The application panicked (crashed).
Message:  attempt to add with overflow
Location: /home/pc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kcp-0.5.3/src/kcp.rs:522
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Warning: SpanTrace capture is Unsupported.
Ensure that you've setup a tracing-error ErrorLayer and the semver versions are compatible

Background:

Verbose version right before the crash:

2024-07-06T06:38:16.141867Z TRACE capture_device: reliquary_archiver: captured packet
2024-07-06T06:38:16.142099Z DEBUG live_capture: reliquary_archiver::export::fribbels: detected uid
2024-07-06T06:38:16.142250Z TRACE live_capture:receive_packet{len=70}:parse_connection_packet:parse_udp{len=70}: reliquary::network::connection: complete
2024-07-06T06:38:16.142391Z TRACE live_capture:receive_packet{len=70}:receive_segments{conv_id=1242265 len=28}: reliquary::network::kcp: message data: 99f412004c0a58265200ff0004c8c386000000000100000000000000
2024-07-06T06:38:16.142478Z TRACE live_capture:receive_packet{len=70}:receive_segments{conv_id=1242265 len=28}:split: reliquary::network::kcp: before split: 99f412004c0a58265200ff0004c8c386000000000100000000000000
2024-07-06T06:38:16.142547Z TRACE live_capture:receive_packet{len=70}:receive_segments{conv_id=1242265 len=28}:split: reliquary::network::kcp:  after split: 99f412005200ff0004c8c386000000000100000000000000
The application panicked (crashed).
Message:  attempt to add with overflow
Location: /home/pc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kcp-0.5.3/src/kcp.rs:522
fuwaai commented 4 months ago

Nvm duplicate of this #21. Built it with --release flag, no more error. All good now. Not sure why cargo builds the debug version by default. Setting CAP_NET_RAW still doesn't work for perms. Running the binary with sudo is the way to go