This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 129390

Summary: [65cat] com.sun.jdi.VMDisconnectedException: connection is closed
Product: debugger Reporter: pribyl <pribyl>
Component: JavaAssignee: Daniel Prusa <dprusa>
Status: CLOSED FIXED    
Severity: blocker CC: abhsax130778, aregan, davti, dkolar, emanuelcd, joaomassan, kharezlak, martinadaxo, mmirilovic, pchytil, rodrickjackson, rsh2009, sunbiz, sweetsweet24, toster
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=3176
Issue Type: DEFECT Exception Reporter: 3176
Attachments: stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace

Description pribyl 2008-03-06 13:21:56 UTC
Build: NetBeans IDE Dev (Build 200803050006)
VM: Java HotSpot(TM) Client VM, 10.0-b19
OS: SunOS, 5.10, x86

User Comments: 
When working with a debugger, I pressed "Step into" icon on the debugger panel. I am not sure what caused the exception - it happened to me for the first time
Comment 1 pribyl 2008-03-06 13:22:01 UTC
Created attachment 57871 [details]
stacktrace
Comment 2 Martin Entlicher 2008-03-10 16:22:49 UTC
The connection with the debugged application was lost. The application has finished or crashed or there was a network
problem. This exception does not have any negative impact. We would have to add a catch for VMDisconnectedException to
every JDI call to prevent from this. But that would likely reqiure a change of the threading of JDI calls, places where
we call JDI are spread accross the debuggerjpda module.
Comment 3 axiomsofchoice 2008-04-10 17:18:20 UTC
Build: NetBeans IDE Dev (Build 200804050004)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12
OS: Windows XP, 5.1, x86

User Comments: 
Stopped Debugging
Comment 4 axiomsofchoice 2008-04-10 17:18:23 UTC
Created attachment 60000 [details]
stacktrace
Comment 5 Exceptions Reporter 2008-04-19 18:07:32 UTC
This issue has already 10 duplicates 
Comment 6 davideconsonni 2008-06-06 10:07:47 UTC
Created attachment 62454 [details]
stacktrace
Comment 7 pribyl 2008-06-10 09:17:41 UTC
*** Issue 136777 has been marked as a duplicate of this issue. ***
Comment 8 pribyl 2008-06-10 09:23:36 UTC
Additional comment:
When working with the new debugging view, this Exception is being thrown quite often (see issue 136777 for example)
Comment 9 Peter Pis 2008-06-12 12:35:47 UTC
Created attachment 62747 [details]
stacktrace
Comment 10 Martin Fousek 2008-06-16 15:33:55 UTC
Created attachment 62875 [details]
stacktrace
Comment 11 Peter Pis 2008-06-17 13:41:15 UTC
Created attachment 62923 [details]
stacktrace
Comment 12 Martin Entlicher 2008-06-17 15:25:48 UTC
*** Issue 136883 has been marked as a duplicate of this issue. ***
Comment 13 Martin Entlicher 2008-06-17 15:28:46 UTC
Changing from P4 to P3 - it has a lot of duplicates.
Comment 14 Martin Entlicher 2008-06-17 15:33:33 UTC
*** Issue 137425 has been marked as a duplicate of this issue. ***
Comment 15 Martin Entlicher 2008-06-17 16:28:04 UTC
Known JDI issues that can affect this are:

VMDisconnectedException can wrongly be thrown if thread using JDI is interrupted
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6514055

JDI ThreadReference.frameCount() fails when thread is sleeping
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4783403

But now I get VMDisconnectedException from ThreadReferenceImpl.frameCount() called on a thread, which is suspended on a
breakpoint! I can continue stepping in it and get a new VMDisconnectedException after a step. The exception can not mean
that the debugger was disconnected from the debuggee here.
Comment 16 Martin Entlicher 2008-06-18 13:58:26 UTC
*** Issue 136628 has been marked as a duplicate of this issue. ***
Comment 17 Martin Entlicher 2008-06-18 17:41:47 UTC
I'm able to 100% reproduce this using steps from http://www.netbeans.org/issues/show_bug.cgi?id=136777.
It looks like there has appeared some thread from the first debugging session, which is already disconnected. Therefore
the VMDisconnectedException.
Comment 18 Martin Entlicher 2008-06-18 22:44:02 UTC
The attached cases hopefully fixed in trunk:
http://hg.netbeans.org/main/rev/3572328a4ec7
http://hg.netbeans.org/main/rev/398ba5619fb3
Comment 19 Quality Engineering 2008-06-19 04:28:40 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #268 build
Changeset: http://hg.netbeans.org/main/rev/3572328a4ec7
User: mentlicher@netbeans.org
Log: #129390 - Destroy the old nodes when a new root context is set.
This prevents from leaking the nodes and models and also fixes VMDisconnectedException that was thrown from leaked objects.
Comment 20 Daniel Prusa 2008-06-19 16:08:33 UTC
*** Issue 137735 has been marked as a duplicate of this issue. ***
Comment 21 Dan Kolar 2008-06-24 10:40:21 UTC
Still reproducible by steps in issue 136777 in (Build 200806230002)
Comment 22 _ krystyna 2008-06-25 01:13:57 UTC
Created attachment 63382 [details]
stacktrace
Comment 23 Petr Cyhelsky 2008-07-02 08:39:35 UTC
*** Issue 138601 has been marked as a duplicate of this issue. ***
Comment 24 Tomas Mysik 2008-07-02 21:25:02 UTC
Created attachment 63844 [details]
stacktrace
Comment 25 Daniel Prusa 2008-07-03 16:11:35 UTC
Fixed.
changeset 157c86db6cbc in main
details: http://hg.netbeans.org/main?cmd=changeset;node=157c86db6cbc
Comment 26 Quality Engineering 2008-07-04 04:31:50 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #298 build
Changeset: http://hg.netbeans.org/main/rev/157c86db6cbc
User: Daniel Prusa <dprusa@netbeans.org>
Log: #129390: com.sun.jdi.VMDisconnectedException fixed
Comment 27 azizi 2008-07-17 13:56:59 UTC
i found that this bug is exist in Netbeans 6.5 too.

Build: NetBeans IDE Dev (Build 200807040101)
OS: Ubuntu linux
Comment 28 azizi 2008-07-17 13:58:47 UTC
reported in Exception 3176 by me (azizi)
Comment 29 sunbiz 2008-07-19 13:29:11 UTC
Build: NetBeans IDE Dev (Build 200807170007)
VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25
OS: Windows Vista, 6.0, x86

User Comments: 
Clicked on Stop Debug of MIDP Application and then clicked manual GC icon
Comment 30 sunbiz 2008-07-19 13:29:20 UTC
Created attachment 65027 [details]
stacktrace
Comment 31 Kenneth Ganfield 2008-07-23 11:11:04 UTC
Build: NetBeans IDE Dev (Build 200807221016)
VM: Java HotSpot(TM) Client VM, 1.5.0_13-121, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05-241
OS: Mac OS X, 10.4.11, i386

User Comments: 
Comment 32 Kenneth Ganfield 2008-07-23 11:11:15 UTC
Created attachment 65346 [details]
stacktrace
Comment 33 karmagfa 2008-07-24 15:14:56 UTC
Build: NetBeans IDE Dev (Build 200807221016)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
com.sun.jdi.VMDisconnectedException
        at com.sun.tools.jdi.TargetVM.waitForReply(TargetVM.java:285)
        at com.sun.tools.jdi.VirtualMachineImpl.waitForTargetReply(VirtualMachineImpl.java:1015)
        at com.sun.tools.jdi.PacketStream.waitForReply(PacketStream.java:51)
        at com.sun.tools.jdi.JDWP$ThreadGroupReference$Children.waitForReply(JDWP.java:5903)
        at com.sun.tools.jdi.JDWP$ThreadGroupReference$Children.process(JDWP.java:5884)
        at com.sun.tools.jdi.ThreadGroupReferenceImpl.kids(ThreadGroupReferenceImpl.java:107)
Comment 34 karmagfa 2008-07-24 15:14:57 UTC
Build: NetBeans IDE Dev (Build 200807221016)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
com.sun.jdi.VMDisconnectedException
Comment 35 karmagfa 2008-07-24 15:15:07 UTC
Created attachment 65540 [details]
stacktrace
Comment 36 Michel Graciano 2008-07-24 22:30:40 UTC
Build: NetBeans IDE Dev (Build 200807221016)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Linux, 2.6.24-20-generic, i386

