Skip to content

Caught panic #27

Description

@b-jazz

Describe the bug

I just updated to the latest (v0.2.0) and was playing with the various toggles and reduced the sampling rate to 300s. I wasn't paying too much attention, but about 5 minutes later, I got the panic message below.

To reproduce

Steps to reproduce the behavior:

  1. Run flow
  2. Press '-' ten times to get to 300s
  3. Eventually see error

Expected behavior

Not panic.

Environment (please complete at minimum):

  • OS: Manjaro
  • Terminal: kitty
  • flow version: v0.2.0
  • Installation method: AUR

Screenshots / recordings

$ flow
Caught panic:

runtime error: index out of range [-9223372036854775808]

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.24.2/x64/src/runtime/debug/stack.go:26 +0x5e
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.24.2/x64/src/runtime/debug/stack.go:18 +0x13
github.com/charmbracelet/bubbletea.(*Program).recoverFromPanic(0xc000160000, {0x5ff4e0, 0xc000018888})
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v1.3.10/tea.go:847 +0xac
github.com/charmbracelet/bubbletea.(*Program).Run.func2()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v1.3.10/tea.go:638 +0xe8
panic({0x5ff4e0?, 0xc000018888?})
        /opt/hostedtoolcache/go/1.24.2/x64/src/runtime/panic.go:792 +0x132
github.com/programmersd21/flow/internal/theme.fiveStopGradient({{0x3b, 0x82, 0xf6}, {0x63, 0x66, 0xf1}, {0x6, 0xb6, 0xd4}, {0x0, ...}, ...}, ...)
        /home/runner/work/flow/flow/internal/theme/theme.go:472 +0xcc
github.com/programmersd21/flow/internal/theme.DownloadColor(_)
        /home/runner/work/flow/flow/internal/theme/theme.go:425 +0xaa
github.com/programmersd21/flow/internal/ui.renderColoredGraph({0xc0000244e0, 0x32, 0x7ea860?}, 0x0?, 0x4, 0xfff8000000000000, 0x0?, 0x1)    
        /home/runner/work/flow/flow/internal/ui/views.go:213 +0x1ca
github.com/programmersd21/flow/internal/ui.dashboardContentLines({{{{0xc000148040, 0x2, 0x2}, {{...}, {...}}, 0x0}, {{0xc000122410, 0x1, 0x1}, {{...}, ...}, ...}, ...}, ...}, ...)
        /home/runner/work/flow/flow/internal/ui/views.go:472 +0x4df
github.com/programmersd21/flow/internal/ui.pickViewModeAndContent({{{{0xc000148040, 0x2, 0x2}, {{...}, {...}}, 0x0}, {{0xc000122410, 0x1, 0x1}, {{...}, ...}, ...}, ...}, ...})
        /home/runner/work/flow/flow/internal/ui/views.go:409 +0x285
github.com/programmersd21/flow/internal/ui.Model.View({{{{0xc000148040, 0x2, 0x2}, {{...}, {...}}, 0x0}, {{0xc000122410, 0x1, 0x1}, {{...}, ...}, ...}, ...}, ...})
        /home/runner/work/flow/flow/internal/ui/model.go:455 +0x7b
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc000160000, {0x668f48?, 0xc00015c008?}, 0xc00015e070)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v1.3.10/tea.go:502 +0x90a
github.com/charmbracelet/bubbletea.(*Program).Run(0xc000160000)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v1.3.10/tea.go:716 +0xb56
main.main()
        /home/runner/work/flow/flow/cmd/flow/main.go:123 +0x89b
flow: program was killed: program experienced a panic

Additional context

Any other context that might help diagnose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions