Cannot debug golang in IntelliJ, I get panic: <nil> not an Int

Answered

My golang project builds and runs fine but when I try to run, I get "panic: <nil> not an Int" with the stack trace below.

goroutine 11 [running]:
panic(0x8a6e60, 0xc0450d6ad0)
C:/BuildAgent/work/go/src/runtime/panic.go:500 +0x1af
go/constant.Int64Val(0x0, 0x0, 0x2, 0xc0450f42a0)
C:/BuildAgent/work/go/src/go/constant/value.go:403 +0x1ae
github.com/derekparker/delve/proc.(*Variable).parseG(0xc04207ac40, 0xc04207ac40, 0x0, 0x0)
C:/BuildAgent/work/gopath/src/github.com/derekparker/delve/proc/variables.go:387 +0x6af
github.com/derekparker/delve/proc.(*Thread).GetG(0xc04231c9b0, 0xc04231c9b0, 0x1, 0x0)
C:/BuildAgent/work/gopath/src/github.com/derekparker/delve/proc/threads.go:388 +0x57
github.com/derekparker/delve/proc.(*Thread).SetCurrentBreakpoint(0xc04231c9b0, 0xc042081200, 0xbb5350)
C:/BuildAgent/work/gopath/src/github.com/derekparker/delve/proc/threads.go:445 +0x148
github.com/derekparker/delve/proc.(*Process).setCurrentBreakpoints(0xc04213c5a0, 0xc04231c9b0, 0x0, 0x0)
C:/BuildAgent/work/gopath/src/github.com/derekparker/delve/proc/proc_windows.go:575 +0x47
github.com/derekparker/delve/proc.(*Process).Continue(0xc04213c5a0, 0x1, 0x1)
C:/BuildAgent/work/gopath/src/github.com/derekparker/delve/proc/proc.go:351 +0x187
github.com/derekparker/delve/service/debugger.(*Debugger).Command(0xc042152500, 0xc04398fb48, 0x0, 0x0, 0x0)
C:/BuildAgent/work/gopath/src/github.com/derekparker/delve/service/debugger/debugger.go:413 +0x7c0
github.com/derekparker/delve/service/rpc2.(*RPCServer).Command(0xc0450989f0, 0xc045099c48, 0x8, 0x0, 0x0, 0x31982d0, 0xc0450ada80)
C:/BuildAgent/work/gopath/src/github.com/derekparker/delve/service/rpc2/server.go:101 +0x58
reflect.Value.call(0xc0450a2a20, 0xc042134318, 0x13, 0x956392, 0x4, 0xc0450c4d70, 0x3, 0x3, 0x0, 0x0, ...)
C:/BuildAgent/work/go/src/reflect/value.go:434 +0x5cf
reflect.Value.Call(0xc0450a2a20, 0xc042134318, 0x13, 0xc0450c4d70, 0x3, 0x3, 0x0, 0x0, 0x5364bb)
C:/BuildAgent/work/go/src/reflect/value.go:302 +0xab
created by github.com/derekparker/delve/service/rpccommon.(*ServerImpl).serveJSONCodec
C:/BuildAgent/work/gopath/src/github.com/derekparker/delve/service/rpccommon/server.go:299 +0xa3f

Please sign in to leave a comment.