Bug 390870

Summary: After an Exception BrakPoint all expressions are evaluated to null !
Product: [Eclipse Project] JDT Reporter: Alessio Pollero <alessio.pollero>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: alessio.pollero, Michael_Rennie
Version: 4.3Keywords: needinfo
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Debug perspective
none
Variable View
none
BreakPoint View
none
Archived Project none

Description Alessio Pollero CLA 2012-10-01 17:07:50 EDT
Created attachment 221742 [details]
Debug perspective

I just noticed that with the new version of Eclipse(4.2.1) when an Exception breakpoint is hit all expressions on the expression view in the debug perspective are evaluated to null . 

In my case i have caused a NoSuchElement exception and when eclipse hit the breakpoint stop evaluating the expression ... 


This bug caused my 30 minutes of confusion ! Should be fixed as soon as possible ...
Comment 1 Alessio Pollero CLA 2012-10-01 17:08:34 EDT
Created attachment 221743 [details]
Variable View
Comment 2 Alessio Pollero CLA 2012-10-01 17:10:04 EDT
Created attachment 221744 [details]
BreakPoint View
Comment 3 Michael Rennie CLA 2012-10-02 11:48:19 EDT
Can you provide an example snippet that causes the problem? 

Testing with a simple Java application I cannot reproduce, even if a variable referenced in an expression goes out of scope we do not set it to null you get something like this:

"<var_name> cannot be resolved to a variable"
Comment 4 Alessio Pollero CLA 2012-10-02 16:48:19 EDT
Created attachment 221809 [details]
Archived Project

Look at the line 404 of the FixedArraySet.java in the project this cause the exception, to reproduce the issue run the FixedArraySetTest.java JUnit Test in debug mode ...

Archived Project in the attachment ...
Comment 5 Michael Rennie CLA 2013-03-08 10:06:28 EST
(In reply to comment #4)
> Created attachment 221809 [details]
> Archived Project
> 
> Look at the line 404 of the FixedArraySet.java in the project this cause the
> exception, to reproduce the issue run the FixedArraySetTest.java JUnit Test
> in debug mode ...
> 
> Archived Project in the attachment ...

Using the attached project + steps I cannot reproduce using:

Version: 4.3.0
Build id: I20130307-2000

Steps I tried:

1. create some expressions for vars within the FixedArraySetTest / FixedArraySet / random other out-of-scope code
2. create a line breakpoint in FixedArraySet line 404
3. debug + step over exception
4. remove line bp from 2 and create an exception breakpoint for NoSuchElementException
5. debug again
6. add back the line bp so that both are present
7. debug again

Even switching perpectives during debugging the expressions always correctly evaluated to either their value or the standard "<error(s)_during_the_evaluation>" result

Alessio, can you try a 4.3 vanilla version (no other plugins installed) of Eclipse to confirm my results? Or provide some additional steps for me to try?
Comment 6 Michael Rennie CLA 2013-03-14 16:22:11 EDT
Markin worksforme without more information / steps