User Comments: 


Stacktrace: 
com.sun.jdi.VMDisconnectedException: connection is closed
        at com.sun.tools.jdi.TargetVM.send(TargetVM.java:274)
        at com.sun.tools.jdi.VirtualMachineImpl.sendToTarget(VirtualMachineImpl.java:1011)
        at com.sun.tools.jdi.PacketStream.send(PacketStream.java:41)
        at com.sun.tools.jdi.JDWP$ThreadReference$FrameCount.enqueueCommand(JDWP.java:5300)
        at com.sun.tools.jdi.JDWP$ThreadReference$FrameCount.process(JDWP.java:5286)
        at com.sun.tools.jdi.ThreadReferenceImpl.frameCount(ThreadReferenceImpl.java:254)
Comment 37 Michel Graciano 2008-07-24 22:30:48 UTC
Created attachment 65589 [details]
stacktrace
Comment 38 Michel Graciano 2008-07-24 22:37:47 UTC
Again for 6.5... updated the TM.
Comment 39 ulfzibis 2008-07-26 22:22:29 UTC
Build: NetBeans IDE Dev (Build 200807040101)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Windows XP, 5.1, x86

User Comments: 
Tried to debug

Stacktrace: 
com.sun.jdi.VMDisconnectedException: connection is closed
        at com.sun.tools.jdi.TargetVM.send(TargetVM.java:274)
        at com.sun.tools.jdi.VirtualMachineImpl.sendToTarget(VirtualMachineImpl.java:1011)
        at com.sun.tools.jdi.PacketStream.send(PacketStream.java:41)
        at com.sun.tools.jdi.JDWP$EventRequest$Set.enqueueCommand(JDWP.java:6765)
        at com.sun.tools.jdi.JDWP$EventRequest$Set.process(JDWP.java:6735)
        at com.sun.tools.jdi.EventRequestManagerImpl$EventRequestImpl.set(EventRequestManagerImpl.java:179)
Comment 40 ulfzibis 2008-07-26 22:22:40 UTC
Created attachment 65728 [details]
stacktrace
Comment 41 Marian Mirilovic 2008-07-27 14:37:13 UTC
More than 50 duplicates reported for builds after 20080704
Comment 42 Peter Pis 2008-07-27 18:56:49 UTC
Many duplicates. Should be fixed.
Comment 43 Daniel Prusa 2008-07-29 17:09:50 UTC
Nearly all reported VMDisconnectedExceptions fixed. It remains to investigate two more thrown at the following methods:

..jpda.JPDADebuggerImpl.initGenericsSupport(JPDADebuggerImpl.java:1259)
..jpda.ui.CurrentThreadAnnotationListener$AllThreadsAnnotator.<init>(CurrentThreadAnnotationListener.java:381)

Additional fixes:
changeset 1ffb242fe33b in main
details: http://hg.netbeans.org/main?cmd=changeset;node=1ffb242fe33b
changeset bd6d1aa3cbea in main
details: http://hg.netbeans.org/main?cmd=changeset;node=bd6d1aa3cbea
Comment 44 ranbato 2008-07-29 23:18:47 UTC
Build: NetBeans IDE Dev (Build 200807281401)
VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
com.sun.jdi.VMDisconnectedException: Connection closed
        at com.sun.tools.jdi.TargetVM.send(TargetVM.java:274)
        at com.sun.tools.jdi.VirtualMachineImpl.sendToTarget(VirtualMachineImpl.java:1011)
        at com.sun.tools.jdi.PacketStream.send(PacketStream.java:41)
        at com.sun.tools.jdi.JDWP$ThreadGroupReference$Name.enqueueCommand(JDWP.java:5790)
        at com.sun.tools.jdi.JDWP$ThreadGroupReference$Name.process(JDWP.java:5776)
        at com.sun.tools.jdi.ThreadGroupReferenceImpl.name(ThreadGroupReferenceImpl.java:45)
