chtop icon indicating copy to clipboard operation
chtop copied to clipboard

Crash

Open qoega opened this issue 2 years ago • 0 comments

./chtop-linux-amd64 --queries-url localhost:8123

cat .chtop.yaml
theme:
  graph:
    color: red
    height: 10
    precision: 1
clickhousequeries:
  queries:
    - name: Number of Running Queries
      sql: "select count(*) from system.processes"
    - name: Number of Databases
      sql: "select count(*) from system.databases"
    - name: Number of Tables
      sql: "select count(*) from system.tables"
    - name: Number of Parts
      sql: "select count(*) from system.parts"
unable to execute query: Number of Running Queries at endpoint: localhost:8123
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa6916f]

goroutine 19 [running]:
github.com/chhetripradeep/chtop/pkg/model.Model.UpdateQueriesData({{0x0, 0x0}, 0x0, 0xc00007d270, {{{0x11e46e0, 0x3, 0x3}, 0xee6b280}, {0xc0001ab950, {0x0, ...}}, ...}, ...})
	github.com/chhetripradeep/chtop/pkg/model/model.go:229 +0x1cf
github.com/chhetripradeep/chtop/pkg/model.Model.UpdateData.func1({0x0?, 0x5d4340?, 0x122a270?})
	github.com/chhetripradeep/chtop/pkg/model/model.go:245 +0xb8
github.com/charmbracelet/bubbletea.Tick.func1()
	github.com/charmbracelet/[email protected]/commands.go:142 +0x64
github.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1()
	github.com/charmbracelet/[email protected]/tea.go:247 +0x38
created by github.com/charmbracelet/bubbletea.(*Program).handleCommands.func1
	github.com/charmbracelet/[email protected]/tea.go:246 +0x14d

qoega avatar Mar 07 '23 14:03 qoega