Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 266125 - NPE during handleInvalidation in CDOViewImpl
Summary: NPE during handleInvalidation in CDOViewImpl
Status: CLOSED DUPLICATE of bug 266124
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-25 08:42 EST by Anders Forsell CLA
Modified: 2010-06-29 09:23 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 Anders Forsell CLA 2009-02-25 08:42:25 EST
I have turned on change policy "CDOAdapterPolicy.ALL" for my transaction. I do get the expected EMF notifications on the client, but I am also getting a NullPointerException in "handleInvalidation", CDOViewImpl line 1083, "synchronized (objects)", where objects is null (stack trace is below).
Also, the NPE was seen in "reload()" line 1340, "synchronized (object)".

I am using CDO 2.0 (M5).

Could it be a race condition where the "doDeactivate()" sets "objects" to null, and then other threads are accessing the "handleInvalidation" or "reload" methods?

The following state of the CDOTransaction was copied from the debugger, when it was stopped in "handleInvalidation":

adapterPolicyManager	CDOViewImpl$AdapterManager  (id=194)	
changeSubscriptionManager	null	
conflict	0	
dirty	false	
featureAnalyzer	null	
firstSavepoint	null	
handlers	ArrayList<E>  (id=202)	
lastCommitTime	0	
lastLookupID	null	
lastLookupObject	null	
lastSavepoint	null	
lastTemporaryID	0	
lifecycleSemaphore	Semaphore  (id=207)	
lifecycleState	ILifecycleState  (id=209)	
listeners	ArrayList<E>  (id=211)	
lock	ReentrantLock  (id=213)	
objects	null	
options	null	
rootResource	null	
session	null	
store	null	
transactionStrategy	null	
uriHandler	CDOURIHandler  (id=221)	
viewID	9	
viewSet	null	

This is the stack trace:

!ENTRY org.eclipse.emf.cdo 4 0 2009-02-25 14:29:36.913
!MESSAGE NullPointerException
!STACK 0
java.lang.NullPointerException
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.handleInvalidation(CDOViewImpl.java:1086)
	at org.eclipse.emf.internal.cdo.session.CDOSessionImpl$1.run(CDOSessionImpl.java:570)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
	at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:64)
	at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:154)
Comment 1 Simon Mc Duff CLA 2009-02-25 09:10:05 EST

*** This bug has been marked as a duplicate of bug 266124 ***
Comment 2 Eike Stepper CLA 2010-06-29 04:44:50 EDT
Closing