Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316601 - [debug] Debugger has no valid source position for lifting of phantom role file
Summary: [debug] Debugger has no valid source position for lifting of phantom role file
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 1.4   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 2.0 RC2   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard: trac
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-11 09:05 EDT by Stephan Herrmann CLA
Modified: 2011-06-02 11:33 EDT (History)
0 users

See Also:


Attachments
project for reproduction (2.43 KB, application/zip)
2011-05-17 18:21 EDT, Stephan Herrmann CLA
no flags Details
test & fix (10.03 KB, patch)
2011-05-21 15:01 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-06-11 09:05:00 EDT
(originally from http://trac.objectteams.org/ot/ticket/125)

Given a bound role R of TeamSuper stored in a role file, and also given a TeamSub
extending TeamSuper which inherits R unmodified (i.e., TeamSub contains no 
declaration of R).

If a base object is lifted to TeamSub.R the debugger cannot find the playedBy 
declaration to show what is going on.
Comment 1 Stephan Herrmann CLA 2011-05-08 14:52:29 EDT
Actually, when stepping into lifting the debugger jumps to the class
header of the specific team (TeamSub), which is about as good as it
can get, given that jumping to the tsuper role (in its role file)
would confuse maybe even more.

Note, that the stack frame in the Debug View correctly shows
"TeamSub.{{Lift to R}}(Base)", which suffices to let the user know
what is going on.

Maybe this issue benefits from recent improvements in bug 316697.
No further action is planned.
Comment 2 Stephan Herrmann CLA 2011-05-17 17:45:34 EDT
Verified for 2.0 RC1 using build 201105161939.
Comment 3 Stephan Herrmann CLA 2011-05-17 18:15:18 EDT
By trying even harder I found a constellation that indeed fails to show
any source for lifting. I'll attach the project for reproduction.
Comment 4 Stephan Herrmann CLA 2011-05-17 18:21:50 EDT
Created attachment 195915 [details]
project for reproduction

The bug does not occur if you delete SubTeam/Role3.
Even after re-adding, debugging works fine, until you do a Project>Clean.

At that point lifting to Role2 indeed points into nirvana:
SubTeam.{{Lift to Role2}}(Base) line: 1
Editor shows: Source not found!

Indeed the SMAP contains this entry:
+ 1 Role2.java
bug316601/teams/SubTeam/Role2.java

pointing to the inexistent phantom role.
Comment 5 Stephan Herrmann CLA 2011-05-21 15:01:15 EDT
Created attachment 196277 [details]
test & fix

Here's the previous attachment converted into a proper unit test plus its fix.

The fix is simply to exclude purely copied roles from source line mapping
for liftTo methods.
Comment 6 Stephan Herrmann CLA 2011-05-21 15:03:00 EDT
Committed as r1608,9 for 2.0RC2.
Comment 7 Stephan Herrmann CLA 2011-06-02 11:33:44 EDT
Verified using build 201105311237