mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #1077] applicaton crash #781
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#781
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @natxo on GitHub (Mar 5, 2025).
Original GitHub issue: https://github.com/rivo/tview/issues/1077
hi,
with this code:
the application crashes when I enter a wrong username/password like this:
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x7094cf]
goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1()
/home/natxo/go/pkg/mod/github.com/rivo/tview@v0.0.0-20241227133733-17b7edb88c57/application.go:297 +0x45
panic({0x743f00?, 0xa888b0?})
/usr/lib/golang/src/runtime/panic.go:785 +0x132
main.main.func1()
/home/natxo/code/gophpipam/cmd/client.go:37 +0x16f
github.com/rivo/tview.(*Form).InputHandler.func1.(*Button).InputHandler.1(0x18?, 0x7fcd0980b368?)
/home/natxo/go/pkg/mod/github.com/rivo/tview@v0.0.0-20241227133733-17b7edb88c57/button.go:165 +0x4d
github.com/rivo/tview.(*Form).InputHandler.func1.(*Button).InputHandler.(*Box).WrapInputHandler.2(0x46861d?, 0xc000100008?)
/home/natxo/go/pkg/mod/github.com/rivo/tview@v0.0.0-20241227133733-17b7edb88c57/box.go:167 +0x50
github.com/rivo/tview.(*Form).InputHandler.func1(0xc000122fa0, 0xc0002e42c0)
/home/natxo/go/pkg/mod/github.com/rivo/tview@v0.0.0-20241227133733-17b7edb88c57/form.go:867 +0x13b
github.com/rivo/tview.(*Form).InputHandler.(*Box).WrapInputHandler.func2(0xc000164160?, 0xc000100008?)
/home/natxo/go/pkg/mod/github.com/rivo/tview@v0.0.0-20241227133733-17b7edb88c57/box.go:167 +0x50
github.com/rivo/tview.(*Flex).InputHandler.func1(0xc000122fa0, 0xc0002e42c0)
/home/natxo/go/pkg/mod/github.com/rivo/tview@v0.0.0-20241227133733-17b7edb88c57/flex.go:255 +0xd7
github.com/rivo/tview.(*Flex).InputHandler.(*Box).WrapInputHandler.func2(0xc000112ab0?, 0xc00016bd38?)
/home/natxo/go/pkg/mod/github.com/rivo/tview@v0.0.0-20241227133733-17b7edb88c57/box.go:167 +0x50
github.com/rivo/tview.(*Application).Run(0xc0001440e0)
/home/natxo/go/pkg/mod/github.com/rivo/tview@v0.0.0-20241227133733-17b7edb88c57/application.go:416 +0x9a2
main.main()
/home/natxo/code/gophpipam/cmd/client.go:44 +0x71f
exit status 2
No sure exactly how to catch this. Any ideas greatly appreciated.
@natxo commented on GitHub (Mar 6, 2025):
when debugging with dlv I see that err.Error() exactly matches "Invalid username or password" by the way.
@natxo commented on GitHub (Mar 6, 2025):
ah, yes, dumb.
Sorry for the noise.