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

CreateTable导致panic,建议做错误检查,返回error,直接运行时panic不妥当 #81

Open
swzry opened this issue Mar 5, 2021 · 0 comments

Comments

@swzry
Copy link

swzry commented Mar 5, 2021

`
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7509e5]

goroutine 1 [running]:
github.com/aliyun/aliyun-tablestore-go-sdk/tablestore.(*TableStoreClient).CreateTable(0xc000122000, 0xc0000cbeb0, 0x4, 0x4, 0x5)
D:/GoLang/GoWork/src/github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/api.go:348 +0x965
main.CreateTable(0xc000122000, 0x31, 0x84e146)
D:/GoLang/GoWork/src/local_no_vcs/OTSTest202103040238/main.go:42 +0x5ef
main.main()
D:/GoLang/GoWork/src/local_no_vcs/OTSTest202103040238/main.go:17 +0xad
`

相关的上下文(github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/api.go 348行附近):
`
346 req.ReservedThroughput = new(otsprotocol.ReservedThroughput)
347 req.ReservedThroughput.CapacityUnit = new(otsprotocol.CapacityUnit)
348 req.ReservedThroughput.CapacityUnit.Read = proto.Int32(int32(request.ReservedThroughput.Readcap))
349 req.ReservedThroughput.CapacityUnit.Write = proto.Int32(int32(request.ReservedThroughput.Writecap))

`

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