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 51387 - Evaluation of not yet loaded class types
Summary: Evaluation of not yet loaded class types
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 134987 141386 156522 162396 (view as bug list)
Depends on:
Blocks: 70113
  Show dependency tree
 
Reported: 2004-11-10 15:39 UTC by Maros Sandor
Modified: 2016-08-05 01:56 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maros Sandor 2004-11-10 15:39:35 UTC
An expression (in Watches) that contains 
reference to a class or interface type, that is 
not yet loaded in the debugee VM fails to 
evaluate. For example: java.util.Calendar.YEAR is 
not evaluated if the Calendar class was not yet 
used in the debugee. This issue was caused by 
hotfixing Issue #50315.
Comment 1 Martin Entlicher 2006-11-20 21:47:53 UTC
IMHO this requires to rewrite the Evaluator. getClass() can be called *many*
times inside resolveType() method and it does not look appropriate to try to
call Class.forName() so many times until we get something...
Bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6181784 is fixed in
Mustang, so we can return the original code when on JDK 1.6 and newer. But it's
not nice at all that we do not now which class we are looking for and have to
try to load it so many times.
Comment 2 Daniel Prusa 2008-05-20 13:39:02 UTC
*** Issue 134987 has been marked as a duplicate of this issue. ***
Comment 3 Daniel Prusa 2008-07-23 16:46:09 UTC
*** Issue 141386 has been marked as a duplicate of this issue. ***
Comment 4 Daniel Prusa 2009-03-26 14:32:29 UTC
*** Issue 156522 has been marked as a duplicate of this issue. ***
Comment 5 Martin Entlicher 2009-04-10 16:47:06 UTC
*** Issue 162396 has been marked as a duplicate of this issue. ***
Comment 6 Martin Entlicher 2009-04-14 20:22:21 UTC
Loading of classes is conditionally implemented on JDK 6 and newer in changeset:   126777:facc3f885681
http://hg.netbeans.org/main/rev/facc3f885681
Comment 7 Quality Engineering 2009-04-15 07:48:44 UTC
Integrated into 'main-golden', will be available in build *200904150201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/facc3f885681
User: mentlicher@netbeans.org
Log: #51387 - Try to load the class in the target VM if it is not loaded yet.
Comment 8 Martin Entlicher 2009-07-22 11:04:34 UTC
This fix has caused REGRESSION issue #168949 and therefore will be removed.
Comment 9 Martin Entlicher 2009-07-22 13:23:29 UTC
This fix was disabled in changeset:   138866:c4838a04bece
http://hg.netbeans.org/main/rev/c4838a04bece

This must not be implemented until the bug described in issue #168949 is fixed in JPDA in JDK.
Comment 10 Martin Entlicher 2009-07-22 13:24:35 UTC
This can not be a defect, since we must not fix this!
Comment 11 Martin Entlicher 2009-07-30 16:57:18 UTC
FYI: This enhancement must not be implemented before http://bugs.sun.com/view_bug.do?bug_id=6866927 is fixed.
Comment 12 Martin Entlicher 2016-08-03 15:20:43 UTC
The JDK issue is still not fixed, but it looks like that due to the changes in NetBeans codebase, especially reduction of threads suspended multiple times, the issue no longer manifests in the IDE. At least during my extensive tests.
Therefore after some more changes, including checks for deadlocks during method invocations, this can be already implemented.
Comment 13 Martin Entlicher 2016-08-03 15:29:20 UTC
Fixed by changeset:   299821:8fcab2d21c3c
http://hg.netbeans.org/core-main/rev/8fcab2d21c3c
Comment 14 Quality Engineering 2016-08-05 01:56:59 UTC
Integrated into 'main-silver', will be available in build *201608050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8fcab2d21c3c
User: mentlicher@netbeans.org
Log: #51387: Allow evaluation of not-yet-loaded classes again. Improve checks for deadlock during method invocations.