Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324544 - IndexOutOfBoundsException on sending delta notifications
Summary: IndexOutOfBoundsException on sending delta notifications
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.2   Edit
Hardware: Macintosh Mac OS X
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 02:44 EDT by Egidijus Vaisnora CLA
Modified: 2013-06-27 03:33 EDT (History)
2 users (show)

See Also:


Attachments
test case attached (2.22 KB, text/plain)
2010-09-06 02:52 EDT, Egidijus Vaisnora CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egidijus Vaisnora CLA 2010-09-06 02:44:59 EDT
Invoking session refresh causes exception

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
	at java.util.ArrayList.get(ArrayList.java:322)
	at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.get(BaseCDORevision.java:409)
	at org.eclipse.emf.internal.cdo.CDONotificationBuilder.visit(CDONotificationBuilder.java:137)
	at org.eclipse.emf.cdo.internal.common.revision.delta.CDORemoveFeatureDeltaImpl.accept(CDORemoveFeatureDeltaImpl.java:74)
	at org.eclipse.emf.internal.cdo.CDONotificationBuilder.visit(CDONotificationBuilder.java:192)
	at org.eclipse.emf.cdo.internal.common.revision.delta.CDOListFeatureDeltaImpl.accept(CDOListFeatureDeltaImpl.java:410)
	at org.eclipse.emf.cdo.internal.common.revision.delta.CDORevisionDeltaImpl.accept(CDORevisionDeltaImpl.java:284)
	at org.eclipse.emf.internal.cdo.CDONotificationBuilder.buildNotification(CDONotificationBuilder.java:102)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.sendDeltaNotifications(CDOViewImpl.java:1633)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.invalidate(CDOViewImpl.java:1479)
	at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.processRefreshSessionResult(CDOSessionImpl.java:568)
	at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.refresh(CDOSessionImpl.java:529)
	at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.refresh(CDOSessionImpl.java:500)
Comment 1 Egidijus Vaisnora CLA 2010-09-06 02:52:35 EDT
Created attachment 178238 [details]
test case attached

test case illustrating exception
Comment 2 Egidijus Vaisnora CLA 2010-09-06 03:09:08 EDT
Idea is that I have two users and both are editing the same list feature - bot are adding an element. First user commits changes and second one makes refresh.
Comment 3 Egidijus Vaisnora CLA 2010-09-06 03:30:04 EDT
Originally user 2 is in conflict state in this situation. However strange is that change notification is fired before handling conflicts. It would be situation, when conflict is resolved to the different values, than it got fired. More ever, created delta for second user is odd - list delta has two deltas REMOVE and ADD, regardless that on server was originally executed ADD action.
Comment 4 Erwin Betschart CLA 2010-09-06 11:51:52 EDT
(In reply to comment #3)
> Originally user 2 is in conflict state in this situation. However strange is
> that change notification is fired before handling conflicts....

Afaik this is already fixed on head (4.0.0). The conflics are resolved before the notification is built up.
Comment 5 Egidijus Vaisnora CLA 2010-09-07 02:46:34 EDT
Looks like fix in head was for https://bugs.eclipse.org/bugs/show_bug.cgi?id=316887.
Comment 6 Eike Stepper CLA 2010-11-16 01:03:24 EST
Changing version to 3.0.

Let's only use major versions to indicate the development stream. If more precise baseline info is needed let's insert a time stamp in a comment.
Comment 7 Eike Stepper CLA 2011-06-23 04:27:53 EDT
Moving all open problem reports to 4.0
Comment 8 Eike Stepper CLA 2012-06-05 07:31:05 EDT
Moving all open bug reports to 4.1 because the release is very near and it's hghly unlikely that there will be spare time to address 4.0 problems.

Please make sure that your patches can be applied against the master branch and that your problem is not already fixed there!!!
Comment 9 Eike Stepper CLA 2012-08-14 22:54:19 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 10 Eike Stepper CLA 2012-10-31 07:34:50 EDT
The attached test case passes and I've committed it. The original problem has likely been fixed via some other bug during the years.
Comment 11 Eike Stepper CLA 2013-06-27 03:33:59 EDT
Available in R20130613-1157 (4.2)