Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 57936

Summary: 3.0 M8 - compiler doesn't update .class files after period of inactivity
Product: [Eclipse Project] Platform Reporter: Eric Bourn <eric.bourn>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: john.arthorne
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Eric Bourn CLA 2004-04-08 12:30:42 EDT
Ever since I installed M8 last week, on occassion the compiler will not update 
the .class files in my output directory.

I'm working with a project and I make changes to a java file.  When I save
the file, the .class file gets updated in the "build" directory I have set
up for the project.  My projects are not contained within the Workspace 
directory (instead, they are in a location similar to C:\Projects\...).  
However, after some time of inactivity, Eclipse seems to "forget" about the 
build directory.  When I try to compile or save the same file
again, the file is compiled, but the class file in the build directory is
never updated.  From then on, none of the class files in the build directory
will be updated.  So, when I try to run a junit test against this class, it
doesn't recognize any of the changes I have made.

The only solution that seems to work for me is shutting down Eclipse and
restarting it.  Then I recompile the file, and it rebuilds the entire project 
the next time I save a file.  Refreshing doesn't seem to do anything.  For some 
reason, Eclipse just stops updating my class files.

JDK: 1.4.1-b21
PC: Windows XP - Service Pack 1
Xeon 2.40 GHz (dual processor)
1.0 GB of RAM
Comment 1 Philipe Mulet CLA 2004-04-08 12:36:43 EDT
Are you using autobuild ? Do you have any information in .log or console ?
Comment 2 Eric Bourn CLA 2004-04-08 12:46:11 EDT
Nothing related to this compiling issue is in the .log file or is displayed in 
the console.

I'm not sure what autobuild is.  I am simple hitting the save button to compile 
the file.  I do have the "Perform build automatically on resource modification" 
option checked in the Workbench preferences.
Comment 3 Kent Johnson CLA 2004-04-08 13:00:41 EDT
What does your .classpath file look like before/after this happens?
Comment 4 Eric Bourn CLA 2004-04-08 13:05:45 EDT
The .classpath file did not change when I restarted Eclipse....

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="Source/Java"/>
	<classpathentry kind="src" path="Test/Source/Java"/>
	<classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="src" path="/jOMA - 9.2 Imports"/>
	<classpathentry kind="output" path="build"/>
</classpath>
Comment 5 Kent Johnson CLA 2004-04-08 14:06:47 EDT
But was it the same when you noticed that .class files were not being saved.

After the restart, it may have been reset.
Comment 6 Eric Bourn CLA 2004-04-08 14:11:14 EDT
Yes, it was the same before and after the restart.

The .classpath file was never updated when I restarted Eclipse.
Comment 7 Kent Johnson CLA 2004-04-08 14:49:30 EDT
Are there errors in the project?
Comment 8 Eric Bourn CLA 2004-04-08 14:55:45 EDT
There are no compile errors or warnings.
Comment 9 Philipe Mulet CLA 2004-04-09 05:18:17 EDT
Last night I saw something similar. At some point, no compile did occur any 
longer; but in my case this was due to the fact I wasn't able to save my  dirty 
editors any longer (they still had the * after a save action). The only thing 
which did work was to force a close of the editor, which then prompted me for 
saving and this one did work. I had nothing in log or console...

Would it be the same for you ? 
Comment 10 Eric Bourn CLA 2004-04-09 11:05:37 EDT
After I save the file, the "*" does go away next to the file name.

I actually just tried starting from a brand new workspace (figuring that maybe 
my old workspace was corrupted) but I just ran into the problem again.  

I just tried editing a new file (a file that exists in a cvs repository), but 
it doesn't seem to compile it.  If I update the file, I do not get the ">" sign 
in the PackageExplorer view that indicates the file is now different from the 
source file.
Comment 11 Eric Bourn CLA 2004-04-09 12:01:52 EDT
Another thing to add...

When this problem occurs, I have noticed that nothing in the Problems view or 
Tasks view is ever updated.  For instance, if I add a TODO task, this task will 
never be updated to the Task view.  When I restart Eclipse however, it will 
show up.
Comment 12 Kent Johnson CLA 2004-04-13 12:37:30 EDT
When this happens, can you look at the Progress view & enable the 'verbose' 
mode (see the menu in the top right corner).

What jobs do you have running? Are any waiting on other jobs?
Comment 13 Eric Bourn CLA 2004-04-13 13:08:06 EDT
When I enable verbose, the only thing that I see is:

- Update Progress (SYSTEM)
- Zzz SLEEPING: Periodic workspace save.

The progress view does not get updated when this all happens.
Comment 14 Kent Johnson CLA 2004-04-13 13:15:08 EDT
You don't see a build job getting posted? Or Update Task view or Problems view?
Comment 15 Kent Johnson CLA 2004-04-13 13:16:48 EDT
They may be too quick so try a big change like making a heavily referenced 
type non-public.
Comment 16 Eric Bourn CLA 2004-04-13 16:09:45 EDT
I tried updating a method from public to private and added a new task.

After I saved the class, nothing was updated in any of the views.  The progress 
view did not show anything and the task view did not show the new task that was 
added.

I can't really tell why this starts happening though.  Sometimes it may occur 
after five minutes, other times it may not be for an hour or so.
Comment 17 Kent Johnson CLA 2004-04-13 16:58:12 EDT
This seems to the same as bug 57656.

Moving to Platform Core.
Comment 18 John Arthorne CLA 2004-04-13 17:33:25 EDT

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