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 166579 - [jdk6u14] Continue button is disabled when breakpoint is hit
Summary: [jdk6u14] Continue button is disabled when breakpoint is hit
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: JDK_SPECIFIC
: 169617 171689 171769 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-05 05:19 UTC by grimlock81
Modified: 2011-06-09 09:54 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (92.36 KB, text/plain)
2009-08-13 07:30 UTC, grimlock81
Details
This is the stack trace for AWT-EventQueue-1 when viewed under JConsole (3.66 KB, text/plain)
2009-08-13 07:31 UTC, grimlock81
Details

Note You need to log in before you can comment on or make changes to this bug.
Description grimlock81 2009-06-05 05:19:15 UTC
I have started recently using Netbeans with Java 6 Update 14. When running the debugger on my project, and when one of
the breakpoints is hit, the continue button does not become enabled. In addition, the keyboard shortcut for Continue: F5
does not work either.

Switching back to Java 6 Update 13 fixes this issue.
Comment 1 Marian Mirilovic 2009-06-05 09:59:59 UTC
Vojto(vsigler), 
could you please confirm : this is JDK6u14 regression? We are going to bundle NB 6.7 with JDK6u14 so if there is more
problems like this, we need to know about them ASAP. Thanks in advance.
Comment 2 Vojtech Sigler 2009-06-05 11:07:14 UTC
I've tested 6.5.1 and 6.7 RC2 (Build 200906042131) on both WinXP and Linux, but I was unable to reproduce this issue.
Plus I've been testing RC2 using JDK 1.6u14 most of this week without any problems.

@grimlock81: Could you please provide more info on this issue? Some more exact steps to reproduce would be also very
appreciated (type of breakpoint, maybe sample code, etc.). Does the debugger console show something unusual when this
occurs, does it display "breakpoint hit"? Are there any error messages in messages.log?
Comment 3 Martin Entlicher 2009-06-05 12:34:00 UTC
Well, there was issue #160747, which was recently fixed. That issue was reported for 6.7 dev builds, but perhaps there
was some problem in 6.5 as well... This was a random issue, thus it can happen that it's disabled only sometimes.

grimlock81, do you have Continue consistently disabled on JDK 6 up 14? Can you try that please in NetBeans 6.7 RC?
Comment 4 grimlock81 2009-06-05 12:45:53 UTC
I remember coming across this issue when using some of the Early Access builds of Update 14 a month or so ago. I put it
down to using a pre-release and happily went back to Update 13. I installed the actual release Update 14 yesterday and
encountered this problem again.

Unfortunately the code is on my work computer, and it is a long weekend here so I can only give you an update in 3 days
time. I'll try to create the same issue on my home computer. 

Some other information:
- The project running in the debugger is a Swing application.
- I had another class from the same project running in Netbeans, but not in the debugger.
- After I switched back Update 13, the Continue button was enabled at breakpoints again.
- Netbeans 6.5 but with the latest updates from the Update Center installed.
Comment 5 grimlock81 2009-06-09 05:03:42 UTC
No error messages in messages.log
"Breakpoint hit at line XXX in class XXXX by thread XXXXX" is printed in the console when the breakpoint is hit.

There are breakpoints that do allow the Continue button to be enabled and also others that do not allow the Continue
Button to be enabled. All breakpoints that occur on the Event Dispatching Thread do not allow the Continue button to
become enabled. Breakpoints on other threads besides the EDT may or may not allow the Continue button to become enabled.

I have encountered the problem on two separate projects of mine. I have tried but failed to reproduce a simple test case
that replicated this error.
Comment 6 grimlock81 2009-06-09 05:29:16 UTC
Problem does not occur in Netbeans 6.7 RC2
Comment 7 grimlock81 2009-06-09 07:42:33 UTC
Spoke too soon. I've just had it happen in 6.7 RC2. The interesting thing is it happened after I copied the
netbeans.conf file from 6.5 into 6.7 RC2 and I'm guessing the value of netbeans_default_userdir being set to
${HOME}/.netbeans/6.5 is responsible. Perhaps some value in one of the files under ${HOME}/.netbeans/6.5 is causing the
issue.

Any particular file(s) I should be on the lookout for?
Comment 8 Vojtech Sigler 2009-06-10 08:43:56 UTC
@grimlock81: Thank you very much for your input. It could a problem with imported settings from 6.5. Could you, please,
try working with your projects with a clean userdir (no importing from 6.5)? You can do it by running netbeans with a
command line parameter --userdir /path/to/new/userdir.

