Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF CDO] Undo adding first object to a list throws ArrayIndexOutOfBoundsException
[EMF CDO] Undo adding first object to a list throws ArrayIndexOutOfBoundsException [message #512902] Mon, 08 February 2010 10:25 Go to next message
Bjoern Sundin is currently offline Bjoern SundinFriend
Messages: 47
Registered: July 2009
Member
I'm using EMF 2.6M5 and tailing CDO 3.0 HEAD

Problem description:

I create and add one or more objects to a containment list using an implementation of an AbstractEMFOperation.

The containment list has following attributes:
org.eclipse.emf.ecore.impl.EReferenceImpl@19a19fd (name: ownedDatapoints) (ordered: true, unique: true, lowerBound: 0,
upperBound: -1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived: false)
(containment: true, resolveProxies: false)

I then invoke Undo until the list is empty again.

The last undo fails (one object is remaing in the list) with following exception:

java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.set(ArrayList.java:339)
at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.set( BaseCDORevision.java:495)
at org.eclipse.emf.internal.cdo.CDOStore.unset(CDOStore.java:38 4)
at org.eclipse.emf.ecore.impl.EStoreEObjectImpl$BasicEStoreELis t.unset(EStoreEObjectImpl.java:175)
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateMany.dynamicUnset(EStructuralFeatureImpl.java:1 744)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicUnset(Ba sicEObjectImpl.java:1220)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObj ectImpl.java:1194)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObj ectImpl.java:1164)
at org.eclipse.emf.ecore.change.impl.FeatureChangeImpl.apply(Fe atureChangeImpl.java:516)
at org.eclipse.emf.ecore.change.impl.FeatureChangeImpl.applyAnd Reverse(FeatureChangeImpl.java:494)
at org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.appl yAndReverse(ChangeDescriptionImpl.java:368)
at org.eclipse.emf.transaction.util.CompositeChangeDescription. applyAndReverse(CompositeChangeDescription.java:117)
at org.eclipse.emf.workspace.AbstractEMFOperation.doUndo(Abstra ctEMFOperation.java:695)
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doUndo(AbstractTransactionalCommand.java: 260)
at org.eclipse.emf.workspace.AbstractEMFOperation.undo(Abstract EMFOperation.java:370)
at org.eclipse.core.commands.operations.DefaultOperationHistory .doUndo(DefaultOperationHistory.java:415)
at org.eclipse.core.commands.operations.DefaultOperationHistory .undo(DefaultOperationHistory.java:1280)
at org.eclipse.ui.operations.UndoActionHandler.runCommand(UndoA ctionHandler.java:78)
at org.eclipse.ui.operations.OperationHistoryActionHandler$4.ru n(OperationHistoryActionHandler.java:311)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:372)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDialog.java:507)
at org.eclipse.ui.internal.operations.TimeTriggeredProgressMoni torDialog.access$6(TimeTriggeredProgressMonitorDialog.java:1 )
at org.eclipse.ui.internal.operations.TimeTriggeredProgressMoni torDialog$2.run(TimeTriggeredProgressMonitorDialog.java:203)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at org.eclipse.ui.internal.operations.TimeTriggeredProgressMoni torDialog.run(TimeTriggeredProgressMonitorDialog.java:216)
at org.eclipse.ui.operations.OperationHistoryActionHandler.run( OperationHistoryActionHandler.java:326)
at org.eclipse.gmf.runtime.common.ui.action.actions.global.Glob alUndoAction.doRun(GlobalUndoAction.java:245)
at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandl er.run(AbstractActionHandler.java:359)
at org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(A ctionManager.java:229)
at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandl er.runWithEvent(AbstractActionHandler.java:377)
at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetA ction.java:230)
at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3984)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3577)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2407)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2371)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 20)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at ch.bergauer.rcp.amset.Application.start(Application.java:31)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:367)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 611)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566)
at org.eclipse.equinox.launcher.Main.run(Main.java:1363)
at org.eclipse.equinox.launcher.Main.main(Main.java:1339)

Any ideas?

