Bug 210046 - Phantom Errors in the editor
Summary: Phantom Errors in the editor
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: 3.5 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-15 19:47 EST by Charles Goodwin CLA
Modified: 2008-09-15 09:16 EDT (History)
4 users (show)

See Also:


Attachments
The phantom errors on-screen - note no errors in the package explorer (211.30 KB, image/png)
2007-11-15 19:47 EST, Charles Goodwin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Goodwin CLA 2007-11-15 19:47:44 EST
Created attachment 83014 [details]
The phantom errors on-screen - note no errors in the package explorer

Build ID: M20071023-1652

Steps To Reproduce:
This one isn't so easy to reproduce (at least, it's not realistic to expect us to isolate an accurate test) but frequently at my company we are experiencing phantom errors being reported in the editor when the rest of Eclipse [correctly] believes there to be none.  See the attached screenshot.

It is worth noting that the complaints are about a class in a project that the problem project depends on.  They are also _not_ in the src/ directory, but in another directory (src_gen/) as they are processed Java files.

The errors can be made to go away by moving the depended project up in the build path order.  Moving it back down, the errors do not come back but often return during heavy usage of Eclipse.

More information:
Comment 1 Dani Megert CLA 2007-11-16 09:08:15 EST
Sorry but we need more info. E.g. what problem(s) is reported? Anything in .log?

> (at least, it's not realistic to expect us
>to isolate an accurate test)
Well, we don't even see the problem, so don't expect us to try to reproduce ;-)
Comment 2 David Williams CLA 2007-11-16 09:41:19 EST
If I might venture a guess ... 
Perhaps those resources in src_gen/ are not correctly being marked as 'derived' resources ... perhaps that bit of info will help the originator narrow down the issue, or eventually lead to reproducible steps?

Comment 3 Dani Megert CLA 2007-11-16 09:44:50 EST
Another cause can be build path errors (please check the Problems view).
Comment 4 Charles Goodwin CLA 2007-11-16 13:30:00 EST
(In reply to comment #3)
> Another cause can be build path errors (please check the Problems view).

If you had looked at the screenshot you would see there are no build [path] errors - merely phantom errors in the text view, but the project actually compiles fine.

(In reply to comment #2)
> If I might venture a guess ... 
> Perhaps those resources in src_gen/ are not correctly being marked as 'derived'
> resources ... perhaps that bit of info will help the originator narrow down the
> issue, or eventually lead to reproducible steps?

Nice idea but not really relevant.  The files are simply in a different source directory but it's all in the build path.  The files used to generate those in src_gen are not Java, therefore not considered by the build.  As far as Eclipse is concerned, it's all normal Java, just in a few locations.


(In reply to comment #1)
> Well, we don't even see the problem, so don't expect us to try to reproduce
> ;-)

It was less implying an effort to reproduce, more a signal to whomever is responsible for the process behind the display of errors in the edit view that there is something wrong.  It looks to me like the process that builds up an error list for the edit view is not successfully pulling in the entire build path, therefore not finding the Java file in question (ID.java) whereas the normal Eclipse build routines are working fine.

Comment 5 Dani Megert CLA 2007-11-19 03:27:59 EST
>If you had looked at the screenshot
Please... I looked at the screen shot. The Problems view in your screen shot does not show all problems, which is obvious if you look at the picture ;-)
1. there is an error on the project (just look in the Package Explorer)
2. the Problems view is filtered (Filter matched 49 of 87 items)
And yes, I saw that the project you're talking about does not have an error but if another project has errors the builder might get confused here.

> It looks to me like the process that builds up an
>error list for the edit view is not successfully pulling in the entire build
>path
The errors in the editor are provided by the reconciler so that they are updated when you edit the file. The state in the Problems view reflects that last build which you either did manually or on last save (if auto-build is on). Is your workspace fully built? Sometimes cleaning and rebuilding all helps.

Moving to JDT Core for comment. Might be dup of bug 194731.
Comment 6 Charles Goodwin CLA 2007-11-19 09:40:59 EST
The errors are in a test project whose source files are not dependents of the screenshot provided.  However since I see that is a bit confusing, if I remember when it next happens I will make sure to include a screenshot with everything successfully built.

It would appear to have similarities with bug 194731 which I will look at more closely.
Comment 7 Jerome Lanneluc CLA 2007-11-22 12:23:35 EST
I don't think this is a dup of bug 194731 as there is no build path problem here and it looks like Charles' project can compile with no error.

(In reply to comment #6)
> The errors are in a test project whose source files are not dependents of the
> screenshot provided.  However since I see that is a bit confusing, if I
> remember when it next happens I will make sure to include a screenshot with
> everything successfully built.
Charles could you please attach the screenshot with everything successfully built?

Also if you hover the error, could you please copy the message here? (e.g. an interesting error would be on an import statement)
Comment 8 Jerome Lanneluc CLA 2008-08-26 05:16:53 EDT
Please reopen if you have more information on this bug (see comment 7)
Comment 9 Frederic Fusier CLA 2008-09-15 09:16:36 EDT
Verified for 3.5M2 using I20080914-2000.