Issues attaching jcmd and jmap to IntelliJ IDEA

Hi, I'm trying to profile my IntelliJ IDEA plugin but I'm having problems attaching jcmd and jmap to IntelliJ:

I am using OS X 10.9.2 and am using Java 8, IntelliJ IDEA 13.1.1

IntelliJ instance is running as pid 35148

jcmd 35148 help
35148: Command failed in target VM
Same with jmap:

jmap 35148
Attaching to process ID 35148, please wait...
Exception in thread "main" java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(
 at java.lang.reflect.Method.invoke(
Caused by: java.lang.InternalError: void* type hasn't been seen when parsing int*
 at sun.jvm.hotspot.HotSpotTypeDataBase.recursiveCreateBasicPointerType(
 at sun.jvm.hotspot.HotSpotTypeDataBase.lookupType(
 at sun.jvm.hotspot.HotSpotTypeDataBase.lookupOrCreateClass(
 at sun.jvm.hotspot.HotSpotTypeDataBase.createType(
 at sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(
 at sun.jvm.hotspot.HotSpotTypeDataBase.<init>(
 at sun.jvm.hotspot.HotSpotAgent.setupVM(
 at sun.jvm.hotspot.HotSpotAgent.go(
 at sun.jvm.hotspot.HotSpotAgent.attach(
 ... 6 more

I've tried connecting to IntelliJ IDEA Ultimate and Community Edition.

jvisualvm and jconsole work ok as does jstack but I wanted to know if I could get these other tools to work.

1 comment
Comment actions Permalink

In my case this happened with a junit-test process because I used jmap from Java 8, but the process was started from IntelliJ with Java 6.Using the same version of Java on both ends made it work.


See for some related discussion.


Please sign in to leave a comment.