rutime.panic
zd3nik opened this issue · comments
Hi Michael.
Saw your announcement about v2.0 on talkchess.com and decided to give it a try. Rest assured it's working under Arena. But when I run it from the command line I get a runtime panic when I issue the go command. I'm using the 64-bit linux build.
$ ls -l donna-2.0-linux-64
-rwxr-x--x. 1 schidester schidester 6232216 May 9 17:28 donna-2.0-linux-64
$ sha1sum donna-2.0-linux-64
932ba18d48000b6ebfbcba674acdb8a30266f80b donna-2.0-linux-64
$ ./donna-2.0-linux-64
uci
Donna v2.0 Copyright (c) 2014-2015 by Michael Dvorkin. All Rights Reserved.
id name Donna 2.0
id author Michael Dvorkin
uciok
isready
readyok
setposition startpos
go
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x436bac]
goroutine 16 [running]:
runtime.panic(0x543640, 0x902d93)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
github.com/michaeldv/donna.(_Game).Think(0x0, 0xc200000000)
/Users/laura/Source/Go/src/github.com/michaeldv/donna/game.go:106 +0x8c
github.com/michaeldv/donna.func·013(0xc208000620, 0x0, 0x0)
/Users/laura/Source/Go/src/github.com/michaeldv/donna/engine_uci.go:199 +0x22b
github.com/michaeldv/donna.(_Engine).Uci(0x907740, 0xa)
/Users/laura/Source/Go/src/github.com/michaeldv/donna/engine_uci.go:232 +0x6a3
main.main()
/Users/laura/Source/Go/src/github.com/michaeldv/donna/cmd/donna.go:28 +0x3f8
goroutine 19 [finalizer wait]:
runtime.park(0x413060, 0x906db0, 0x9058c9)
/usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x906db0, 0x9058c9)
/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
Same thing happens if I give wtime and btime values to the go command. Does it require a particular set of parameters be passed to the go command?
Thanks,
STC
Yeah I am getting a similar error when running in the command line. I am using Windows.
I got it to work in Windows. Just download the source and type $ go build -o ./bin/donna -gcflags -B github.com/michaeldv/donna/cmd/donna and then go into the bin folder and run ./donna -i. I was using the git terminal so I was able to run unix like commands.
Confirmed. Donna panics in uci move but not interactive mode.
Looks like game is nil in uci mode unless a position command is successfully executed first.