taua-almeida / cs2-analyser-tool

Designed specifically for players and coaches, this command-line interface tool provides in-depth insights into gameplay strategies and performance metrics
MIT License
5 stars 0 forks source link

panic: runtime error: invalid memory address or nil pointer dereference [recovered] #1

Open ESCA7A opened 4 hours ago

ESCA7A commented 4 hours ago

Describe the bug When i start to run app i see error report

To Reproduce Steps to reproduce the behavior:

  1. install go to windows 11
  2. opened cmd
  3. add dem to new_dir in root directory and paste demo into
  4. disk:\cs2-analyser-tool-main>cs2-analyser-tool.exe analyse --demo demos\demo.dem

Expected behavior will start analyse

Screenshots Снимок

Desktop (please complete the following information):

Additional context

disk:\cs2-analyser-tool-main>cs2-analyser-tool.exe analyse --demo demos\demo-2.dem
Processing CS2 demo, hang tight...

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0xb59b48]

goroutine 1 [running]:
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.recoverFromUnexpectedEOF({0xc35160, 0x12f51d0})
        disk:/myUser/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.0.1/pkg/demoinfocs/parsing.go:171 +0x128
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).ParseToEnd.func1()
        disk:/myUser/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.0.1/pkg/demoinfocs/parsing.go:124 +0xa5
panic({0xc35160?, 0x12f51d0?})
        C:/Program Files/Go/src/runtime/panic.go:785 +0x132
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).parseFrameS2(0xc00009eea0)
        disk:/myUser/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.0.1/pkg/demoinfocs/parsing.go:359 +0x228
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).ParseToEnd(0xc00009eea0)
        disk:/myUser/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.0.1/pkg/demoinfocs/parsing.go:147 +0x142
github.com/taua-almeida/cs2-analyser-tool/cmd/demo_parser.ProcessDemo({0xc00000a120?, 0xc0000780c0?})
        disk:/cs2-analyser-tool-main/cmd/demo_parser/demo_parser.go:42 +0x346
github.com/taua-almeida/cs2-analyser-tool/cmd.init.func1(0x1310a40, {0xd39582?, 0x4?, 0xd39586?})
        disk:/cs2-analyser-tool-main/cmd/analyse.go:63 +0x266
github.com/spf13/cobra.(*Command).execute(0x1310a40, {0xc00007cda0, 0x2, 0x2})
        disk:/myUser/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0xa91
github.com/spf13/cobra.(*Command).ExecuteC(0x1310d20)
        disk:/myUser/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        disk:/myUser/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/taua-almeida/cs2-analyser-tool/cmd.Execute()
        disk:/cs2-analyser-tool-main/cmd/root.go:22 +0x1a
main.main()
        disk:/cs2-analyser-tool-main/main.go:6 +0xf
taua-almeida commented 3 hours ago

Hello @ESCA7A, happy to help, I might need two more info from you if possible.

Also, I will probably work on it during the weekend, so of you have any ideas of have a solution for it, please open a PR or post your thoughts here.

ESCA7A commented 3 hours ago

Hello @taua-almeida. Sure

  1. faceit
  2. https://www.faceit.com/ru/cs2/room/1-18381f06-07fe-4525-ac98-c33285e912e1