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

Failures on some POV demos #19

Open
antarctician opened this issue Feb 28, 2024 · 7 comments
Open

Failures on some POV demos #19

antarctician opened this issue Feb 28, 2024 · 7 comments

Comments

@antarctician
Copy link

First of all, thank you for this piece of software!

I tried to parse a big pile of POV demos (3575 files) recorded over many years using parse_demo binary but many of them failed. Here are the errors:

  1. 1006 failures (28%)
    Error: A read game event doesn't contain the expected values, expected type Byte for kills_rank event, got type Long
    
  2. 12 failures (0.3%)
    Error: A read game event doesn't contain the expected values, expected type Byte for kills_rank event, got type Short
    
  3. 15 failures (0.4%)
    Error: Malformed utf8 while reading string
    caused by: invalid utf-8 sequence of 1 bytes from index 0
    
    In 5 cases the index was not 0.
  4. 5 failures (0.1%)
    Error: A read game event doesn't contain the expected values, expected type Long for weapon_def_index event, got type Short
    

That's it so the total number of different errors is surprisingly low :)

And it's also not unlikely that there's been some bit rot.

@antarctician
Copy link
Author

Some updates:

After applying a workaround for kills_rank, the same issue surfaced for score_rank:

Error: A read game event doesn't contain the expected values, expected type Byte for score_rank event, got type Short

I've done some digging and saw that some actual values for both kills_rank and score_rank didn't fit u8. (Unrelatedly, I noticed that UserId is read as u32 and then truncated to u16 in some cases).

The UTF-8 issue was occurring when reading StringTable::name and StringTableEntry::text

@icewind1991
Copy link
Contributor

icewind1991 commented Apr 7, 2024

Can you upload an example demo for each of the different failures?

@Hona
Copy link

Hona commented Apr 16, 2024

I've left a sample STV, similar to this under #20
@icewind1991

@icewind1991
Copy link
Contributor

please try again with latest master

@antarctician
Copy link
Author

After switching from d9ff9d4 to ab87b34:

  1. Gone
  2. Gone
  3. No change
  4. No change
  5. [New?] 12 failures
    thread 'main' panicked at src/demo/parser/analyser.rs:503:21:
    attempt to add with overflow
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

I will send you example demos.

@icewind1991
Copy link
Contributor

  1. should be fixed now. Haven't looked to closely into the others

@antarctician
Copy link
Author

  1. should be fixed now. Haven't looked to closely into the others

Can confirm that 5 doesn't occur on 0aaf5db.

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

3 participants