I'll do some more tests of my own in the meantime.

Thanks a lot!
Comment 9 Vojtech Sigler 2009-06-10 10:23:40 UTC
I tested it again under both WinXP and Linux, also with importing userdir from 6.5.1 to 6.7 but with no success. I also
tried placing breakpoints in the Event dispatching thread, but every time a breakpoint was hit, the continue button was
enabled and the action worked.

Does the problem persist when using a clean userdir?

Thanks
Comment 10 Martin Entlicher 2009-07-29 17:42:34 UTC
There's a hypothesis that http://bugs.sun.com/view_bug.do?bug_id=6862295 is causing this - since there's a regression
with threads ID change on Windows, it can possibly confuse the logic that determines if all threads are
running/suspended and therefore not enable correctly Pause/Continue.
It should be tested again after http://bugs.sun.com/view_bug.do?bug_id=6862295 is fixed.
Comment 11 Martin Entlicher 2009-07-30 17:13:40 UTC
grimlock81, since you can reproduce this problem, can you please test if adding this option:
-XX:+UseParallelGC
into etc/netbeans.conf (to netbeans_default_options) will solve the problem on JDK 6u14?
Thanks.
Comment 12 grimlock81 2009-07-31 04:52:55 UTC
Okay, I've added the option to the netbeans.conf file. I'll post an update in a few days time.
Comment 13 Tomas Pavek 2009-07-31 09:37:33 UTC
Note you need to use the -J prefix in netbeans.conf file, so it should be -J-XX:+UseParallelGC
Comment 14 Martin Entlicher 2009-07-31 17:10:47 UTC
*** Issue 169617 has been marked as a duplicate of this issue. ***
Comment 15 catweasle 2009-08-01 15:10:48 UTC
I can confirm this issue on NB6.7.1 jdk6u14 upgraded from NB5.5=>6=>7 ...
Comment 16 catweasle 2009-08-01 15:14:22 UTC
workaround: hit pause, hit continue
Comment 17 grimlock81 2009-08-03 05:33:27 UTC
I added the flag -J-XX:+UseParallelGC to netbeans_default_options for my netbeans.conf file. I still encountered this issue.
Comment 18 Martin Entlicher 2009-08-07 12:43:07 UTC
As mentioned in issue #167776, this problem is caused by thread ID changes.
We implement a workaround in NetBeans till it's fixed in JDK.

Besides this there's also an occasional inconsistency in NetBeans debugger, which also caused disabled Continue
regardless  on JDK version. This will be resolved in issue #167776.
Comment 19 Martin Entlicher 2009-08-07 18:21:33 UTC
Workaround for JDK bug implemented in changeset:   140591:8e4ac65c2f8a
http://hg.netbeans.org/main/rev/8e4ac65c2f8a
Comment 20 Quality Engineering 2009-08-08 07:05:03 UTC
Integrated into 'main-golden', will be available in build *200908080201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/8e4ac65c2f8a
User: mentlicher@netbeans.org
Log: #166579 - Synchronize the cached threads with VM threads when we get an event in a thread that is not cached. This is a workaround for http://bugs.sun.com/view_bug.do?bug_id=6862295.
Comment 21 grimlock81 2009-08-13 07:30:20 UTC
Created attachment 86179 [details]
messages.log
Comment 22 grimlock81 2009-08-13 07:31:28 UTC
Created attachment 86180 [details]
This is the stack trace for AWT-EventQueue-1 when viewed under JConsole
Comment 23 grimlock81 2009-08-13 07:32:42 UTC
Installed Java 6 Update 16 and it seems to have fixed this problem.

However, I'm starting to get complete freezes of the whole IDE. This occurred in Update 15 as well
Comment 24 Martin Entlicher 2009-08-13 13:05:57 UTC
grimlock81, this freeze is a duplicate of the issue #168613. It's a bug of NetBeans :-(, so it occurs on all JDK
versions. It's fixed already in 6.8 dev builds and I hope it will be provided as a patch to 6.7 (or 6.7.1).
Comment 25 Martin Entlicher 2009-09-08 10:58:34 UTC
*** Issue 171689 has been marked as a duplicate of this issue. ***
Comment 26 Martin Entlicher 2009-09-09 07:23:01 UTC
*** Issue 171769 has been marked as a duplicate of this issue. ***
Comment 27 Marian Mirilovic 2011-06-09 09:54:37 UTC
v/c