jhalter / mobius

A Hotline server implemented in Golang for macOS, Linux, and Windows operating systems
MIT License
73 stars 8 forks source link

Panic log #102

Closed Distortions81 closed 1 year ago

Distortions81 commented 1 year ago

mobius_client_linux_amd64$ ./mobius-hotline-client -config mobius-client-config.yaml panic: runtime error: index out of range [22] with length 18 [recovered] panic: runtime error: index out of range [22] with length 18

goroutine 1 [running]: github.com/rivo/tview.(Application).Run.func1() /home/circleci/go/pkg/mod/github.com/rivo/tview@v0.0.0-20220307222120-9994674d60a8/application.go:243 +0x4d panic({0x718ec0, 0xc00001e480}) /usr/local/go/src/runtime/panic.go:884 +0x212 github.com/jhalter/mobius/hotline.serverScanner({0xc0006a2588?, 0x480?, 0xc00063df38?}, 0x0?) /home/circleci/project/hotline/tracker.go:158 +0x86 bufio.(Scanner).Scan(0xc00074d7a0) /usr/local/go/src/bufio/scan.go:146 +0xbf github.com/jhalter/mobius/hotline.GetListing({0xc000536060?, 0x0?}) /home/circleci/project/hotline/tracker.go:126 +0x45e github.com/jhalter/mobius/hotline.(UI).getTrackerList(0xc0005b6240) /home/circleci/project/hotline/ui.go:107 +0x49 github.com/jhalter/mobius/hotline.(UI).Start.func3() /home/circleci/project/hotline/ui.go:474 +0x25 github.com/rivo/tview.(List).InputHandler.func1(0xc00074d9d0?, 0x56455f?) /home/circleci/go/pkg/mod/github.com/rivo/tview@v0.0.0-20220307222120-9994674d60a8/list.go:619 +0xcf github.com/rivo/tview.(Box).WrapInputHandler.func1(0xc00011ca90?, 0xc00074da10?) /home/circleci/go/pkg/mod/github.com/rivo/tview@v0.0.0-20220307222120-9994674d60a8/box.go:167 +0x53 github.com/rivo/tview.(Flex).InputHandler.func1(0xc00074da50?, 0x55e8ff?) /home/circleci/go/pkg/mod/github.com/rivo/tview@v0.0.0-20220307222120-9994674d60a8/flex.go:251 +0xd9 github.com/rivo/tview.(Box).WrapInputHandler.func1(0xc0005185d0?, 0xc00074da90?) /home/circleci/go/pkg/mod/github.com/rivo/tview@v0.0.0-20220307222120-9994674d60a8/box.go:167 +0x53 github.com/rivo/tview.(Flex).InputHandler.func1(0xc00074dad0?, 0x55e8ff?) /home/circleci/go/pkg/mod/github.com/rivo/tview@v0.0.0-20220307222120-9994674d60a8/flex.go:251 +0xd9 github.com/rivo/tview.(Box).WrapInputHandler.func1(0xc0005184b0?, 0x7f4c610af7d0?) /home/circleci/go/pkg/mod/github.com/rivo/tview@v0.0.0-20220307222120-9994674d60a8/box.go:167 +0x53 github.com/rivo/tview.(Pages).InputHandler.func1(0x40ea67?, 0x10?) /home/circleci/go/pkg/mod/github.com/rivo/tview@v0.0.0-20220307222120-9994674d60a8/pages.go:311 +0xa7 github.com/rivo/tview.(Box).WrapInputHandler.func1(0xc0005182d0?, 0xc00074dbd8?) /home/circleci/go/pkg/mod/github.com/rivo/tview@v0.0.0-20220307222120-9994674d60a8/box.go:167 +0x53 github.com/rivo/tview.(Application).Run(0xc0005261c0) /home/circleci/go/pkg/mod/github.com/rivo/tview@v0.0.0-20220307222120-9994674d60a8/application.go:335 +0x77d github.com/jhalter/mobius/hotline.(UI).Start(0xc0005b6240) /home/circleci/project/hotline/ui.go:508 +0xd45 main.main() /home/circleci/project/cmd/mobius-hotline-client/main.go:76 +0x8e5

Was using Kubuntu 22.

jhalter commented 1 year ago

Thanks, are you using the default tracker? If so, I think it intermittently returns malformed results.

I'll take a closer look and add some error handling.

Distortions81 commented 1 year ago

Yeah I just loaded it up and played with it for a short while, so default tracker.

jhalter commented 1 year ago

Thanks for reporting this. I've added error handling in v0.10.21 so that an error modal pops up instead of a panic.