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

unable to use entviz : nil pointer dereference in atlas/sql #4

Open
timebis opened this issue Dec 11, 2024 · 0 comments
Open

unable to use entviz : nil pointer dereference in atlas/sql #4

timebis opened this issue Dec 11, 2024 · 0 comments

Comments

@timebis
Copy link

timebis commented Dec 11, 2024

I use entgo with a valid schema located in ./ent/schema
I am not able to use go run -mod=mod ariga.io/entviz ./ent/schema

Simple repro :

mkdir simpleRepro
go mod init entdemo
go run -mod=mod entgo.io/ent/cmd/ent new User
go run -mod=mod ariga.io/entviz ./ent/schema
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x91add3]

goroutine 1 [running]:
ariga.io/atlas/sql/internal/specutil.FromTable(0xc0003aa2c0, 0xf249e0, 0xf249a8, 0xf24a30, 0xf24758, 0xf24870)
        /home/thomas/go/pkg/mod/ariga.io/[email protected]/sql/internal/specutil/convert.go:634 +0x513
ariga.io/atlas/sql/sqlite.tableSpec(0xc0003aa2c0)
        /home/thomas/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/sqlspec.go:173 +0x4a
ariga.io/atlas/sql/internal/specutil.FromSchema(0xc0003aa370, 0xc0003f7b28)
        /home/thomas/go/pkg/mod/ariga.io/[email protected]/sql/internal/specutil/convert.go:542 +0x20a
ariga.io/atlas/sql/sqlite.schemaSpec(0x0?)
        /home/thomas/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/sqlspec.go:165 +0x3f
ariga.io/atlas/sql/internal/specutil.Marshal({0xe0d040, 0xc0003aa370}, {0x10116a0, 0xc0002fe140}, {0xf24a50?, 0xf24a68?})
        /home/thomas/go/pkg/mod/ariga.io/[email protected]/sql/internal/specutil/spec.go:63 +0xfe
ariga.io/atlas/sql/sqlite.MarshalSpec(...)
        /home/thomas/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/sqlspec.go:69
ariga.io/atlas/sql/sqlite.init.func1({0xe0d040?, 0xc0003aa370?})
        /home/thomas/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/sqlspec.go:297 +0x39
ariga.io/atlas/schemahcl.MarshalerFunc.MarshalSpec(0x1?, {0xe0d040?, 0xc0003aa370?})
        /home/thomas/go/pkg/mod/ariga.io/[email protected]/schemahcl/spec.go:414 +0x26
ariga.io/entviz/internal/entviz.HCL({0x10197a8, 0xc000344c40}, {{0x7ffc331f9de1, 0xc}, {0xe3e65b, 0x7}, {0xe9b128, 0x2d}, 0x0})
        /home/thomas/go/pkg/mod/ariga.io/[email protected]/internal/entviz/entviz.go:105 +0x5a3
main.main()
        /home/thomas/go/pkg/mod/ariga.io/[email protected]/main.go:41 +0x293
exit status 2

do you have an idea, where does it come from ?

@timebis timebis changed the title unable to use entviz : nil pointer deregerence in atlas/sql unable to use entviz : nil pointer dereference in atlas/sql Dec 17, 2024
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

1 participant