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 169257 - Debugger fails to start with "No transports initialized" message
Summary: Debugger fails to start with "No transports initialized" message
Status: CLOSED DUPLICATE of bug 148490
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@debugger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-27 18:58 UTC by swpalmer
Modified: 2010-05-06 08:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description swpalmer 2009-07-27 18:58:58 UTC
I was editing some interfaces and tried to start debugging but the compile failed because of some abstract methods not 
being implemented (IDE didn't tell me about it until I tried to build, tsk.).  So I fixed that and hit debug again, but 
the debugger was in some strange state and this was printed to the console:

compile:
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: failed to attach to shared memory connection: The system cannot find the file specified
ERROR: JDWP Transport dt_shmem failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
Java Result: 1
debug:
BUILD SUCCESSFUL (total time: 4 seconds)


Using JDK 1.6.0_14 on Microsoft Windows XP [Version 5.1.2600]

I'm not sure if this is a JDK or NB issue.
Comment 1 Martin Entlicher 2009-07-29 16:54:49 UTC
Can you please set "Verbosity Level" option that you find at Tools -> Options -> Miscellaneous -> Ant pane to "Verbose"?
Then IDE will print messages about how it executes the application and we'll hopefully see why it does not find the
shared memory it tries to connect to.
Comment 2 swpalmer 2009-08-04 16:57:00 UTC
I just had a very similar failure happen again.. the stack trace is short so I'm including it below...

I think the key to reproducing it is:

1. change the working directory for the project to a non-existing path 
2. hit the debug button. It will fail because of the path problem
3. fix the woprking directory
4. hit debug.  This time it fails because of this shared memory problem.

I'm sure that the original report was also based on a first attempt to debugt that failed for some reason not directly 
related to the debugger.  Then the following invocation failed because of the transport initialization problem.


Here's the failure details from my last run...

init:
deps-jar:
init:
deps-jar:
compile:
Not copying the libraries.
jar:
compile:
Listening failed with arguments: {timeout=timeout=, name=name=}
java.io.IOException: shmemBase_listen failed: Cannot create a file when that file already exists

        at org.netbeans.modules.debugger.jpda.ant.JPDAStart.execute(JPDAStart.java:244)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:497)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: java.io.IOException: shmemBase_listen failed: Cannot create a file when that file already exists

        at com.sun.tools.jdi.SharedMemoryTransportService.startListening0(Native Method)
        at com.sun.tools.jdi.SharedMemoryTransportService.startListening(SharedMemoryTransportService.java:100)
        at com.sun.tools.jdi.GenericListeningConnector.startListening(GenericListeningConnector.java:96)
        at com.sun.tools.jdi.SharedMemoryListeningConnector.startListening(SharedMemoryListeningConnector.java:56)
        at org.netbeans.modules.debugger.jpda.ant.JPDAStart.run(JPDAStart.java:284)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030)
--- Nested Exception ---
java.io.IOException: shmemBase_listen failed: Cannot create a file when that file already exists

        at com.sun.tools.jdi.SharedMemoryTransportService.startListening0(Native Method)
        at com.sun.tools.jdi.SharedMemoryTransportService.startListening(SharedMemoryTransportService.java:100)
        at com.sun.tools.jdi.GenericListeningConnector.startListening(GenericListeningConnector.java:96)
        at com.sun.tools.jdi.SharedMemoryListeningConnector.startListening(SharedMemoryListeningConnector.java:56)
        at org.netbeans.modules.debugger.jpda.ant.JPDAStart.run(JPDAStart.java:284)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030)
W:\TestProject\nbproject\build-impl.xml:524: The following error occurred while executing this line:
W:\TestProject\nbproject\build-impl.xml:265: java.io.IOException: shmemBase_listen failed: Cannot create a file when 
that file already exists
BUILD FAILED (total time: 0 seconds)
Comment 3 swpalmer 2009-08-04 17:03:34 UTC
I tried setting the Verbosity Level and debugging again - it failed the same way (I suspect it will fail until I 
restart the IDE), but I didn't much additional info in the verbose output that looked helpful.  The same exceptions 
were just printed several more times.
I did notice this:

-init-debug-args:
Property "have-jdk-older-than-1.4" has not been set
Property "debug.transport" has not been set
-init-macrodef-nbjpda:
Property "main.class" has not been set
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:nbjpdastart
creating macro  http://www.netbeans.org/ns/j2se-project/1:nbjpdastart
creating macro  http://www.netbeans.org/ns/j2se-project/1:nbjpdareload

...

-post-compile:
compile:
-debug-start-debugger:
Listening failed with arguments: {timeout=timeout=, name=name=}
java.io.IOException: shmemBase_listen failed: Cannot create a file when that file already exists
Comment 4 Martin Entlicher 2009-08-10 16:43:41 UTC
This is a duplicate of issue #148490. It was resolved recently in 6.8 dev builds.

*** This issue has been marked as a duplicate of 148490 ***
Comment 5 Marian Mirilovic 2010-05-06 08:02:26 UTC
verified duplicate