Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 168949 - Debugger stuck after forced loading of classes not present in VM.
Debugger stuck after forced loading of classes not present in VM.
Product: debugger
Classification: Unclassified
Component: Java
All All
: P1 (vote)
: 6.x
Assigned To: Martin Entlicher
67patch1-verified, jdk_bug_6866927
Depends on:
  Show dependency treegraph
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

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

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
Comment 5 Petr Blaha 2009-07-22 16:08:10 UTC
Comment 6 pgebauer 2009-07-22 16:37:51 UTC
The fix has been ported into the release67_fixes repository.
Comment 7 Quality Engineering 2009-07-23 07:46:03 UTC
Integrated into 'main-golden', will be available in build *200907230201* on (upload may still be in progress)
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 for JDK.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo