Closed dohzya closed 1 year ago
Tala panics when I try to generate a svg from this content:
# generated at 2023-04-14T09:36:16.817Z ____header: |||md Index ||| { near: top-center } ____body: |||md [HLD](hld/index.svg) | [LLD](lld/index.svg) |||
% cat perdu.d2 # generated at 2023-04-14T09:36:16.817Z ____header: |||md Index ||| { near: top-center } ____body: |||md [HLD](hld/index.svg) | [LLD](lld/index.svg) ||| % d2 --layout=tala perdu.d2 err: failed to compile: exit status 2 err: stderr: err: panic: runtime error: invalid memory address or nil pointer dereference err: [signal SIGSEGV: segmentation violation code=0x2 addr=0x40 pc=0x10592a6f0] err: err: goroutine 67 [running]: err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler.PopulateNodes.func3(0x14000e09450, 0x18?) err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler/d2transpiler.go:87 +0xd0 err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler.PopulateNodes.func1(0x14000e09450, 0x0?, 0x14000c94f30) err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler/d2transpiler.go:37 +0x38 err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler.PopulateNodes.func1(0x14000e08000, 0x57199f883bccd?, 0x14000c94f30) err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler/d2transpiler.go:40 +0x7c err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler.PopulateNodes({0x14000d2ba98?, 0x104c53df4?}, 0x140008fd970, 0x14000caafc0) err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler/d2transpiler.go:82 +0x204 err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler.RaceSeeds({0x106a76418, 0x14000a3c780}, 0x106a76418?, 0x14000caafc0, {0x14000580760, 0x3, 0x140001e6e40?}, 0x0, 0x0) err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler/d2transpiler.go:155 +0xa8 err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler.Layout({0x106a76418, 0x14000a3c780}, 0x0?, 0x0?) err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler/d2transpiler.go:317 +0x244 err: main.talaPlugin.Layout({0x14000c84540?, 0x14000c33d40?}, {0x106a76418?, 0x14000a3c780?}, 0x0?) err: github.com/terrastruct/src/backend/tala/cmd/d2plugin-tala/plugin_tala.go:161 +0x100 err: oss.terrastruct.com/d2/d2plugin.layout({0x106a76418, 0x14000a3c780}, {0x106a79660, 0x1400093ed60}, 0x140003c8d90) err: oss.terrastruct.com/d2@v0.2.7-0.20230330041458-114e91c4a4f4/d2plugin/serve.go:106 +0x94 err: oss.terrastruct.com/d2/d2plugin.Serve.func1({0x106a76418, 0x14000a3c780}, 0x140003c8d90) err: oss.terrastruct.com/d2@v0.2.7-0.20230330041458-114e91c4a4f4/d2plugin/serve.go:56 +0x2b8 err: oss.terrastruct.com/util-go/xmain.(*State).Main.func1() err: oss.terrastruct.com/util-go@v0.0.0-20230320053557-dcb5aac7d972/xmain/xmain.go:105 +0x68 err: created by oss.terrastruct.com/util-go/xmain.(*State).Main err: oss.terrastruct.com/util-go@v0.0.0-20230320053557-dcb5aac7d972/xmain/xmain.go:103 +0x110 %
brew upgrade
% d2 --version 0.4.0 % d2plugin-tala --version v0.3.5
tala v0.3.5 isn't fully compatible with d2 v0.4.0, but this works with d2 v0.3.0 and the next tala release will be compatible with d2 0.4.0
should be fixed now with new release
Tala panics when I try to generate a svg from this content:
Example
Other info
brew upgrade
is concerned