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 168949 - Debugger stuck after forced loading of classes not present in VM.
Summary: Debugger stuck after forced loading of classes not present in VM.
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: REGRESSION, SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2009-07-22 10:41 UTC by Martin Entlicher
Modified: 2009-07-30 16:55 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test application (1.24 KB, text/plain)
2009-07-22 10:49 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2009-07-22 10:41:34 UTC
This is a regression caused by the fix of issue #51387.

If a user evaluates anything that contains a reference to class that is not loaded in the application that is debugged,
Netbeans debugger tries to load that class using Class.forName(). But that call cause that if the current thread tries
to start a new thread after it's resumed, the new thread is not started. The application then does not fully run, even
though all other threads are running.
The result is that user is surprised that the application does not run when debugger tells that it's fully running.
Comment 1 Martin Entlicher 2009-07-22 10:46:05 UTC
The fix is to remove the fix of issue #51387.
I'll submit a defect for JPDA.
Comment 2 Martin Entlicher 2009-07-22 10:49:21 UTC
Created attachment 85058 [details]
Test application
Comment 3 Martin Entlicher 2009-07-22 10:55:51 UTC
Steps to reproduce:

1) Add the attached application to a project and add two line breakpoints to lines 24 and 32.
2) Debug the application, thread "main" gets suspended at line 24.
3) Open Debug -> Evaluate Expression, write "new java.util.Random().nextDouble()" into the Evaluator and press Evaluate
button (or CTRL-ENTER).
4) Resume "main" thread in Debugging window or run Continue in 6.8 dev builds.
5) All threads are running, but the second breakpoint is not being hit.

6) Stop debugger, uncomment line 22 and repeat steps 1-5 again. Now the second breakpoint is hit as expected.
Comment 4 Martin Entlicher 2009-07-22 13:05:22 UTC
Fixed in changeset:   138866:c4838a04bece
http://hg.netbeans.org/main/rev/c4838a04bece
Comment 5 Petr Blaha 2009-07-22 16:08:10 UTC
v.
Comment 6 pgebauer 2009-07-22 16:37:51 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/f14948deb3b0
Comment 7 Quality Engineering 2009-07-23 07:46:03 UTC
Integrated into 'main-golden', will be available in build *200907230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c4838a04bece
User: mentlicher@netbeans.org
Log: #168949 - Do not try to load classes into the debuggee VM, since this breaks debugging.
Comment 8 Vojtech Sigler 2009-07-23 13:54:29 UTC
Verified in 6.7.1 (Build 200907230233)
Comment 9 Martin Entlicher 2009-07-30 16:55:51 UTC
FYI: I've submitted bug http://bugs.sun.com/view_bug.do?bug_id=6866927 for JDK.