Closed brian6932 closed 5 months ago
Seems to be the colors, I only support xterm colors and one of your colors is outside that range.
Looking at the cast file, is when you type | ttyper-
, that r-
has the color in rgb? you can see it in the cast file \u001b[38;2;68;68;68mr -"]
.
I'll try and support that format
Works, maybe #4 is related to this?
Works, maybe #4 is related to this?
It might be, good catch
File in #8 will cause this.
stack 1
``` ❯ termsvg export file.cast unexpected fault address 0x4a5e0c8 fatal error: fault [signal 0xc0000005 code=0x0 addr=0x4a5e0c8 pc=0x247804] goroutine 1 gp=0xc000068000 m=0 mp=0x61efc0 [running]: runtime.throw({0x3e0839?, 0xc0000a50e8?}) runtime/panic.go:1023 +0x65 fp=0xc0000a4e90 sp=0xc0000a4e60 pc=0x102305 runtime.sigpanic() runtime/signal_windows.go:414 +0xca fp=0xc0000a4ec0 sp=0xc0000a4e90 pc=0x116f6a github.com/mrmarble/termsvg/pkg/color.GetColor(0x390680?) github.com/mrmarble/termsvg/pkg/color/color.go:14 +0x24 fp=0xc0000a4ec8 sp=0xc0000a4ec0 pc=0x247804 github.com/mrmarble/termsvg/internal/svg.(*Canvas).getColors(0xc0000a5038, {0x1e600?, 0xc0?, 0x5c?, 0x0?}) github.com/mrmarble/termsvg/internal/svg/svg.go:98 +0x25 fp=0xc0000a4f30 sp=0xc0000a4ec8 pc=0x2484a5 github.com/mrmarble/termsvg/internal/svg.parseCast(0xc0000a5038) github.com/mrmarble/termsvg/internal/svg/svg.go:91 +0x13a fp=0xc0000a4fc0 sp=0xc0000a4f30 pc=0x24841a github.com/mrmarble/termsvg/internal/svg.createCanvas(0xc0001bc570, {{0x2, 0x79, 0x2a, 0x66477b02, 0x4022c9b140000000, 0x 0, {0x0, 0x0}, {0x0, ...}, ...}, ...}, ...) github.com/mrmarble/termsvg/internal/svg/svg.go:57 +0x14a fp=0xc0000a5248 sp=0xc0000a4fc0 pc=0x24800a github.com/mrmarble/termsvg/internal/svg.Export({{0x2, 0x79, 0x2a, 0x66477b02, 0x4022c9b140000000, 0x0, {0x0, 0x0}, {0x0, 0x0}, ...}, ...}, ...) github.com/mrmarble/termsvg/internal/svg/svg.go:49 +0x105 fp=0xc0000a52f0 sp=0xc0000a5248 pc=0x247de5 github.com/mrmarble/termsvg/cmd/termsvg/export.export({0xc000018588?, 0xc00000b568?}, {0xc000016cc0, 0x1c}, 0x0, {0x0, 0x 0}, {0x0, 0x0}, 0x0) github.com/mrmarble/termsvg/cmd/termsvg/export/export.go:73 +0x36b fp=0xc0000a5520 sp=0xc0000a52f0 pc=0x35368b github.com/mrmarble/termsvg/cmd/termsvg/export.(*Cmd).Run(0xc00003c338?) github.com/mrmarble/termsvg/cmd/termsvg/export/export.go:29 +0x85 fp=0xc0000a5590 sp=0xc0000a5520 pc=0x3532a5 runtime.call16(0xc000195830, 0xc000072188, 0x0, 0x0, 0x0, 0x8, 0xc0000a5868) runtime/asm_amd64.s:770 +0x48 fp=0xc0000a55b0 sp=0xc0000a5590 pc=0x132808 runtime.reflectcall(0x38bfa0?, 0xc00003c338?, 0x1?, 0xa5868?, 0xc0?, 0x1?, 0x1?)stack 2
``` ❯ termsvg export file2.cast -o file2.svg unexpected fault address 0x4a5e0c8 fatal error: fault [signal 0xc0000005 code=0x0 addr=0x4a5e0c8 pc=0x247804] goroutine 1 gp=0xc000068000 m=0 mp=0x61efc0 [running]: runtime.throw({0x3e0839?, 0xc0000a50e8?}) runtime/panic.go:1023 +0x65 fp=0xc0000a4e90 sp=0xc0000a4e60 pc=0x102305 runtime.sigpanic() runtime/signal_windows.go:414 +0xca fp=0xc0000a4ec0 sp=0xc0000a4e90 pc=0x116f6a github.com/mrmarble/termsvg/pkg/color.GetColor(0x390680?) github.com/mrmarble/termsvg/pkg/color/color.go:14 +0x24 fp=0xc0000a4ec8 sp=0xc0000a4ec0 pc=0x247804 github.com/mrmarble/termsvg/internal/svg.(*Canvas).getColors(0xc0000a5038, {0x1e780?, 0xc0?, 0x5c?, 0x0?}) github.com/mrmarble/termsvg/internal/svg/svg.go:98 +0x25 fp=0xc0000a4f30 sp=0xc0000a4ec8 pc=0x2484a5 github.com/mrmarble/termsvg/internal/svg.parseCast(0xc0000a5038) github.com/mrmarble/termsvg/internal/svg/svg.go:91 +0x13a fp=0xc0000a4fc0 sp=0xc0000a4f30 pc=0x24841a github.com/mrmarble/termsvg/internal/svg.createCanvas(0xc0001ba5a0, {{0x2, 0x79, 0x2a, 0x66477b02, 0x4022917f78000000, 0x 0, {0x0, 0x0}, {0x0, ...}, ...}, ...}, ...) github.com/mrmarble/termsvg/internal/svg/svg.go:57 +0x14a fp=0xc0000a5248 sp=0xc0000a4fc0 pc=0x24800a github.com/mrmarble/termsvg/internal/svg.Export({{0x2, 0x79, 0x2a, 0x66477b02, 0x4022917f78000000, 0x0, {0x0, 0x0}, {0x0, 0x0}, ...}, ...}, ...) github.com/mrmarble/termsvg/internal/svg/svg.go:49 +0x105 fp=0xc0000a52f0 sp=0xc0000a5248 pc=0x247de5 github.com/mrmarble/termsvg/cmd/termsvg/export.export({0xc000016c80?, 0xc00000b618?}, {0xc000016ca0, 0x1a}, 0x0, {0x0, 0x 0}, {0x0, 0x0}, 0x0) github.com/mrmarble/termsvg/cmd/termsvg/export/export.go:73 +0x36b fp=0xc0000a5520 sp=0xc0000a52f0 pc=0x35368b github.com/mrmarble/termsvg/cmd/termsvg/export.(*Cmd).Run(0x16775d?) github.com/mrmarble/termsvg/cmd/termsvg/export/export.go:29 +0x85 fp=0xc0000a5590 sp=0xc0000a5520 pc=0x3532a5 runtime.call16(0xc000195830, 0xc000072178, 0x0, 0x0, 0x0, 0x8, 0xc0000a5868) runtime/asm_amd64.s:770 +0x48 fp=0xc0000a55b0 sp=0xc0000a5590 pc=0x132808 runtime.reflectcall(0x38bfa0?, 0xc00003c3b8?, 0x1?, 0xa5868?, 0xc0?, 0x1?, 0x1?)