Thanks,
Bjoern
Re: [EMF CDO] Undo adding first object to a list throws ArrayIndexOutOfBoundsException [message #513000 is a reply to message #512902] Mon, 08 February 2010 14:37 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6683
Registered: July 2009
Senior Member
Hi Bjoern,

Only recently I learned that one can unset features that are not
unsettable. We have to fix that in CDO. Please file a bugzilla.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 08.02.2010 11:25, schrieb Bjoern Sundin:
> I'm using EMF 2.6M5 and tailing CDO 3.0 HEAD
>
> Problem description:
>
> I create and add one or more objects to a containment list using an implementation of an AbstractEMFOperation.
>
> The containment list has following attributes:
> org.eclipse.emf.ecore.impl.EReferenceImpl@19a19fd (name: ownedDatapoints) (ordered: true, unique: true, lowerBound: 0,
> upperBound: -1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived: false)
> (containment: true, resolveProxies: false)
>
> I then invoke Undo until the list is empty again.
>
> The last undo fails (one object is remaing in the list) with following exception:
>
> java.lang.ArrayIndexOutOfBoundsException: -1
> at java.util.ArrayList.set(ArrayList.java:339)
> at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.set( BaseCDORevision.java:495)
> at org.eclipse.emf.internal.cdo.CDOStore.unset(CDOStore.java:38 4)
> at org.eclipse.emf.ecore.impl.EStoreEObjectImpl$BasicEStoreELis t.unset(EStoreEObjectImpl.java:175)
> at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateMany.dynamicUnset(EStructuralFeatureImpl.java:1 744)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicUnset(Ba sicEObjectImpl.java:1220)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObj ectImpl.java:1194)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObj ectImpl.java:1164)
> at org.eclipse.emf.ecore.change.impl.FeatureChangeImpl.apply(Fe atureChangeImpl.java:516)
> at org.eclipse.emf.ecore.change.impl.FeatureChangeImpl.applyAnd Reverse(FeatureChangeImpl.java:494)
> at org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.appl yAndReverse(ChangeDescriptionImpl.java:368)
> at org.eclipse.emf.transaction.util.CompositeChangeDescription. applyAndReverse(CompositeChangeDescription.java:117)
> at org.eclipse.emf.workspace.AbstractEMFOperation.doUndo(Abstra ctEMFOperation.java:695)
> at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doUndo(AbstractTransactionalCommand.java: 260)
> at org.eclipse.emf.workspace.AbstractEMFOperation.undo(Abstract EMFOperation.java:370)
> at org.eclipse.core.commands.operations.DefaultOperationHistory .doUndo(DefaultOperationHistory.java:415)
> at org.eclipse.core.commands.operations.DefaultOperationHistory .undo(DefaultOperationHistory.java:1280)
> at org.eclipse.ui.operations.UndoActionHandler.runCommand(UndoA ctionHandler.java:78)
> at org.eclipse.ui.operations.OperationHistoryActionHandler$4.ru n(OperationHistoryActionHandler.java:311)
> at org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:464)
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:372)
> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDialog.java:507)
> at org.eclipse.ui.internal.operations.TimeTriggeredProgressMoni torDialog.access$6(TimeTriggeredProgressMonitorDialog.java:1 )
> at org.eclipse.ui.internal.operations.TimeTriggeredProgressMoni torDialog$2.run(TimeTriggeredProgressMonitorDialog.java:203)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
> at org.eclipse.ui.internal.operations.TimeTriggeredProgressMoni torDialog.run(TimeTriggeredProgressMonitorDialog.java:216)
> at org.eclipse.ui.operations.OperationHistoryActionHandler.run( OperationHistoryActionHandler.java:326)
> at org.eclipse.gmf.runtime.common.ui.action.actions.global.Glob alUndoAction.doRun(GlobalUndoAction.java:245)
> at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandl er.run(AbstractActionHandler.java:359)
> at org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(A ctionManager.java:229)
> at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandl er.runWithEvent(AbstractActionHandler.java:377)
> at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetA ction.java:230)
> at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:584)
> at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:501)
> at org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3984)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3577)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2407)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2371)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 20)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at ch.bergauer.rcp.amset.Application.start(Application.java:31)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:367)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 611)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1363)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1339)
>
> Any ideas?
>
> Thanks,
> Bjoern
>
>
>


