damon icon indicating copy to clipboard operation
damon copied to clipboard

Crash while tailing a pretty active web log

Open foozmeat opened this issue 3 years ago • 5 comments

panic: runtime error: index out of range [507] with length 0 [recovered]
        panic: runtime error: index out of range [507] with length 0

goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1(0x1400021c1c0)
        /Users/james/go/pkg/mod/github.com/rivo/[email protected]/application.go:243 +0x7c
panic(0x104d10c80, 0x1400013c4b0)
        /opt/homebrew/Cellar/go/1.16/libexec/src/runtime/panic.go:965 +0x14c
github.com/rivo/tview.(*TextView).Draw(0x14000200600, 0x104d50218, 0x14000254240)
        /Users/james/go/pkg/mod/github.com/rivo/[email protected]/textview.go:1017 +0xb18
github.com/rivo/tview.(*Flex).Draw(0x14000069590, 0x104d50218, 0x14000254240)
        /Users/james/go/pkg/mod/github.com/rivo/[email protected]/flex.go:183 +0x2b8
github.com/rivo/tview.(*Flex).Draw(0x140000695c0, 0x104d50218, 0x14000254240)
        /Users/james/go/pkg/mod/github.com/rivo/[email protected]/flex.go:183 +0x2b8
github.com/rivo/tview.(*Pages).Draw(0x14000069680, 0x104d50218, 0x14000254240)
        /Users/james/go/pkg/mod/github.com/rivo/[email protected]/pages.go:277 +0xb0
github.com/rivo/tview.(*Application).draw(0x1400021c1c0, 0x0)
        /Users/james/go/pkg/mod/github.com/rivo/[email protected]/application.go:597 +0xac
github.com/rivo/tview.(*Application).Draw.func1()
        /Users/james/go/pkg/mod/github.com/rivo/[email protected]/application.go:550 +0x28
github.com/rivo/tview.(*Application).Run(0x1400021c1c0, 0x0, 0x0)
        /Users/james/go/pkg/mod/github.com/rivo/[email protected]/application.go:376 +0x850
main.main()
        /Users/james/Developer/damon/cmd/damon/main.go:104 +0x9d8

foozmeat avatar Jan 17 '22 23:01 foozmeat

On the server I got this error:

[ERROR] http: request failed: method=GET path=/v1/node/ error="rpc error: missing node ID" code=500

foozmeat avatar Jan 17 '22 23:01 foozmeat

@foozmeat thank you for testing Damon so much and sharing these errors. Did that happen multiple times, or was this a one time thing?

hcjulz avatar Feb 05 '22 08:02 hcjulz

This happens regularly for me after approximately a minute or so. First it just stops tailing and then crashes on the next key pressed.

dermetfan avatar Mar 01 '22 10:03 dermetfan

@dermetfan thank you for confirmation. I'll look into this.

hcjulz avatar Mar 01 '22 11:03 hcjulz

@foozmeat @dermetfan I was able to identify the issue and I'm working on PR to fix this.

hcjulz avatar Mar 03 '22 17:03 hcjulz

Hey @foozmeat @dermetfan,

I was finally able to fix this issue with PR #36. I'm really sorry for the delay. I was able to identify the issue but it was in general bigger fix than expected.

Please let me know if it works for you. Otherwise, feel free to reopen the issue.

hcjulz avatar Sep 13 '22 13:09 hcjulz