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
panic: val: &rt.GoString{Ptr:(unsafe.Pointer)(nil), Len:28} has nil pointer while its length is not zero!
goroutine 10928255 [running]: github.com/bytedance/sonic/encoder.goPanic(0x1, 0xc003002810) /pkg/mod/github.com/bytedance/[email protected]/encoder/errors.go:61 +0xb7 github.com/bytedance/sonic/encoder.encodeTypedPointer(0xc0010c8498, 0x21b9760, 0xc000635950, 0xc0095d4000, 0x0, 0x0, 0xc93) /pkg/mod/github.com/bytedance/[email protected]/encoder/primitives.go:77 +0x16c github.com/bytedance/sonic/encoder.encodeTypedPointer(0xc0010c8498, 0x2156020, 0xc004a685c8, 0xc0095d4000, 0x0, 0xc0010c8498, 0x18) /pkg/mod/github.com/bytedance/[email protected]/encoder/primitives.go:83 +0x1f5 github.com/bytedance/sonic/encoder.encodeInto(0xc0010c8498, 0x2156020, 0xc001124480, 0x0, 0x1, 0x18) /pkg/mod/github.com/bytedance/[email protected]/encoder/encoder.go:211 +0xdf github.com/bytedance/sonic/encoder.EncodeInto(0xc0010c8498, 0x2156020, 0xc001124480, 0x0, 0x7fd081b405b8, 0x40) /pkg/mod/github.com/bytedance/[email protected]/encoder/encoder.go:200 +0x4d github.com/bytedance/sonic/encoder.(*StreamEncoder).Encode(0xc008a55a20, 0x2156020, 0xc001124480, 0x2715eb4, 0x1d) /pkg/mod/github.com/bytedance/[email protected]/encoder/stream.go:42 +0xdd log.(*jsonFormatter).Format(0x414d638, 0xc006a4a190, 0xc005acab08, 0x2, 0x2, 0xc006938120, 0x21)
type Data struct { Msg string `json:"msg"` .... } if err := encoder.NewStreamEncoder(buf).Encode(&struct { *Data Extra int `json:"extra"` }{ Data: data, Extra: extra, }); err != nil { return nil, err } return buf.Bytes(), nil
The text was updated successfully, but these errors were encountered:
maybe have a concurrency problem, you could use -race to check it
-race
Sorry, something went wrong.
No branches or pull requests
panic: val: &rt.GoString{Ptr:(unsafe.Pointer)(nil), Len:28} has nil pointer while its length is not zero!
goroutine 10928255 [running]:
github.com/bytedance/sonic/encoder.goPanic(0x1, 0xc003002810)
/pkg/mod/github.com/bytedance/[email protected]/encoder/errors.go:61 +0xb7
github.com/bytedance/sonic/encoder.encodeTypedPointer(0xc0010c8498, 0x21b9760, 0xc000635950, 0xc0095d4000, 0x0, 0x0, 0xc93)
/pkg/mod/github.com/bytedance/[email protected]/encoder/primitives.go:77 +0x16c
github.com/bytedance/sonic/encoder.encodeTypedPointer(0xc0010c8498, 0x2156020, 0xc004a685c8, 0xc0095d4000, 0x0, 0xc0010c8498, 0x18)
/pkg/mod/github.com/bytedance/[email protected]/encoder/primitives.go:83 +0x1f5
github.com/bytedance/sonic/encoder.encodeInto(0xc0010c8498, 0x2156020, 0xc001124480, 0x0, 0x1, 0x18)
/pkg/mod/github.com/bytedance/[email protected]/encoder/encoder.go:211 +0xdf
github.com/bytedance/sonic/encoder.EncodeInto(0xc0010c8498, 0x2156020, 0xc001124480, 0x0, 0x7fd081b405b8, 0x40)
/pkg/mod/github.com/bytedance/[email protected]/encoder/encoder.go:200 +0x4d
github.com/bytedance/sonic/encoder.(*StreamEncoder).Encode(0xc008a55a20, 0x2156020, 0xc001124480, 0x2715eb4, 0x1d)
/pkg/mod/github.com/bytedance/[email protected]/encoder/stream.go:42 +0xdd
log.(*jsonFormatter).Format(0x414d638, 0xc006a4a190, 0xc005acab08, 0x2, 0x2, 0xc006938120, 0x21)
The text was updated successfully, but these errors were encountered: