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

Rust panic #11

Open
osztenkurden opened this issue Sep 5, 2023 · 6 comments
Open

Rust panic #11

osztenkurden opened this issue Sep 5, 2023 · 6 comments

Comments

@osztenkurden
Copy link

Hey,

I'm getting error originating from Rust while parsing specific demo:

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Literal { len: 28, src_len: 89138, dst_len: 0 }', demoparser\src\parser\src\parser.rs:72:93
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I'm doing only parseHeader(demoPath), all other demos I've tested work fine so far.

Demo link: https://drive.google.com/file/d/1bQ15cGalTWjIglCB2MCrVixK1IlBB5a_/view?usp=sharing

@LaihoE
Copy link
Owner

LaihoE commented Sep 5, 2023

hmm interesting was able to reproduce. Is there anything special about the demo? The error seems to be happening in an odd place.

@LaihoE
Copy link
Owner

LaihoE commented Sep 5, 2023

Anyway I've removed the panic and should now raise a proper error. Will be part of next release. I'm still curious tho on why that demo fails.

@osztenkurden
Copy link
Author

From my side it looks like normal demo, so also not sure why it fails

@LaihoE
Copy link
Owner

LaihoE commented Sep 5, 2023

The demo runs fine in the official demo viewer so something seems to be wrong.

@LaihoE
Copy link
Owner

LaihoE commented Sep 6, 2023

After some investigation there seems to be a corrupt packet at tick 46095. Markus parser fails at the same tick. If I skip this tick the rest of the demo seems to work just fine. This leads us to a tricky question: What should be done in this situation? Should the parser raise an error or something else? A corrupt packet can have unexpected consequences later on in the demo... But in this situation It's almost certainly fine sooo...

@osztenkurden
Copy link
Author

Perhaps custom event "error" or something, so after parsing it would be possible to check for "error" events, and decide what to do with the result?

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

2 participants