go-delve / delve

Delve is a debugger for the Go programming language.
MIT License
22.96k stars 2.14k forks source link

number format execption when starting delve from Intellij #606

Closed keith198 closed 8 years ago

keith198 commented 8 years ago

Please answer the following before submitting your issue:

Note: Please include any substantial examples (debug session output, stacktraces, etc) as linked gists.

  1. What version of Delve are you using (dlv version)? the one bundled with ij plugin C:\Users\f059375.IdeaIC2016.2\config\plugins\Go\lib\dlv\windows\dlv.exe
  2. What version of Go are you using? (go version)? tired with both 1.6 and 1.7
  3. What operating system and processor architecture are you using? windows 7 64 bit
  4. What did you do? clicked debug on run configuration for hello app (file)
  5. What did you expect to see? stop at break point
  6. What did you see instead? C:\Users\f059375.IdeaIC2016.2\config\plugins\Go\lib\dlv\windows\dlv.exe --listen=localhost:49927 --headless=true exec C:\Users\f059375\AppData\Local\Temp\HelloWorldgo -- GOROOT=C:/GO GOPATH=C:/GO;C:/Users/f059375/myGo C:/GO\bin\go.exe build -o C:\Users\f059375\AppData\Local\Temp\HelloWorldgo -gcflags "-N -l" C:\Users\f059375\myGo\HelloWorld\src\hello.go API server listening at: 127.0.0.1:49927

with log having below exception (see PC value) 2016-08-02 15:55:18,129 [1531626] INFO - #com.goide.dlv.DlvVm - OUT: {"method":"RPCServer.Command","params":[{"Name":"continue"}],"id":1} 2016-08-02 15:55:18,150 [1531647] INFO - #com.goide.dlv.DlvVm - IN: {"id":1,"result":{"currentThread":{"id":19340,"pc":8791751565421,"file":"","line":0,"goroutineID":0,"breakPointInfo":null},"Threads":[{"id":19340,"pc":8791751565421,"file":"","line":0,"goroutineID":0,"breakPointInfo":null}],"NextInProgress":false,"exited":false,"exitStatus":0},"error":null} 2016-08-02 15:55:18,188 [1531685] INFO - #com.goide.dlv.DlvDebugProcess - java.lang.NumberFormatException: Expected an int but was 8791751565421 at line 1 column 48 path $.currentThread.pc com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 8791751565421 at line 1 column 48 path $.currentThread.pc at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:249) at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:239) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:217) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:217) at com.google.gson.Gson.fromJson(Gson.java:861) at com.goide.dlv.DlvCommandProcessor.readResult(DlvCommandProcessor.java:84) at com.goide.dlv.DlvCommandProcessor.readResult(DlvCommandProcessor.java:36) at org.jetbrains.rpc.RequestPromise.onSuccess(CommandSenderBase.kt:45) at com.goide.dlv.DlvCommandProcessor.call(DlvCommandProcessor.java:59) at com.goide.dlv.DlvCommandProcessor.call(DlvCommandProcessor.java:36) at org.jetbrains.rpc.MessageManager.processIncoming(MessageManager.kt:102) at com.goide.dlv.DlvCommandProcessor.processIncomingJson(DlvCommandProcessor.java:53) at com.goide.dlv.DlvVm$2.messageReceived(DlvVm.java:61) at org.jetbrains.io.SimpleChannelInboundHandlerAdapter.channelRead0(SimpleChannelInboundHandlerAdapter.java:20) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:334) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:326) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:334) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:326) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1320) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:334) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:905) at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:162) at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:38) at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:67) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:742) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NumberFormatException: Expected an int but was 8791751565421 at line 1 column 48 path $.currentThread.pc at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1179) at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:247) ... 35 more 2016-08-02 15:57:41,101 [1674598] INFO - #com.goide.dlv.DlvVm - OUT: {"method":"RPCServer.CreateBreakpoint","params":[{"file":"C:/Users/f059375/myGo/HelloWorld/src/hello.go","line":6}],"id":2} 2016-08-02 15:57:41,211 [1674708] INFO - #com.goide.dlv.DlvVm - IN: {"id":2,"result":{"id":1,"name":"","addr":4198497,"file":"C:/Users/f059375/myGo/HelloWorld/src/hello.go","line":6,"functionName":"main.main","Cond":"","continue":false,"goroutine":false,"stacktrace":0,"LoadArgs":null,"LoadLocals":null,"hitCount":{},"totalHitCount":0},"error":null}

aarzilli commented 8 years ago

The IntelliJ plugin is developed in another repository: https://github.com/go-lang-plugin-org/go-lang-idea-plugin cc @dlsniper

dlsniper commented 8 years ago

@aarzilli thanks for ping, I've opened: https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/2706 you can close this for now. @keith198 please add an example to reproduce in the at issue. Thanks all.