Bug 55681 - [Sync Info] NPE in EclipseSynchronizer.endOperation
Summary: [Sync Info] NPE in EclipseSynchronizer.endOperation
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-cvs-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 67442 73585 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-23 09:48 EST by Pascal Rapicault CLA
Modified: 2019-09-06 16:12 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2004-03-23 09:48:03 EST
java.lang.NullPointerException
	at
org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.endOperation(EclipseSynchronizer.java:560)
	at
org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.getFolderSync(EclipseSynchronizer.java:184)
	at
org.eclipse.team.internal.ccvs.core.syncinfo.CVSBaseResourceVariantTree.getBytes(CVSBaseResourceVariantTree.java:39)
	at
org.eclipse.team.internal.core.subscribers.DescendantResourceVariantByteStore.getBytes(DescendantResourceVariantByteStore.java:59)
	at
org.eclipse.team.internal.ccvs.core.syncinfo.CVSResourceVariantTree.getParentBytes(CVSResourceVariantTree.java:151)
	at
org.eclipse.team.internal.ccvs.core.syncinfo.CVSResourceVariantTree.getResourceVariant(CVSResourceVariantTree.java:124)
	at
org.eclipse.team.core.variants.ResourceVariantTreeSubscriber.getSyncInfo(ResourceVariantTreeSubscriber.java:50)
	at
org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber.getSyncInfo(CVSSyncTreeSubscriber.java:77)
	at
org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.collect(SubscriberEventHandler.java:234)
	at
org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.collect(SubscriberEventHandler.java:220)
	at
org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.collect(SubscriberEventHandler.java:220)
	at
org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.collect(SubscriberEventHandler.java:220)
	at
org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.processEvent(SubscriberEventHandler.java:385)
	at
org.eclipse.team.internal.core.BackgroundEventHandler.processEvents(BackgroundEventHandler.java:273)
	at
org.eclipse.team.internal.core.BackgroundEventHandler$1.run(BackgroundEventHandler.java:131)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:62)
Comment 1 Pascal Rapicault CLA 2004-03-23 09:48:21 EST
I200403220800
Comment 2 Michael Valenta CLA 2004-03-23 10:14:56 EST
This means that ResourcesPlugin.getWorkspace() returned null but didn't in the 
begin operation. Was this during shutdown?
Comment 3 Jean-Michel Lemieux CLA 2004-03-23 10:20:11 EST
It was actually at startup.
Comment 4 Jean-Michel Lemieux CLA 2004-03-23 11:05:35 EST
Question to Core, since getWorkspace() is not spec'ed to return null what should
clients to when it becomes null? Should we check?

What is bizzare is that getWorkspace() was called successfully in beginOperation().
Comment 5 John Arthorne CLA 2004-03-23 12:16:03 EST
This happens in two cases:

- before resources plug-in has started
- after resources plug-in has shutdown

I would only expect this to happen if, for example, a background thread attempts
to access the workspace after it has shutdown.  In these cases some kind of
protection would be good, such as canceling and joining your background event in
your own plugin shutdown to ensure that it never continues to run after your
plugin.shutdown() has exited.

I think ResourcesPlugin.getWorkspace spec should be updated to reflect this.
Comment 6 John Arthorne CLA 2004-03-23 14:33:06 EST
I have updated the ResourcesPlugin.getWorkspace spec to say it returns null if
the resources plugin has been shut down. You shoulnd't have to do null checks
every time you access the workspace, as long as you clean up your background
threads before shutting down your plugin.
Comment 7 Jean-Michel Lemieux CLA 2004-03-24 16:41:49 EST
We currently don't have a mechanism for identifying all of the plugin's job. 
But this could be done and then shutdown in the plug-in should clean-up.
Comment 8 Jean-Michel Lemieux CLA 2004-06-11 16:51:02 EDT
Post 3.0
Comment 9 Michael Valenta CLA 2004-06-16 11:01:31 EDT
*** Bug 67442 has been marked as a duplicate of this bug. ***
Comment 10 Michael Valenta CLA 2004-09-09 13:32:43 EDT
*** Bug 73585 has been marked as a duplicate of this bug. ***
Comment 11 Eclipse Webmaster CLA 2019-09-06 16:12:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.