Re: [EMF CDO] Undo adding first object to a list throws ArrayIndexOutOfBoundsException [message #513044 is a reply to message #513000] Mon, 08 February 2010 16:18 Go to previous messageGo to next message
Bjoern Sundin is currently offline Bjoern SundinFriend
Messages: 47
Registered: July 2009
Member
Hi Eike,

Yes, I can add a bugzilla, but would you shortly elaborate this for me? I would like to understand the problem in relation to my
issue, and also to be able to formulate the problem correctly in the bugzilla.

The feature I define has unsettable=false. I gather then is is a feature that is not unsettable (lowerBound=0 but there is no
default...?).

When I delete the second last object in the containment list the execution differs in FeatureChangeImpl as isSet() on line 502
returns true when there is more than one item in the list. For the last item in the list, though, the call to isSet() on line 502 in
FeatureChangeImpl returns false. I could never verify when or from where the set variable got changed.
When isSET() on line 502 in FeatureChangeImpl returns false it ends up in the CDOStore on line 384 where -1 is passed as index to
the set method of the BaseCDORevision. As the feature isMany=true the result is that getList(feature).set(index, value); throws an
ArrayIndexOutOfBounds exception, not liking the -1 index obviously.

Thanks,
Bj
Re: [EMF CDO] Undo adding first object to a list throws ArrayIndexOutOfBoundsException [message #513079 is a reply to message #513044] Mon, 08 February 2010 18:14 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6683
Registered: July 2009
Senior Member
Am 08.02.2010 17:18, schrieb Bjoern Sundin:
> Hi Eike,
>
> Yes, I can add a bugzilla, but would you shortly elaborate this for me? I would like to understand the problem in relation to my
> issue, and also to be able to formulate the problem correctly in the bugzilla.
>
> The feature I define has unsettable=false. I gather then is is a feature that is not unsettable (lowerBound=0 but there is no
> default...?).
>
I used to think that for this kind of features isSet() always returns
true and unset() does nothing. But that's not true. Unset() sets the
default value for single-valued features and is like clear() for
many-valued features.

> When I delete the second last object in the containment list the execution differs in FeatureChangeImpl as isSet() on line 502
> returns true when there is more than one item in the list. For the last item in the list, though, the call to isSet() on line 502 in
> FeatureChangeImpl returns false. I could never verify when or from where the set variable got changed.
> When isSET() on line 502 in FeatureChangeImpl returns false it ends up in the CDOStore on line 384 where -1 is passed as index to
> the set method of the BaseCDORevision.
That must be fixed.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper


> As the feature isMany=true the result is that getList(feature).set(index, value); throws an
> ArrayIndexOutOfBounds exception, not liking the -1 index obviously.
>
> Thanks,
> Björn
>
> "Eike Stepper"<stepper@esc-net.de> schrieb im Newsbeitrag news:hkp7k5$qrv$1@build.eclipse.org...
>
>> Hi Bjoern,
>>
>> Only recently I learned that one can unset features that are not unsettable. We have to fix that in CDO. Please file a bugzilla.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>> Am 08.02.2010 11:25, schrieb Bjoern Sundin:
>>
>>> I'm using EMF 2.6M5 and tailing CDO 3.0 HEAD
>>>
>>> Problem description:
>>>
>>> I create and add one or more objects to a containment list using an implementation of an AbstractEMFOperation.
>>>
>>> The containment list has following attributes:
>>> org.eclipse.emf.ecore.impl.EReferenceImpl@19a19fd (name: ownedDatapoints) (ordered: true, unique: true, lowerBound: 0,
>>> upperBound: -1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived:
>>> false)
>>> (containment: true, resolveProxies: false)
>>>
>>> I then invoke Undo until the list is empty again.
>>>
>>> The last undo fails (one object is remaing in the list) with following exception:
>>>
>>> java.lang.ArrayIndexOutOfBoundsException: -1
>>> at java.util.ArrayList.set(ArrayList.java:339)
>>> at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.set( BaseCDORevision.java:495)
>>> at org.eclipse.emf.internal.cdo.CDOStore.unset(CDOStore.java:38 4)
>>> at org.eclipse.emf.ecore.impl.EStoreEObjectImpl$BasicEStoreELis t.unset(EStoreEObjectImpl.java:175)
>>> at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateMany.dynamicUnset(EStructuralFeatureImpl.java:1 744)
>>> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicUnset(Ba sicEObjectImpl.java:1220)
>>> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObj ectImpl.java:1194)
>>> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObj ectImpl.java:1164)
>>> at org.eclipse.emf.ecore.change.impl.FeatureChangeImpl.apply(Fe atureChangeImpl.java:516)
>>> at org.eclipse.emf.ecore.change.impl.FeatureChangeImpl.applyAnd Reverse(FeatureChangeImpl.java:494)
>>> at org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.appl yAndReverse(ChangeDescriptionImpl.java:368)
>>> at org.eclipse.emf.transaction.util.CompositeChangeDescription. applyAndReverse(CompositeChangeDescription.java:117)
>>> at org.eclipse.emf.workspace.AbstractEMFOperation.doUndo(Abstra ctEMFOperation.java:695)
>>> at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doUndo(AbstractTransactionalCommand.java: 260)
>>> at org.eclipse.emf.workspace.AbstractEMFOperation.undo(Abstract EMFOperation.java:370)
>>> at org.eclipse.core.commands.operations.DefaultOperationHistory .doUndo(DefaultOperationHistory.java:415)
>>> at org.eclipse.core.commands.operations.DefaultOperationHistory .undo(DefaultOperationHistory.java:1280)
>>> at org.eclipse.ui.operations.UndoActionHandler.runCommand(UndoA ctionHandler.java:78)
>>> at org.eclipse.ui.operations.OperationHistoryActionHandler$4.ru n(OperationHistoryActionHandler.java:311)
>>> at org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:464)
>>> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:372)
>>> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDialog.java:507)
>>> at org.eclipse.ui.internal.operations.TimeTriggeredProgressMoni torDialog.access$6(TimeTriggeredProgressMonitorDialog.java:1 )
>>> at org.eclipse.ui.internal.operations.TimeTriggeredProgressMoni torDialog$2.run(TimeTriggeredProgressMonitorDialog.java:203)
>>> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
>>> at org.eclipse.ui.internal.operations.TimeTriggeredProgressMoni torDialog.run(TimeTriggeredProgressMonitorDialog.java:216)
>>> at org.eclipse.ui.operations.OperationHistoryActionHandler.run( OperationHistoryActionHandler.java:326)
>>> at org.eclipse.gmf.runtime.common.ui.action.actions.global.Glob alUndoAction.doRun(GlobalUndoAction.java:245)
>>> at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandl er.run(AbstractActionHandler.java:359)
>>> at org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(A ctionManager.java:229)
>>> at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandl er.runWithEvent(AbstractActionHandler.java:377)
>>> at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetA ction.java:230)
>>> at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:584)
>>> at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:501)
>>> at org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050)
>>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3984)
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3577)
>>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2407)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2371)
>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 20)
>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
>>> at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>>> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
>>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>> at ch.bergauer.rcp.amset.Application.start(Application.java:31)
>>> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
>>> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:367)
>>> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 611)
>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566)
>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1363)
>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1339)
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> Bjoern
>>>
>>>
>>>
>>>
>
>


