Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 41332 - NPE and resource exception when comparing an out of sync file
Summary: NPE and resource exception when comparing an out of sync file
Status: RESOLVED DUPLICATE of bug 21818
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M3   Edit
Assignee: Platform-VCM-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-08 10:27 EDT by Tod Creasey CLA
Modified: 2003-08-20 13:56 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2003-08-08 10:27:11 EDT
20030806

When I do a compare with an out of synch file I get two exceptions (I think 
the are in this order). I have added Mike to the list as I think this might 
have something to do with the problems he saw earlier in the week.

STEPS
1) Open Live Synch View
2) Edit a file under CVS control externally (I did this with our buildnotes)
3) Save it
4) Go to the synch view and refresh (I think this is where the CVS Exception 
came from)
5) The file will show up as a conflict. Double click on it
6) Internal error is shown (the NPE below)

!ENTRY org.eclipse.team.cvs.ui 4 0 Aug 08, 2003 10:11:20.672
!MESSAGE Problem deleting resource: /org.eclipse.ui/buildnotes_workbench.html. 
Problems encountered while deleting resources.
!STACK 1
org.eclipse.team.internal.ccvs.core.CVSException[4]: 
org.eclipse.core.internal.resources.ResourceException: Problems encountered 
while deleting resources.
	at org.eclipse.core.internal.resources.Resource.delete
(Resource.java:667)
	at org.eclipse.core.internal.resources.Resource.delete
(Resource.java:678)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFile.delete
(EclipseFile.java:63)
	at 
org.eclipse.team.internal.ccvs.core.util.PrepareForReplaceVisitor.visitFile
(PrepareForReplaceVisitor.java:60)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFile.accept
(EclipseFile.java:167)
	at 
org.eclipse.team.internal.ccvs.core.util.PrepareForReplaceVisitor$1.run
(PrepareForReplaceVisitor.java:105)
	at 
org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.run
(EclipseSynchronizer.java:1300)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFolder$3.run
(EclipseFolder.java:302)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1595)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFolder.run
(EclipseFolder.java:299)
	at 
org.eclipse.team.internal.ccvs.core.util.PrepareForReplaceVisitor.visitResource
s(PrepareForReplaceVisitor.java:96)
	at org.eclipse.team.internal.ccvs.core.CVSTeamProvider$6.run
(CVSTeamProvider.java:649)
	at 
org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.run
(EclipseSynchronizer.java:1300)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFolder$3.run
(EclipseFolder.java:302)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1595)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFolder.run
(EclipseFolder.java:299)
	at org.eclipse.team.internal.ccvs.core.client.Session.internalRun
(Session.java:209)
	at org.eclipse.team.internal.ccvs.core.client.Session.run
(Session.java:158)
	at org.eclipse.team.internal.ccvs.core.CVSTeamProvider.get
(CVSTeamProvider.java:643)
	at org.eclipse.team.internal.ccvs.core.CVSTeamProvider.get
(CVSTeamProvider.java:631)
	at 
org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction.performReplac
e(ReplaceWithRemoteAction.java:66)
	at 
org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction$1.execute
(ReplaceWithRemoteAction.java:43)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run
(WorkspaceModifyOperation.java:71)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1595)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run
(WorkspaceModifyOperation.java:85)
	at org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager.run
(RepositoryManager.java:802)
	at org.eclipse.team.internal.ccvs.ui.actions.CVSAction$1.run
(CVSAction.java:241)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:101)
!ENTRY org.eclipse.team.cvs.core 4 4 Aug 08, 2003 10:11:20.688
!MESSAGE Problem deleting resource: /org.eclipse.ui/buildnotes_workbench.html. 
Problems encountered while deleting resources.
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Problems encountered 
while deleting resources.
	at org.eclipse.core.internal.resources.Resource.delete
(Resource.java:667)
	at org.eclipse.core.internal.resources.Resource.delete
(Resource.java:678)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFile.delete
(EclipseFile.java:63)
	at 
org.eclipse.team.internal.ccvs.core.util.PrepareForReplaceVisitor.visitFile
(PrepareForReplaceVisitor.java:60)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFile.accept
(EclipseFile.java:167)
	at 
org.eclipse.team.internal.ccvs.core.util.PrepareForReplaceVisitor$1.run
(PrepareForReplaceVisitor.java:105)
	at 
org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.run
(EclipseSynchronizer.java:1300)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFolder$3.run
(EclipseFolder.java:302)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1595)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFolder.run
(EclipseFolder.java:299)
	at 
