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 90419 - Debugger stops randomly without breakpoints
Summary: Debugger stops randomly without breakpoints
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: Other Linux
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: RANDOM
Depends on: 104783
Blocks:
  Show dependency tree
 
Reported: 2006-12-01 10:47 UTC by Karol Harezlak
Modified: 2010-04-29 09:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karol Harezlak 2006-12-01 10:47:42 UTC
Debugger stops randomly without breakpoints in some random place. Really painful
when it happens inside of the loop!
Comment 1 Jiri Kovalsky 2006-12-01 14:33:03 UTC
Could you please take a look at the following 3 issues? Issue #84610, issue
#74823 and issue #54485. In other words, did you have a breakpoint set at these
random places in the past? Did you by a chance used "Step Out" feature before?
Do you have a project reproducing the issue more often than others? Having said
that we would appreciate any information about this bug because we can't
reproduce it ourselves. Until we get some more data I am marking this bug as
INCOMPLETE.
Comment 2 Martin Entlicher 2006-12-14 09:18:12 UTC
kharezlak, please elaborate on when does this happen, what actions do you use
and where the debugger stops. We'll close this if we do not get a better
description of the problem. Also, please have a look at issue #54485 and let us
know if this describes the problem you have run into. Thanks.
Comment 3 Karol Harezlak 2006-12-14 10:04:53 UTC
This bug appears randomly I was not able to find the way how to reproduce it on
demand. I noticed that debuger stops at places were use to be a breakpoints.
Workaround for this bug is to delete configuration file
org-netbeans-modules-debugger-Settings.properties from .netbeans configuration
folder. I'm not able to provide any more informations about it.
Comment 4 Martin Entlicher 2006-12-14 17:32:33 UTC
Thanks, we'll try to find out what is the problem, this looks similar to issue
#84610 and issue #74823. Downgrading to P2 - we still do not have reproducible
steps for this.

The breakpoints needs to be improved into 6.0, so this might be fixed by that.
(See issue #32796, issue #69462, issue #51728).
Comment 5 Martin Entlicher 2007-04-27 14:34:46 UTC
Well, maybe I have some idea when this can happen.
Some actions in debugger submit "hidden" breakpoints. E.g. when you do "Run To
Cursor", a hidden breakpoint is submitted at that line. If the breakpoint is not
reached and the debugger session is restarted, all hidden breakpoints that were
not cleaned up persist in memory and are active for all subsequent sessions
until NetBeans are restarted.
So, currently, just a restart of NetBeans should help. We need to fix this by
assuring that all hidden breakpoints are correctly cleaned up.
Comment 6 Karol Harezlak 2007-07-13 09:06:38 UTC
The same problem appears in Netbeans 6.0, currently I'm using M10 and it's extremely annoying. Netbeans restart doesn't
help, only way to get rid of this problem is to delete .netbeans folder. 
Comment 7 Martin Entlicher 2007-07-13 09:46:20 UTC
Aha, in that case it should be enough to delete <User_dir>/config/Services/org-netbeans-modules-debugger-Settings.properties

I've searched the code for where we can forgot some submitted breakpoints, but did not find anything apparent. Do you
have some concrete steps how to reproduce this? Some sequence of debugging actions? That would help a lot to find the bug.

Also, please attch the <User_dir>/config/Services/org-netbeans-modules-debugger-Settings.properties file *after*
debugger starts to stop randomly without apparent reason. Thanks.
Comment 8 ehucka 2007-07-24 11:11:24 UTC
Product Version: NetBeans IDE Dev (Build 200707240000) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05 System:
Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

I have some steps to reproduce:

1. start debugging of some java file, e.g. test
/cvs/debuggercore/test/qa-functional/data/debugTestProject/src/examples/advanced/MemoryView.java 
2. toggle two line breakpoints in some cycle, in the example e.g. on lines 87 and 97
3. start debugging
4. after a breakpoint is hit go to Sources view, enable/disable sources of jdk and delete the hitted breakpoint
5. press continue 2 times - debugger will stop on the line of removed breakpoint

Comment 9 Martin Entlicher 2007-07-25 14:38:53 UTC
I've reproduced it via these steps:
Have two breakpoints in
/cvs/debuggercore/test/qa-functional/data/debugTestProject/src/examples/advanced/MemoryView.java, at lines 97 and 104.
Start debugging, press Continue two times.
Remove the hit breakpoint
Go to Sources tab and enable JDK sources for debugging
Press Continue two times, the deleted breakpoint is hit.

Starting to explore what's wrong...
Comment 10 Martin Entlicher 2007-07-25 14:43:17 UTC
It does not have to be necessarily the breakpoint that is hit, any deleted breakpoint is hit later when JDK sources are
checked/unchecked.
Comment 11 Martin Entlicher 2007-07-25 19:13:58 UTC
The fix is applied, the described use-case is fixed now:

/shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/breakpoints/BreakpointImpl.java,v  <--
 BreakpointImpl.java
new revision: 1.43; previous revision: 1.42

/shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/breakpoints/ClassBasedBreakpoint.java,v
 <--  ClassBasedBreakpoint.java
new revision: 1.23; previous revision: 1.22


However, I'm not sure if this fixes the original bug, there might be other cases when there are some forgotten, hidden
breakpoints staled in the system. kharezlak mentioned deletion of org-netbeans-modules-debugger-Settings.properties as a
workaround, thus it seems that there can be some problem in the breakpoints storage as well.

If this bug reappears, please start NetBeans with -J-Dorg.netbeans.modules.debugger.jpda.level=400 option and provide
the <User dir>/var/log/messages.log. Describe at which place NetBeans stops without any apparent reason.

So, closing as fixed, if you manage to reproduce the problem again, please include the messages.log and
org-netbeans-modules-debugger-Settings.properties will help as well. Thanks.
Comment 12 Quality Engineering 2010-04-29 09:31:16 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.