Skip to content

cli/sql: panic display on tab key #92935

@knz

Description

@knz

With the new editor, the tab key causes the following panic:

Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	GOROOT/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
	GOROOT/src/runtime/debug/stack.go:16 +0x1c
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel.func3()
	github.com/charmbracelet/bubbletea/external/com_github_charmbracelet_bubbletea/tea.go:254 +0x8c
panic({0x1079e8820, 0x10af66330})
	GOROOT/src/runtime/panic.go:890 +0x258
github.com/knz/bubbline/complete.(*Model).SetValues(0x140004e0d88, {0x0?, 0x0})
	github.com/knz/bubbline/complete/external/com_github_knz_bubbline/complete/complete.go:263 +0xa8
github.com/knz/bubbline/editline.(*Model).autoComplete(0x140004e0000)
	github.com/knz/bubbline/editline/external/com_github_knz_bubbline/editline/editline.go:594 +0x24c
github.com/knz/bubbline/editline.(*Model).Update(0x140004e0000, {0x107d9f800, 0x14000a723f0?})
	github.com/knz/bubbline/editline/external/com_github_knz_bubbline/editline/editline.go:900 +0xa4c
github.com/knz/bubbline.(*Editor).Update(0x14000dc2a00, {0x107d9f800?, 0x14000a723f0?})

Jira issue: CRDB-22058

Epic: CRDB-22182

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions