Taz03 / monkey-tui

TUI typing test app, inspired by Monkeytype
GNU General Public License v3.0
14 stars 1 forks source link

Getting a recurring runtime error #3

Closed KeiranScript closed 4 months ago

KeiranScript commented 4 months ago

I keep getting the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x692795]

goroutine 1 [running]:
github.com/taz03/monkeytui/config.New({0x71ccbc, 0xb})
    /home/keiran/Programming/Go/monkeytype-tui/config/config.go:96 +0x55
main.main()
    /home/keiran/Programming/Go/monkeytype-tui/main.go:22 +0x25
exit status 2

I tried this on two linux machines and also a windows pc with no change.

KeiranScript commented 4 months ago

The full log:

Go/monkeytype-tui » go run .
go: downloading github.com/charmbracelet/bubbletea v0.26.3
go: downloading github.com/charmbracelet/bubbles v0.18.0
go: downloading github.com/charmbracelet/lipgloss v0.11.0
go: downloading github.com/charmbracelet/x/ansi v0.1.1
go: downloading github.com/charmbracelet/x/term v0.1.1
go: downloading github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6
go: downloading github.com/muesli/cancelreader v0.2.2
go: downloading github.com/muesli/termenv v0.15.2
go: downloading github.com/rivo/uniseg v0.4.7
go: downloading github.com/charmbracelet/x/input v0.1.0
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading github.com/mattn/go-runewidth v0.0.15
go: downloading github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f
go: downloading github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x692795]

goroutine 1 [running]:
github.com/taz03/monkeytui/config.New({0x71ccbc, 0xb})
    /home/keiran/Programming/Go/monkeytype-tui/config/config.go:96 +0x55
main.main()
    /home/keiran/Programming/Go/monkeytype-tui/main.go:22 +0x25
exit status 2
Taz03 commented 4 months ago

you have to setup config, get the config from monkeytype and paste it in a config.json in project root then try go run . again

KeiranScript commented 4 months ago

ah i feel stupid thanks for the help