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 54485 - Step out leaves a 'hidden' breakpoint
Summary: Step out leaves a 'hidden' breakpoint
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 86365 (view as bug list)
Depends on:
Blocks: 66560
  Show dependency tree
 
Reported: 2005-02-03 15:33 UTC by Jiri Skrivanek
Modified: 2011-12-12 13:19 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 Jiri Skrivanek 2005-02-03 15:33:55 UTC
It seems that step out action leaves some hidden
breakpoint. Then debugger unexpectedly stops
there. To repeat:

- create sample 'Anagram game' project
- add breakpoint to a method in WordLibrary class
(e.g. line 117)
- start debugger, guess word and wait until it
stops at breakpoint
- step out repeatedly until debugger continues
- guess word again. Now debugger stops at line 120
in Anagrams.java where it previously leaves the
source code. I expect it should stop at breakpoint.

Output from debugger console:

Listening on 3749
User program running
Breakpoint hit at line 117 in class
com.toy.anagrams.lib.WordLibrary by thread
AWT-EventQueue-0.
Thread AWT-EventQueue-0 stopped at
WordLibrary.java:117.
User program running
Thread AWT-EventQueue-0 stopped at
WordLibrary.java:144.
User program running
Thread AWT-EventQueue-0 stopped at Anagrams.java:207.
User program running
Thread AWT-EventQueue-0 stopped at Anagrams.java:16.
User program running
Thread AWT-EventQueue-0 stopped at Anagrams.java:121.
User program running
Thread AWT-EventQueue-0 stopped at Anagrams.java:120.

Build 20050203-1319, JDK1.5.0_02, WindowsXP.
Comment 1 Martin Entlicher 2005-12-13 17:28:09 UTC
Increasing to P3, since internal users have problems with staled hidden
breakpoints. This needs to be explored...
Comment 2 Martin Entlicher 2006-11-20 23:01:42 UTC
*** Issue 86365 has been marked as a duplicate of this issue. ***
Comment 3 Martin Entlicher 2006-11-20 23:06:54 UTC
From the analysis of almost identical issue #86365 follows that this is because
of smart-stepping. The last step out request is remembered by smart-stepping
framework and as soon as you enter your project again, the program is stopped.

To solve this, we have to check whether there is some code to stop at, on the
stack. And if not, then abandon the step out request.
Comment 4 Martin Entlicher 2006-11-22 15:24:18 UTC
Well, this idea is *very* problematic to implement, since smart-stepping API
takes thread instead of a stack frame. It makes no sense, because it needs the
stack frame in fact.

We'll likely have to change the API to be able to fix this :-( Or find some
other way....
Comment 5 Martin Entlicher 2007-03-29 17:11:25 UTC
Also step over behaves this way - see issue #99354.
Comment 6 Roman Ondruska 2007-06-27 14:29:02 UTC
Since there is almost identical report P3 #99354, decreasing this back to P4. I do not want to mark it as duplicate
since there are well documented repro-cases. 
Comment 7 Peter Pis 2008-04-10 22:53:36 UTC
Changing TM for open issues.
Comment 8 Martin Entlicher 2009-04-20 16:55:55 UTC
It looks like this brings confusion to debugger users, therefore upgrading to P3.

I'll prepare an API change for smart-stepping API...
Comment 9 Martin Entlicher 2009-12-17 07:50:56 UTC
After this is fixed, we should check that it solves bug #99354 as well.
Comment 10 Martin Entlicher 2010-11-26 12:18:02 UTC
This seems to be fixed in NB 7.0.
When Step Out or Step Over action is performed, I can not reproduce this behavior any more. The execution is correctly suspended on the breakpoint.
However, this bug can still be reproduced with Step Into. There's issue #66560 already for this.