Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 1616 - Vector evaluation error (1GFJA0T)
Summary: Vector evaluation error (1GFJA0T)
Status: RESOLVED DUPLICATE of bug 1546
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P2 minor (vote)
Target Milestone: ---   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:16 EDT by Jared Burns CLA
Modified: 2002-02-01 11:50 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 Jared Burns CLA 2001-10-10 22:16:21 EDT
1. Add a breakpoint for "java.lang.ArrayIndexOutOfBoundsException: caught and uncaught"
2. Run the code which follows
3. When the program stops at the illegal index access, select the Main.foo() method in the 
    execution stack display
4. Go to the Display view and evaluate "aVector.size()"
	Rather than give the correct output (1), an exception is thrown:
    "java.lang.ClassNotFoundException"

Test code:

import java.util.*;

public class Main {

	private Vector aVector;

	public static void main(String[] args) {
		new Main().foo();
	}
	
	public Main() {
		aVector = new Vector();
	}	
	
	public void foo() {
		aVector.add(new Integer(1));		
		aVector.elementAt(-1);
		return;
	}
}

NOTES:

DW (6/18/01 5:00:20 PM)
	I found that if the top stack frame is in a binary type, but the selected stack frame
	is in a source type, I  get the same error. I tried Infinite Loop, and stepped into
	the System.out.println(). From the calling stack frame I did an evaluation of a constant
	and got a ClassNotFoundException.

	Not sure why this matters.

DW (6/19/01 9:23:34 AM)
	Defer.

OT (14/08/2001 4:10:38 PM)
	The problem seems to come from the stack frame used for the evaluation. I need to find out which stack frame is used. The top one seems to be a good guess and like this
	class is classes.zip the bootstrapclassloader is used instead of the classloader. The consequence of this that the code snippet classes are not found.

OT (23/08/2001 2:29:52 PM)
	We should always use the stack frame in which the code is evaluated and not the top one.

DW (8/28/01 10:20:10 AM)
	The stack frame comes from the UI selection in "EvaluateAction.#getContext()".
	This needs to be debugged. A quick look at the code looks like it should get the 
	selected stack frame properly.
	
DS (9/10/01 1:37:59 PM)
	The top stack frame is not being used...the stack frame is the one that the evaluation occurs in.

DS (9/10/01 4:20:24 PM)
	Talking with JW, this is the known problem of not being able to perform evaluations in classes
	that have been loaded from the BootClassLoader as this loader will not find our snippet class.
Comment 1 Darin Wright CLA 2001-10-15 11:27:23 EDT
Possible that AST evalutaion will help solve this problem.
Comment 2 DJ Houghton CLA 2001-10-24 06:36:37 EDT
JMB (6/18/2001 3:34:21 PM)

Version: 125
VM: Out of the box
OS: Running Win2000

Comment 3 Darin Wright CLA 2002-02-01 11:50:20 EST
Known problem with current evaluation support. Marked as duplicate.

*** This bug has been marked as a duplicate of 1546 ***