Re: [EMF CDO] Undo adding first object to a list throws ArrayIndexOutOfBoundsException [message #513165 is a reply to message #513079] Tue, 09 February 2010 07:16 Go to previous message
Bjoern Sundin is currently offline Bjoern SundinFriend
Messages: 47
Registered: July 2009
Member
Bug 302233 filed

Cheers
Bjoern


"Eike Stepper" <stepper@esc-net.de> schrieb im Newsbeitrag news:hkpkak$61p$1@build.eclipse.org...
> Am 08.02.2010 17:18, schrieb Bjoern Sundin:
>> Hi Eike,
>>
>> Yes, I can add a bugzilla, but would you shortly elaborate this for me? I would like to understand the problem in relation to my
>> issue, and also to be able to formulate the problem correctly in the bugzilla.
>>
>> The feature I define has unsettable=false. I gather then is is a feature that is not unsettable (lowerBound=0 but there is no
>> default...?).
>>
> I used to think that for this kind of features isSet() always returns true and unset() does nothing. But that's not true. Unset()
> sets the default value for single-valued features and is like clear() for many-valued features.
>
>> When I delete the second last object in the containment list the execution differs in FeatureChangeImpl as isSet() on line 502
>> returns true when there is more than one item in the list. For the last item in the list, though, the call to isSet() on line 502
>> in
>> FeatureChangeImpl returns false. I could never verify when or from where the set variable got changed.
>> When isSET() on line 502 in FeatureChangeImpl returns false it ends up in the CDOStore on line 384 where -1 is passed as index
>> to
>> the set method of the BaseCDORevision.
> That must be fixed.
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>> As the feature isMany=true the result is that getList(feature).set(index, value); throws an
>> ArrayIndexOutOfBounds exception, not liking the -1 index obviously.
>>
>> Thanks,
>> Bj
Previous Topic:Re: An appeal for modeling community review to new "EMF Build Manager Project" Proposal
Next Topic:Persisting loaded resources across two models - pathmap is lost
Goto Forum:
  


Current Time: Sat May 11 02:35:14 GMT 2024

Powered by FUDForum. Page generated in 0.03731 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top