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 187092 - Debug target fails if it is invoked after Resume(Debug) action
Summary: Debug target fails if it is invoked after Resume(Debug) action
Status: NEW
Alias: None
Product: javacard
Classification: Unclassified
Component: Java Card (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: onkentes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 14:37 UTC by msmirnov
Modified: 2012-08-01 08:41 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 msmirnov 2010-06-02 14:37:50 UTC
The problem appears in the following scenario:

1. Load Extension Library to Default Device.
2. Stop Default Device.
3. Invoke "Resume(Debug)" for Default Device.
4. Invoke Debug on Extended Applet project that depends on the Extension Library.

Build script stops after the following message:

"OffCard Installer [v3.0.2]
    Copyright (c) 2009 Sun Microsystems, Inc.
    All rights reserved.
    Use is subject to license terms.
[Unloading the bundle ExtendedApplet6 from http://localhost:8039/cardmanager/]
[ INFO: ] "Off Card Installer validating unload information"
[ INFO: ] "Off Card Installer sending unload request"
Connection refused: connect
load-bundle:
"

No output is displayed in Default Device output tab. Apparently Debug Proxy isn't started after Resume(Debug).
Comment 1 msmirnov 2010-06-03 13:01:39 UTC
This is rather important issue. It prevents from debugging of Java Card projects that depend on some libraries that should already be present on device. Also it prevents from debugging scenarios that check persistence features.
Comment 2 _ tboudreau 2010-06-08 08:34:52 UTC
Build script stops or exits?

If you invoke $JDK_HOME/bin/jps.exe
do you see the debugger proxy running?  If it is not there, then that is the problem.  "Connection refused" suggests that it is not started.
Comment 3 _ tboudreau 2010-06-08 08:38:27 UTC
> It prevents from debugging of Java Card projects that depend on some libraries that should already be present on device.

You can still simply invoke Debug on the project, and the libraries and the project will be deployed and the debugger will be started, correct?

If so, then this issue does not prevent you from debugging such projects.  It just prevents you from simulating the exact scenario of connecting to a card which already has the library on it.  I will agree that is not good, but I do not think it is P2 not-good.
Comment 4 msmirnov 2010-06-08 10:40:29 UTC
(In reply to comment #2)
> Build script stops or exits?

Debug script stops after "Connection refused: connect". cjcre.exe process is terminated.

> If you invoke $JDK_HOME/bin/jps.exe
> do you see the debugger proxy running?  If it is not there, then that is the
> problem.  "Connection refused" suggests that it is not started.
No there's no debugger proxy process.
Comment 5 msmirnov 2010-06-08 10:47:36 UTC
(In reply to comment #3)
> > It prevents from debugging of Java Card projects that depend on some libraries that should already be present on device.
> 
> You can still simply invoke Debug on the project, and the libraries and the
> project will be deployed and the debugger will be started, correct?

Only if "Deploy To Card" strategy is used for all dependencies.

> If so, then this issue does not prevent you from debugging such projects.  It
> just prevents you from simulating the exact scenario of connecting to a card
> which already has the library on it.  I will agree that is not good, but I do
> not think it is P2 not-good.

It's up to you to decide the priority. But dependency is not the only problem. We can't test in debug mode anything that requires card reset.
Comment 6 Adam Sotona 2011-02-16 11:14:38 UTC
this seems to require more evaluation
Comment 7 _ tboudreau 2011-02-17 02:21:28 UTC
Sounds like the problem may be as simple as the debug proxy process is not started.

Bear in mind there is some extremely fragile timing code - if the debug proxy is started too soon after the emulator, it will crash the emulator when it tries to connect.  So it also may be that it is started, but there is a timing issue that causes it to exit.

I put pretty granular logging in the javacard modules, which might help to figure out what's really happening.
Comment 8 Adam Sotona 2011-03-08 12:59:06 UTC
Setting to P3 as the primary debugger functionality is not affected, just some particular use case.
Comment 9 J Bachorik 2012-08-01 08:41:55 UTC
changing owner