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 83695 - Can't use Ant debugger on Windows Vista
Summary: Can't use Ant debugger on Windows Vista
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Ant (show other bugs)
Version: 5.x
Hardware: PC Windows Vista
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-29 13:49 UTC by Jiri Kovalsky
Modified: 2006-09-27 12:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of debugger toolbar and editor. (66.39 KB, image/png)
2006-08-29 13:51 UTC, Jiri Kovalsky
Details
Two informational exceptions thrown in console. (2.60 KB, text/plain)
2006-08-29 13:52 UTC, Jiri Kovalsky
Details
NullPointerException thrown when Ant debugger session is closed. (1013 bytes, text/plain)
2006-09-11 13:05 UTC, Jiri Kovalsky
Details
The fix. (8.25 KB, text/plain)
2006-09-12 16:03 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2006-08-29 13:49:56 UTC
Development build #200608280000 of NetBeans 5.5
JDK 1.6.0 RC build #97

Description:
============
Users can't use Ant debugger on Windows Vista because it only works once. Trying
to debug more times user ends up in situation when breakpoint is hit, program
counter shows up but all debugger actions are disabled. You can't press
"Continue", "Step Over" etc. Furthermore the process is visible under
"Processes" node in Runtime view. Please take a look at the attached screenshot
or informational exceptions thrown in console when starting the debugging. Funny
thing is that the same exceptions are thrown on Windows XP but it works fine.

Steps to reproduce:
===================
1. Create new sample project Anagram Game from template.
2. Right click "AnagramGame1|build.xml" node in Files view.
3. Choose "Debug Target|run" from popup menu.
4. When the program counter shows up press "Finish Debugger Session" button.
5. Close the game window and repeat steps 2 and 3.
6. Debugger session is started but you can't do anything with it.
Comment 1 Jiri Kovalsky 2006-08-29 13:51:34 UTC
Created attachment 33360 [details]
Screenshot of debugger toolbar and editor.
Comment 2 Jiri Kovalsky 2006-08-29 13:52:42 UTC
Created attachment 33361 [details]
Two informational exceptions thrown in console.
Comment 3 Jiri Kovalsky 2006-09-11 13:04:05 UTC
Some further investigations. This problem does not occur in the latest
development build #200609101800 of NetBeans 6.0 with the same JDK. It only
throws below attached exception when "Finish Debugger Session" is pressed or
debugged application is closed normally.
Comment 4 Jiri Kovalsky 2006-09-11 13:05:27 UTC
Created attachment 33758 [details]
NullPointerException thrown when Ant debugger session is closed.
Comment 5 Martin Entlicher 2006-09-12 10:06:20 UTC
So, I have finally found what was the problem. It's a race-condition in calls of
AntDebugger.doAction() and AntDebugger.stopHere(). If stopHere() is called
before doAction(), then doAction() will wait for ever.
Setting Target milestone to 5.5, since this is already fixed in trunk.
We need to backport a combination of fixes from issue #50761 and issue #73921.
Comment 6 Martin Entlicher 2006-09-12 15:59:59 UTC
The fix is committed to release55_dev branch:

/cvs/ant/debugger/src/org/netbeans/modules/ant/debugger/AdvancedActionPanel.java,v
 <--  AdvancedActionPanel.java
new revision: 1.1.38.1.2.1.14.1; previous revision: 1.1.38.1.2.1

/cvs/ant/debugger/src/org/netbeans/modules/ant/debugger/AntDebugger.java,v  <--
 AntDebugger.java
new revision: 1.2.38.1.2.2.14.1; previous revision: 1.2.38.1.2.2

/cvs/ant/debugger/src/org/netbeans/modules/ant/debugger/DebuggerAntLogger.java,v
 <--  DebuggerAntLogger.java
new revision: 1.2.38.1.2.1.14.1; previous revision: 1.2.38.1.2.1

/cvs/ant/debugger/src/org/netbeans/modules/ant/debugger/RunTargetsAction.java,v
 <--  RunTargetsAction.java
new revision: 1.1.38.1.2.1.14.1; previous revision: 1.1.38.1.2.1
Comment 7 Martin Entlicher 2006-09-12 16:03:28 UTC
Created attachment 33833 [details]
The fix.
Comment 8 Jiri Kovalsky 2006-09-15 06:57:22 UTC
Verified in development build #200609140300 of NetBeans 5.5. Please proceed with
integration into release55 branch.
Comment 9 Roman Ondruska 2006-09-18 15:08:52 UTC
Review: The fix is safe enough for integration to release55 branch.
Comment 10 Martin Entlicher 2006-09-19 13:07:00 UTC
Thanks for the verification and review, the fix is now committed in release55
branch:

/shared/data/ccvs/repository/ant/debugger/src/org/netbeans/modules/ant/debugger/AdvancedActionPanel.java,v
 <--  AdvancedActionPanel.java
new revision: 1.1.38.1.2.2; previous revision: 1.1.38.1.2.1

/shared/data/ccvs/repository/ant/debugger/src/org/netbeans/modules/ant/debugger/AntDebugger.java,v
 <--  AntDebugger.java
new revision: 1.2.38.1.2.3; previous revision: 1.2.38.1.2.2

/shared/data/ccvs/repository/ant/debugger/src/org/netbeans/modules/ant/debugger/DebuggerAntLogger.java,v
 <--  DebuggerAntLogger.java
new revision: 1.2.38.1.2.2; previous revision: 1.2.38.1.2.1

/shared/data/ccvs/repository/ant/debugger/src/org/netbeans/modules/ant/debugger/RunTargetsAction.java,v
 <--  RunTargetsAction.java
new revision: 1.1.38.1.2.2; previous revision: 1.1.38.1.2.1
Comment 11 Martin Schovanek 2006-09-26 16:30:11 UTC
Jirko, please can you verify it in latest release55 build.
Comment 12 Jiri Kovalsky 2006-09-27 12:40:20 UTC
Verified in development build #200609260000 of NetBeans 5.5.