termkit / gama

Manage your GitHub Actions from Terminal with great UI 🧪
GNU General Public License v3.0
192 stars 14 forks source link

Rarely unexpected panics #45

Closed canack closed 7 months ago

canack commented 7 months ago

Sometimes, gama throws panic. It is really rare, I can't reproduce..

But here is scenario:

Here is a panic output: (I'll edit and add other panics if I got any)

Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/debug/stack.go:16 +0x13
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.25.0/tea.go:478 +0x91
panic({0x7bcee0?, 0xb7a300?})
        /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/panic.go:770 +0x132
github.com/termkit/gama/internal/terminal/handler/ghtrigger.(*ModelGithubTrigger).inputController(0xc0001dd008, {0x8db720?, 0xc0005b6000?})
        /home/runner/work/gama/gama/internal/terminal/handler/ghtrigger/ghtrigger.go:227 +0xe6
github.com/termkit/gama/internal/terminal/handler/ghtrigger.(*ModelGithubTrigger).Update(0xc0001dd008, {0x7ee880, 0xc00042c000})
        /home/runner/work/gama/gama/internal/terminal/handler/ghtrigger/ghtrigger.go:182 +0xc90
github.com/termkit/gama/internal/terminal/handler.(*model).handleTabContent(0xc0001da808, 0xc0003ed710?, {0x7ee880?, 0xc00042c000?})
        /home/runner/work/gama/gama/internal/terminal/handler/handler.go:253 +0x131
github.com/termkit/gama/internal/terminal/handler.(*model).Update(0xc0001da808, {0x7ee880, 0xc00050b440})
        /home/runner/work/gama/gama/internal/terminal/handler/handler.go:130 +0x88a
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc00021ca90, {0x8db068?, 0xc0001da808?}, 0xc0001141e0)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.25.0/tea.go:411 +0x5e2
github.com/charmbracelet/bubbletea.(*Program).Run(0xc00021ca90)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.25.0/tea.go:543 +0x86b
main.main()
        /home/runner/work/gama/gama/main.go:31 +0x1e5