Mar 20, 2014 3:04 PM

I'm getting a NullPointerException when I try to debug a Java process...it doesn't happen all the time though, it might be this particular configuration (which is an individual test in a JUnit test class).

java.lang.NullPointerException

at com.intellij.debugger.ui.breakpoints.BreakpointManager.addBreakpoint(BreakpointManager.java:590)

at com.intellij.javascript.debugger.nashorn.NashornJsBreakpointListener.onBreakpointAdded(NashornJsBreakpointListener.java:42)

at com.intellij.javascript.debugger.nashorn.NashornJsBreakpointListener.<init>(NashornJsBreakpointListener.java:25)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:408)

at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)

at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)

at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)

at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)

at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)

at com.intellij.openapi.components.impl.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:54)

at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.initializeInstance(ServiceManagerImpl.java:159)

at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter$1.compute(ServiceManagerImpl.java:147)

at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)

at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.getComponentInstance(ServiceManagerImpl.java:139)

at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:225)

at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:212)

at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)

at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)

at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:40)

at com.intellij.javascript.debugger.nashorn.NashornJsBreakpointListener.getInstance(NashornJsBreakpointListener.java:36)

at com.intellij.javascript.debugger.nashorn.NashornPositionManagerFactory.createPositionManager(NashornPositionManagerFactory.java:93)

at com.intellij.debugger.impl.DebuggerManagerImpl$3.processAttached(DebuggerManagerImpl.java:241)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:90)

at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:34)

at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:67)

at com.sun.proxy.$Proxy130.processAttached(Unknown Source)

at com.intellij.debugger.engine.DebugProcessEvents.e(DebugProcessEvents.java:321)

at com.intellij.debugger.engine.DebugProcessEvents.commitVM(DebugProcessEvents.java:70)

at com.intellij.debugger.engine.DebugProcessImpl$9$2$1.action(DebugProcessImpl.java:1831)

at com.intellij.debugger.engine.events.DebuggerCommandImpl.run(DebuggerCommandImpl.java:45)

at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.java:151)

at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.java:39)

at com.intellij.debugger.impl.InvokeThread.a(InvokeThread.java:146)

at com.intellij.debugger.impl.InvokeThread.access$100(InvokeThread.java:28)

at com.intellij.debugger.impl.InvokeThread$WorkerThreadRequest.run(InvokeThread.java:55)

at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

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:744)

at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

I deleted all my javascript breakpoints and that seemed to stop it happening for now.

i also have another issue where the IDEA quits unexpectedly. it seems to happen when running JUnit tests, i think where i've run an individual test in a JUnit class, and then when I run the entire JUnit class. There doesn't appear to be anything in the system log and there is no core dump either, as far as i can tell. It's somewhat random, but has happened to me at least 3 or 4 times in the day that i've been running 13.1.

EDIT: actually i did find additional log files, the JVM is segfaulting. I have had the crash on jdk7 and jdk8.