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

Recordings with true color crash on export #4

Open
valpackett opened this issue May 21, 2023 · 1 comment
Open

Recordings with true color crash on export #4

valpackett opened this issue May 21, 2023 · 1 comment

Comments

@valpackett
Copy link

with this error:

panic: runtime error: index out of range [3355443] with length 256

goroutine 1 [running]:
github.com/mrmarble/termsvg/pkg/color.GetColor(...)
        github.com/mrmarble/termsvg/pkg/color/color.go:14
github.com/mrmarble/termsvg/internal/svg.(*Canvas).getColors(0x84c1bf1c0, {0x20, 0x0, 0x1000000, 0x333333})
        github.com/mrmarble/termsvg/internal/svg/svg.go:80 +0x432
github.com/mrmarble/termsvg/internal/svg.parseCast(0x84c1bf1c0)
        github.com/mrmarble/termsvg/internal/svg/svg.go:65 +0x22b
github.com/mrmarble/termsvg/internal/svg.createCanvas(0x84c1bf420, {{0x2, 0xa0, 0x22, 0x6469703b, 0x40329f0318b9346a, 0x0, {0x0, 0x0}, {0x0, ...}, ...}, ...})
        github.com/mrmarble/termsvg/internal/svg/svg.go:47 +0x1b1
github.com/mrmarble/termsvg/internal/svg.Export({{0x2, 0xa0, 0x22, 0x6469703b, 0x40329f0318b9346a, 0x0, {0x0, 0x0}, {0x0, 0x0}, ...}, ...}, ...)
        github.com/mrmarble/termsvg/internal/svg/svg.go:39 +0xd8
github.com/mrmarble/termsvg/cmd/termsvg/export.export({0x84c014450, 0x2c}, {0x84c014570, 0x30}, 0x1)
        github.com/mrmarble/termsvg/cmd/termsvg/export/export.go:55 +0x1fb

The last commit 1f4eca4 handles >= 1<<24 but there's a lot less entries in colors, namely 256 as the error says…

@MrMarble
Copy link
Owner

I added support for RGB colors on the latest release, could you try again?
If the error persists could you provide the cast file?

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