org.eclipse.team.internal.ccvs.core.util.PrepareForReplaceVisitor.visitResource
s(PrepareForReplaceVisitor.java:96)
	at org.eclipse.team.internal.ccvs.core.CVSTeamProvider$6.run
(CVSTeamProvider.java:649)
	at 
org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.run
(EclipseSynchronizer.java:1300)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFolder$3.run
(EclipseFolder.java:302)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1595)
	at org.eclipse.team.internal.ccvs.core.resources.EclipseFolder.run
(EclipseFolder.java:299)
	at org.eclipse.team.internal.ccvs.core.client.Session.internalRun
(Session.java:209)
	at org.eclipse.team.internal.ccvs.core.client.Session.run
(Session.java:158)
	at org.eclipse.team.internal.ccvs.core.CVSTeamProvider.get
(CVSTeamProvider.java:643)
	at org.eclipse.team.internal.ccvs.core.CVSTeamProvider.get
(CVSTeamProvider.java:631)
	at 
org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction.performReplac
e(ReplaceWithRemoteAction.java:66)
	at 
org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction$1.execute
(ReplaceWithRemoteAction.java:43)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run
(WorkspaceModifyOperation.java:71)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1595)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run
(WorkspaceModifyOperation.java:85)
	at org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager.run
(RepositoryManager.java:802)
	at org.eclipse.team.internal.ccvs.ui.actions.CVSAction$1.run
(CVSAction.java:241)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:101)
!ENTRY org.eclipse.core.resources 4 4 Aug 08, 2003 10:11:20.688
!MESSAGE Problems encountered while deleting resources.
!SUBENTRY 1 org.eclipse.core.resources 4 274 Aug 08, 2003 10:11:20.688
!MESSAGE Resource is out of sync with the file 
system: /org.eclipse.ui/buildnotes_workbench.html.
!ENTRY org.eclipse.jface 4 2 Aug 08, 2003 10:19:45.234
!MESSAGE Problems occurred when invoking code from plug-
in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.team.internal.ui.sync.views.SynchronizeView$5.open
(SynchronizeView.java:304)
	at org.eclipse.jface.viewers.StructuredViewer$2.run
(StructuredViewer.java:393)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:1021)
	at org.eclipse.core.runtime.Platform.run(Platform.java:421)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen
(StructuredViewer.java:402)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen
(StructuredViewer.java:602)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen
(StructuredViewer.java:690)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent
(OpenStrategy.java:211)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:204)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent
(OpenStrategy.java:340)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:88)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:850)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2201)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1882)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1686)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1670)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:865)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:296)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:596)
	at org.eclipse.team.internal.ui.sync.views.SynchronizeView$5.open
(SynchronizeView.java:304)
	at org.eclipse.jface.viewers.StructuredViewer$2.run
(StructuredViewer.java:393)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:1021)
	at org.eclipse.core.runtime.Platform.run(Platform.java:421)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen
(StructuredViewer.java:402)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen
(StructuredViewer.java:602)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen
(StructuredViewer.java:690)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent
(OpenStrategy.java:211)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:204)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent
(OpenStrategy.java:340)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:88)
	at org.eclipse.core.launcher.Main.main(Main.java:596)
Comment 1 Jean-Michel Lemieux CLA 2003-08-08 11:36:50 EDT
I wasn't able to get the NPE but I did notice a couple of other strangeness with
resources that are out-of-sync (OOS) with the file system.

1. opening the compare editor with an OOS resource shows the local as empty.
This is because the ResourceNode eats the CoreException and return null.

2. the background sync chokes on OOS resources because the CVS plugin doesn't
handle them well. We should investigate how to refresh files in these cases and
ensuring that the CVS meta files are also loaded. The problem is that a refresh
will cause a delta and builds...
Comment 2 Mike Wilson CLA 2003-08-08 11:59:36 EDT
Can we *please* just build in "auto-sync with the filesystem"? The old behavior was never what 
people wanted anyway.
Comment 3 Jean-Michel Lemieux CLA 2003-08-08 12:15:05 EDT
If the auot-refresh plugin was available, would there still exist cases where 
a file is out-of-sync? I assume that on Linux this would be true because the 
verification algorithm is a simple poll.
Comment 4 Mike Wilson CLA 2003-08-08 13:26:49 EDT
Well, yes... But clearly at any point where we currently detect the case and put up a dialog, we 
could just detect the case and do the refresh. This plus the background (polled) update would 
likely work well enough for all situations.
Comment 5 Jean-Michel Lemieux CLA 2003-08-20 13:56:08 EDT
The NPE is fixed but the refresh problem is still valid. Marking as dupe of our
refresh with file system bug.

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