We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Adding a task with a prefix of 8 or 9 causes a panic. From further testing some longer lengths like 49 also cause a panic.
Setup Please complete the following information along with version numbers, if applicable.
To Reproduce Steps to reproduce the behavior:
Expected behavior No panic.
Screenshots This is from length 49 but it's always a similar error, just a different index.
Caught panic: runtime error: index out of range [-59] 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/[email protected]/tea.go:479 +0xbc panic({0x87f8240, 0xa1e67f0}) /opt/hostedtoolcache/go/1.22.5/x64/src/runtime/panic.go:770 +0x103 github.com/dhth/omm/internal/types.GetDynamicStyle({0x9bfa000, 0x31}) /home/runner/work/omm/omm/internal/types/types.go:142 +0x109 github.com/dhth/omm/internal/types.Task.Description({{0x0, 0x0}, 0x35, {0x9bfa000, 0x40}, 0x0, 0x1, {0xc1a61e1098453737, 0x3dc1649e2c, 0x9464040}, ...}) /home/runner/work/omm/omm/internal/types/types.go:108 +0x86 github.com/charmbracelet/bubbles/list.DefaultDelegate.Render({0x1, {{0x94640c0, 0xf0400, {0x0, 0x0}, 0x0, {0x8fe3b5c, 0x9aca7b0}, {0x0, 0x0}, ...}, ...}, ...}, ...) /home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/list/defaultitem.go:147 +0x97 github.com/charmbracelet/bubbles/list.Model.populatedView({0x1, 0x1, 0x1, 0x1, 0x0, 0x1, {0x882689e, 0x4}, {0x8827ab7, 0x5}, ...}) /home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/list/list.go:1185 +0x2f0 github.com/charmbracelet/bubbles/list.Model.View({0x1, 0x1, 0x1, 0x1, 0x0, 0x1, {0x882689e, 0x4}, {0x8827ab7, 0x5}, ...}) /home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/list/list.go:1036 +0x47f github.com/dhth/omm/internal/ui.model.View({0x987cc88, {0x1, {0x882b9c4, 0x7}, {0x882b9cb, 0x7}, {0x0, 0x0}, {0xffa061c7, 0x4}, ...}, ...}) /home/runner/work/omm/omm/internal/ui/view.go:49 +0x10e8 github.com/charmbracelet/bubbletea.(*Program).eventLoop(0x9891280, {0x8fe44b0, 0x9c4a000}, 0x9bce480) /home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:414 +0x6ee github.com/charmbracelet/bubbletea.(*Program).Run(0x9891280) /home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:550 +0xa9d github.com/dhth/omm/internal/ui.RenderUI(0x987cc88, {0x1, {0x882b9c4, 0x7}, {0x882b9cb, 0x7}, {0x0, 0x0}, {0xffa061c7, 0x4}, ...}) /home/runner/work/omm/omm/internal/ui/ui.go:24 +0x244 github.com/dhth/omm/cmd.NewRootCommand.func2(0x992c188, {0x98e2840, 0x0, 0x5}) /home/runner/work/omm/omm/cmd/root.go:254 +0x37c github.com/spf13/cobra.(*Command).execute(0x992c188, {0x981a068, 0x5, 0x5}) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:985 +0xaa0 github.com/spf13/cobra.(*Command).ExecuteC(0x992c188) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x458 github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041 github.com/dhth/omm/cmd.Execute({0x8fe1264, 0x5}) /home/runner/work/omm/omm/cmd/root.go:62 +0xd4 main.main() /home/runner/work/omm/omm/main.go:20 +0x68
The text was updated successfully, but these errors were encountered:
Hi. Thanks for the report. Could you check if the change pushed on this branch fixes things? Thanks.
Sorry, something went wrong.
Forgot to mention, asking you to verify this since I can't seem to reproduce this on my machine (mac arm64).
On native mac:
In a docker container running arm64 linux:
In a docker container running amd64 linux:
Yep, works on that branch!
Successfully merging a pull request may close this issue.
Describe the bug
Adding a task with a prefix of 8 or 9 causes a panic. From further testing some longer lengths like 49 also cause a panic.
Setup
Please complete the following information along with version numbers, if applicable.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No panic.
Screenshots
This is from length 49 but it's always a similar error, just a different index.
The text was updated successfully, but these errors were encountered: