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

Faceit - unexpected EOF: demo stream ended unexpectedly #525

Closed
maddenbjames opened this issue Apr 24, 2024 · 1 comment
Closed

Faceit - unexpected EOF: demo stream ended unexpectedly #525

maddenbjames opened this issue Apr 24, 2024 · 1 comment

Comments

@maddenbjames
Copy link

Describe the bug
After parsing the entire demo, at the end of the parse it will show this error
failed to parse demo: unexpected EOF: demo stream ended unexpectedly (ErrUnexpectedEndOfDemo)

This has been happening a lot more as of late, and as far as I can tell almost exclusively with faceit demos.

To Reproduce
Demo page download
https://www.faceit.com/en/cs2/room/1-2304a144-2f75-4ab1-913d-2826bb857ae3

Run it on any parser, tested with our intricate one and also just a basic kill printer

Code:

func main() {
	f, err := os.Open("../demos/test.dem")
	if err != nil {
		log.Panic("failed to open demo file: ", err)
	}
	defer f.Close()

	p := dem.NewParser(f)
	defer p.Close()

	p.RegisterEventHandler(func(e events.Kill) {
		var hs string
		if e.IsHeadshot {
			hs = " (HS)"
		}
		var wallBang string
		if e.PenetratedObjects > 0 {
			wallBang = " (WB)"
		}
		fmt.Printf("%s <%v%s%s> %s\n", e.Killer, e.Weapon, hs, wallBang, e.Victim)
	})

	// Parse to end
	err = p.ParseToEnd()
	if err != nil {
		log.Panic("failed to parse demo: ", err)
	}
}

Expected behavior
It finishes the parse with no error. This error seems to happen either at the start of the demo or at the end of the demo parse.

Library version
v4.1.2

@maddenbjames
Copy link
Author

image

Maybe related to this? Just throwing info out there, our CS mod guy said this was added 2 days ago to the demo.proto

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

No branches or pull requests

2 participants