Bug 5281 - Step into resumes instead
Summary: Step into resumes instead
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-26 09:52 EDT by Jerome Lanneluc CLA
Modified: 2001-11-13 10:10 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2001-10-26 09:52:22 EDT
Build 20011025
Runtime JRE: J9 10/15/2001

1. Create the following CU in default package:
Y.java
------
public class Y {
	Y indexManager;
	Y progressMonitor;
	Y pattern;
	Y requestor;
	Y scope;
	int detailLevel;
	long executionTime;
	static boolean COMPLETE;
	static boolean FAILED;
	static boolean VERBOSE;
	public boolean isCanceled() {
		return false;
	}
	public Y getMonitorFor(Y y) {
		return this;
	}
	public void enterRead() {
	}
	public void exitRead() {
	}
	public void exitWrite() {
	}
	public void enterWrite() {
	}
	public boolean hasChanged() {
		return false;
	}
	public String getIndexFile() {
		return "";
	}
	public void save() throws IOException {
	}
	public void findIndexMatches(Y index, Y requestor, int detailLevel, Y 
progressMonitor, Y scope) throws IOException {
		System.out.println("Finding index matches");
	}
	public boolean foo(Y index) {

		if (progressMonitor != null && progressMonitor.isCanceled())
			throw new RuntimeException();

		if (index == null)
			return COMPLETE;
		Y monitor = indexManager.getMonitorFor(index);
		if (monitor == null)
			return COMPLETE;
		try {
			monitor.enterRead(); 

			if (index.hasChanged()) {
				try {
					monitor.exitRead();
					monitor.enterWrite(); 
					if (Y.VERBOSE)
						System.out.println("-> merging 
index : " + index.getIndexFile()); 
					index.save();
				} catch (IOException e) {
					return FAILED;
				} finally {
					monitor.exitWrite(); 
					monitor.enterRead(); 
				}
			}
			long start = System.currentTimeMillis();
			pattern.findIndexMatches( /********* breakpoint on this 
line *************/ 
				index,
				requestor,
				detailLevel,
				progressMonitor,
				this.scope);
			executionTime += System.currentTimeMillis() - start;
			return COMPLETE;
		} catch (IOException e) {
			return FAILED;
		} finally {
			monitor.exitRead();
		}
	}
	public static void main(String[] args) {
		Y y = new Y();
		y.indexManager = new Y();
		y.progressMonitor = new Y();
		y.pattern = new Y();
		y.requestor = new Y();
		y.scope = new Y();
		y.foo(y);
	}
}
2. Put a breakpoint on the findIndexMatches line
3. Run under debug
4. When breakpoint is hit, press F5 5 times
Observe: The fifth time you press F5, it resumes the thread instead of stepping 
into.

Note that if you use J9 09/29/2001, it goes into the findIndexMatches method 
the sixth time you press F5. So this may be a J9 problem...
Comment 1 Joe Szurszewski CLA 2001-10-26 15:50:18 EDT
Could duplicate problem under J9 10152001, but could NOT duplicate problem 
under J9 08292001, J9 09292001, Sun JDK1.2.2, Sun JDK1.3.0, Sun JDK1.4beta, or 
the IBM VM that ships with Eclipse, so I think this is a J9 issue.  

Jerome, since you're more familiar with this problem, would you like to follow 
up with the J9 team?
Comment 2 Jerome Lanneluc CLA 2001-10-29 04:46:06 EST
Duplicate of 1GM7J2D: J9VM:WIN2000 - debugger takes off in 
java.io.PrintStream.print(java.lang.String) while stepping into

Closing
Comment 3 Darin Wright CLA 2001-11-13 10:10:06 EST
Closed.