Re: [go-nuts] strconv.ParseFloat panic

2020-11-09 Thread blade...@gmail.com
thanks all, i find a race problem, and fix it. 在2020年11月7日星期六 UTC+8 上午5:28:51 写道: > OK, so you're not using Cgo, that leaves some other unsafe use, a data > race or unlikely some weird compiler bug. > > I'd start looking in api.handleDPriceRange to see where the string > input to

Re: [go-nuts] strconv.ParseFloat panic

2020-11-06 Thread 'Dan Kortschak' via golang-nuts
OK, so you're not using Cgo, that leaves some other unsafe use, a data race or unlikely some weird compiler bug. I'd start looking in api.handleDPriceRange to see where the string input to strconv.ParseFloat is being constructed. On Fri, 2020-11-06 at 01:10 -0800, blade...@gmail.com wrote: > go

Re: [go-nuts] strconv.ParseFloat panic

2020-11-06 Thread blade...@gmail.com
go version is 1.15 , cross compile on darwin and run on linux, i will try to run with race deector 在2020年11月6日星期五 UTC+8 下午4:34:21 写道: > The full panic would help, but somehow you have a string with a nil > pointer that is 4 bytes long. Where is the string generated? Are you > using Cgo?

Re: [go-nuts] strconv.ParseFloat panic

2020-11-06 Thread 'Dan Kortschak' via golang-nuts
The full panic would help, but somehow you have a string with a nil pointer that is 4 bytes long. Where is the string generated? Are you using Cgo? Have you run with the race detector? Also, what version of Go are you using? On Fri, 2020-11-06 at 00:00 -0800, blade...@gmail.com wrote: > i check

[go-nuts] strconv.ParseFloat panic

2020-11-06 Thread blade...@gmail.com
i check my code, and strconv.ParseFloat(s, 64), s is a string, it is correct, but after run my program for a while, it's panic and report some output info. i cant't find why , anyone can help me output infor: panic: runtime error: invalid memory address or nil pointer dereference [signal