Comment 45 ranbato 2008-07-29 23:18:56 UTC
Created attachment 66003 [details]
stacktrace
Comment 46 Quality Engineering 2008-07-30 04:08:22 UTC
Integrated into 'main-golden', available in build *200807300201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/1ffb242fe33b
User: Daniel Prusa <dprusa@netbeans.org>
Log: #129390: VMDisconnectedException fixed
Comment 47 ulfzibis 2008-07-30 13:57:01 UTC
Hi Daniel, what's about the 2 remaining throwns? Are they also fixed in build *200807300201*

Especially: Is fix for http://statistics.netbeans.org/analytics/detail.do?id=82475 included?
Comment 48 Daniel Prusa 2008-07-30 14:02:06 UTC
Hi, the remaining occurrences of the exception have not been fixed yet. I plan to do it by this Friday.
Comment 49 Daniel Prusa 2008-07-31 12:23:51 UTC
Fixed.
changeset d6fa3c076e35 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=d6fa3c076e35
Comment 50 Quality Engineering 2008-07-31 15:43:10 UTC
Integrated into 'main-golden', available in build *200807311401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/d6fa3c076e35
User: Daniel Prusa <dprusa@netbeans.org>
Log: #129390, 141255, 142363: VMDisconnectedException, InvalidStackFrameException and InvocationTargetException fixed
Comment 51 pribyl 2008-09-08 11:54:07 UTC
Product Version: NetBeans IDE Dev (Build 200809061401)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

Verified. I have not encountered this Exception any more.
Comment 52 Exceptions Reporter 2008-10-18 20:00:18 UTC
Reopening - reproduced in NetBeans IDE Dev (Build 200810171401)
http://statistics.netbeans.org/exceptions/detail.do?id=130190
Comment 53 Daniel Prusa 2008-10-20 10:14:56 UTC
We have fixed ObjectCollectedException in almost all  potential places, this is the first report since the date the
issue was closed. Now, the exception comes from AbstractObjectVariable.getClassType(). This should not occur frequently.
Decreasing priority to P3. 
Comment 54 Daniel Prusa 2008-10-21 14:51:24 UTC
changeset d43e7c85cd00 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=d43e7c85cd00
Comment 55 Quality Engineering 2008-10-22 05:02:26 UTC
Integrated into 'main-golden', will be available in build *200810220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d43e7c85cd00
User: Daniel Prusa <dprusa@netbeans.org>
Log: #129390: VMDisconnectedException fixed.
Comment 56 Exceptions Reporter 2008-11-13 14:17:00 UTC
Reopening - reproduced in NetBeans IDE Dev (Build 200811130201)
http://statistics.netbeans.org/exceptions/detail.do?id=139165
Comment 57 Petr Chytil 2008-11-13 14:44:38 UTC
Build: NetBeans IDE Dev (Build 200811130201)
VM: Java HotSpot(TM) Client VM, 1.5.0_16-133, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b06-284
OS: Mac OS X, 10.5.5, i386

User Comments: 


Stacktrace: 
com.sun.jdi.VMDisconnectedException: connection is closed
        at com.sun.tools.jdi.TargetVM.send(TargetVM.java:274)
        at com.sun.tools.jdi.VirtualMachineImpl.sendToTarget(VirtualMachineImpl.java:934)
        at com.sun.tools.jdi.PacketStream.send(PacketStream.java:41)
        at com.sun.tools.jdi.JDWP$VirtualMachine$Version.enqueueCommand(JDWP.java:34)
        at com.sun.tools.jdi.JDWP$VirtualMachine$Version.process(JDWP.java:25)
        at com.sun.tools.jdi.VirtualMachineImpl.versionInfo(VirtualMachineImpl.java:531)
Comment 58 Petr Chytil 2008-11-13 14:44:43 UTC
Created attachment 73730 [details]
stacktrace
Comment 59 Martin Entlicher 2008-12-10 16:44:15 UTC
The VMDisconnectedException can be thrown on many places, it needs to be caught more centrally...
See issue #137310.
Comment 60 Martin Entlicher 2008-12-22 08:10:45 UTC
This should be finally fixed everywhere after issue #137310 was fixed.
Comment 61 Quality Engineering 2010-04-29 09:38:17 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.