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.
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.
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.
*** Issue 134987 has been marked as a duplicate of this issue. ***
*** Issue 141386 has been marked as a duplicate of this issue. ***
*** Issue 156522 has been marked as a duplicate of this issue. ***
*** Issue 162396 has been marked as a duplicate of this issue. ***
Loading of classes is conditionally implemented on JDK 6 and newer in changeset: 126777:facc3f885681 http://hg.netbeans.org/main/rev/facc3f885681
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.
This fix has caused REGRESSION issue #168949 and therefore will be removed.
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.
This can not be a defect, since we must not fix this!
FYI: This enhancement must not be implemented before http://bugs.sun.com/view_bug.do?bug_id=6866927 is fixed.
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.
Fixed by changeset: 299821:8fcab2d21c3c http://hg.netbeans.org/core-main/rev/8fcab2d21c3c
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.