Bug 390870 - After an Exception BrakPoint all expressions are evaluated to null !
Summary: After an Exception BrakPoint all expressions are evaluated to null !
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2012-10-01 17:07 EDT by Alessio Pollero CLA
Modified: 2013-03-14 16:22 EDT (History)
2 users (show)

See Also:


Attachments
Debug perspective (217.23 KB, image/png)
2012-10-01 17:07 EDT, Alessio Pollero CLA
no flags Details
Variable View (27.33 KB, image/png)
2012-10-01 17:08 EDT, Alessio Pollero CLA
no flags Details
BreakPoint View (35.56 KB, image/png)
2012-10-01 17:10 EDT, Alessio Pollero CLA
no flags Details
Archived Project (31.62 KB, application/zip)
2012-10-02 16:48 EDT, Alessio Pollero CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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