Community
Participate
Working Groups
While testing 3.6.2 RC3 on Windows Vista 64-bit, and running an internal Eclipse, I go this stack trace in the console: !ENTRY org.eclipse.core.jobs 4 2 2011-02-03 13:31:34.977 !MESSAGE An internal error occurred during: "Periodic workspace save.". !STACK 0 java.lang.IllegalStateException: Workspace is closed. at org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java:367) at org.eclipse.core.internal.resources.DelayedSnapshotJob.run(DelayedSnapshotJob.java:41) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) I am completely unable to replicate the problem (I tried 4 times). I would be inclined to close this as "works for me", however I thought I would open the bug anyhow in case it is useful to know that this state can happen. Perhaps it would be better in future to just not report an illegal state in this case, because it doesn't really matter... the workspace was already saved correctly.
Looks similar to Bug 106985. In DelayedSnapshotJob#run we have: if (ResourcesPlugin.getWorkspace() == null) return Status.OK_STATUS; however #getWorkspace does not return null, it just throws IllegalStateException, if the workspace is null. I would just return with OK_STATUS, if the exception is thrown.
ResourcesPlugin#getWorkspace does not return null, it just throws IllegalStateExeption. See Bug 34069. So we need to catch the exception, log a waning and return OK_STATUS. Fixed.