Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: omm guide #17

Open
johnmee opened this issue Jul 29, 2024 · 3 comments
Open

panic: omm guide #17

johnmee opened this issue Jul 29, 2024 · 3 comments

Comments

@johnmee
Copy link

johnmee commented Jul 29, 2024

Describe the bug
guide cli parameter creates a panic

Setup

  • omm 0.4.3
  • Ubuntu
  • fish, bash
  • Gnome Terminal v3.52.0 for gnome 46
  • No Terminal Multiplexer
  • en_AU.UTF-8

To Reproduce

  1. type omm guide on the command line
  2. Error occurs

Expected behavior
Text to stdout

Screenshots
image

Additional context

  • Seems to work just fine otherwise.
  • as run from dir of tar.gz extract

$ omm guide
Caught panic:

runtime error: index out of range [-1]

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
/opt/hostedtoolcache/go/1.22.5/x64/src/runtime/debug/stack.go:24 +0x83
runtime/debug.PrintStack()
/opt/hostedtoolcache/go/1.22.5/x64/src/runtime/debug/stack.go:16 +0x1a
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.26.6/tea.go:479 +0xbc
panic({0x87f81a0, 0xb2edfb0})
/opt/hostedtoolcache/go/1.22.5/x64/src/runtime/panic.go:770 +0x103
github.com/dhth/omm/internal/types.GetDynamicStyle({0xb35c100, 0x6})
/home/runner/work/omm/omm/internal/types/types.go:158 +0x109
github.com/dhth/omm/internal/ui.compactItemDelegate.Render({{0x941cc00, 0x400, {0x0, 0x0}, 0x0, {0x8f9c90c, 0xb6150f8}, {0x0, 0x0}, 0x0, ...}}, ...)
/home/runner/work/omm/omm/internal/ui/list_delegate.go:33 +0xd8
github.com/charmbracelet/bubbles/list.Model.populatedView({0x1, 0x1, 0x1, 0x1, 0x0, 0x1, {0x882673e, 0x4}, {0x8827957, 0x5}, ...})
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbles@v0.18.0/list/list.go:1185 +0x2f0
github.com/charmbracelet/bubbles/list.Model.View({0x1, 0x1, 0x1, 0x1, 0x0, 0x1, {0x882673e, 0x4}, {0x8827957, 0x5}, ...})
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbles@v0.18.0/list/list.go:1036 +0x47f
github.com/dhth/omm/internal/ui.model.View({0xb0ab0e8, {0x0, {0x882b85e, 0x7}, {0x882b865, 0x7}, {0x0, 0x0}, {0x882f9f9, 0x9}, ...}, ...})
/home/runner/work/omm/omm/internal/ui/view.go:49 +0x10e8
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xb0c5e00, {0x8f9d290, 0xb4e6000}, 0xb26abc0)
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.26.6/tea.go:414 +0x6ee
github.com/charmbracelet/bubbletea.(*Program).Run(0xb0c5e00)
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.26.6/tea.go:550 +0xa9d
github.com/dhth/omm/internal/ui.RenderUI(0xb0ab0e8, {0x0, {0x882b85e, 0x7}, {0x882b865, 0x7}, {0x0, 0x0}, {0x882f9f9, 0x9}, ...})
/home/runner/work/omm/omm/internal/ui/ui.go:24 +0x244
github.com/dhth/omm/cmd.NewRootCommand.func6(0xb442d88, {0x944d6c0, 0x0, 0x0})
/home/runner/work/omm/omm/cmd/root.go:340 +0x1d6
github.com/spf13/cobra.(*Command).execute(0xb442d88, {0x944d6c0, 0x0, 0x0})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:985 +0xaa0
github.com/spf13/cobra.(*Command).ExecuteC(0xb442908)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x458
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041
github.com/dhth/omm/cmd.Execute({0x8f9a044, 0x5})
/home/runner/work/omm/omm/cmd/root.go:62 +0xd4
main.main()
/home/runner/work/omm/omm/main.go:20 +0x68

@dhth
Copy link
Owner

dhth commented Jul 29, 2024

Does it only panic when running the guide, or during general usage as well (ie, when you run omm and try to add a task)?

@johnmee
Copy link
Author

johnmee commented Jul 29, 2024

Only when adding the "guide" parameter. Not during general usage. Not for omm updates.

@dhth
Copy link
Owner

dhth commented Aug 13, 2024

Hey @johnmee. Could you verify that this issue is fixed in v0.5.1?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants