gotop
gotop copied to clipboard
Panic on Windows
Have the same issue in Windows:
Issue with CPU percentages.
Diagnostics:
self.Count: 8
gopsutil.Counts(): 8
len(percents): 0
percents: []
self.interval: 1s
panic: 1
goroutine 17 [running]:
github.com/cjbassi/gotop/utils.Error(0x5a120a, 0xf, 0xc0421720c0, 0x52)
d:/WLCR/GoProjects/src/github.com/cjbassi/gotop/utils/utils.go:30 +0x246
github.com/cjbassi/gotop/widgets.(*CPU).update(0xc042140000)
d:/WLCR/GoProjects/src/github.com/cjbassi/gotop/widgets/cpu.go:57 +0x539
created by github.com/cjbassi/gotop/widgets.NewCPU
d:/WLCR/GoProjects/src/github.com/cjbassi/gotop/widgets/cpu.go:38 +0x2da
Did by
$ go get -u -v github.com/cjbassi/gotop
$ gotop
Error caught. Exiting program.
Issue with CPU percentages.
Diagnostics: self.Count: 4 gopsutil.Counts(): 4 len(percents): 6 percents: [0 0 0 0 0 0] self.interval: 1s
panic: 1
goroutine 33 [running]: github.com/cjbassi/gotop/utils.Error(0x5a08cc, 0xf, 0xc0420b60c0, 0x5d) C:/GoPath/src/github.com/cjbassi/gotop/utils/utils.go:30 +0x246 github.com/cjbassi/gotop/widgets.(*CPU).update(0xc042172000) C:/GoPath/src/github.com/cjbassi/gotop/widgets/cpu.go:61 +0x719 created by github.com/cjbassi/gotop/widgets.NewCPU C:/GoPath/src/github.com/cjbassi/gotop/widgets/cpu.go:38 +0x2da exit status 2
So I'm getting the same issue on Windows too. Must be a gopsutil issue. Gonna report it over there and go from there.
Similar problem
panic: The handle is invalid.
goroutine 37 [running]:
github.com/cjbassi/gotop/vendor/github.com/nsf/termbox-go.get_win_size(0x0, 0x450a80)
<GOPATH>/src/github.com/cjbassi/gotop/vendor/github.com/nsf/termbox-go/termbox_windows.go:448 +0xc4
github.com/cjbassi/gotop/vendor/github.com/nsf/termbox-go.update_size_maybe()
<GOPATH>/src/github.com/cjbassi/gotop/vendor/github.com/nsf/termbox-go/termbox_windows.go:470 +0x38
github.com/cjbassi/gotop/vendor/github.com/nsf/termbox-go.Clear(0x0, 0x6ec510, 0xc00005a000)
<GOPATH>/src/github.com/cjbassi/gotop/vendor/github.com/nsf/termbox-go/api_windows.go:187 +0x41
github.com/cjbassi/gotop/vendor/github.com/nsf/termbox-go.Close()
<GOPATH>/src/github.com/cjbassi/gotop/vendor/github.com/nsf/termbox-go/api_windows.go:77 +0x34
github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui.Close()
<GOPATH>/src/github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui/init.go:25 +0x27
github.com/cjbassi/gotop/src/utils.Error(0x5b6a2e, 0xf, 0xc0001be000, 0x66)
<GOPATH>/src/github.com/cjbassi/gotop/src/utils/utils.go:56 +0x3b
github.com/cjbassi/gotop/src/widgets.(*CPU).update.func2(0xc00018c000)
<GOPATH>/src/github.com/cjbassi/gotop/src/widgets/cpu.go:78 +0x5ca
created by github.com/cjbassi/gotop/src/widgets.(*CPU).update
<GOPATH>/src/github.com/cjbassi/gotop/src/widgets/cpu.go:74 +0x64