Home » Modeling » GMF (Graphical Modeling Framework) » ConcurrentModificationException
ConcurrentModificationException [message #158801] |
Thu, 08 November 2007 04:54  |
Eclipse User |
|
|
|
Originally posted by: trommas.yahoo.com
I get a java.util.ConcurrentModificationException (when Loading a
Resource, and then setting a relation between a element in the current
editor - and one in the loaded resource.) Everything is seems to be
setup correct.
Does anyone know this error?
Thanks,
Tomas Zijdemans
|
|
| | | | | | | | | | | | |
Re: ConcurrentModificationException [message #159507 is a reply to message #159300] |
Sun, 11 November 2007 12:22   |
Eclipse User |
|
|
|
Thanks for the tip, will check it out. After a week hammering at this
error, I've lost all faith in my ability to create multiple editors and
make them function together. I get this error, and Load Resources shows
nothing in "Browse workspace".
So thought I would ask you guys what needs to be done.
Here is what I do:
1. Single ecore and genmodel (with one root element for each editor)
2. Derive tooling, graph and map for each editor.
3. Derive a generator with these attributes set unique:
- File extensions
- Model ID
- Visual ID
- Plugin ID
- Editor ID
Any input is, as always, greatly appreciated :)
Best Regards,
Tomas Zijdemans
Ed Merks wrote:
> Tomas,
>
> You might not know about it, but in the breakpoints view you can set a
> breakpoint that will stop when a particular exception is about to be
> thrown. Look for the "J!" button...
>
>
> Tomas Zijdemans wrote:
>> Thanks for helping Alex! (I got a deadline coming up, so I'm in a bit
>> of a hurry on this one)
>>
>> I started the editor again to view where in the DocumentProvider I
>> should start, but then everything worked again !! - This bug truly has
>> me baffled! Now i can't reproduce the DocumentProvider error without
>> making completely new diagrams.
>>
>> I tried debugging the relation with breakpoints, but everything seemed
>> normal. So it's a mystery where the Concurrent Exception originates
>> from..
>>
>> Thanks,
>>
>> Tomas Zijdemans
>>
>>
>> Alex Shatalin wrote:
>>> Hello Tomas,
>>>
>>>
>>>> 1. "xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>>>> Does this mean I have GMF 1 installed ???
>>> No. Notation model was not changed in GMF for quite a long time..
>>>
>>> Can oyu debug DocumentProvider call to see why corresponding
>>> information can not be loaded from the diagram file? (The files you
>>> attached looks normal..)
>>>
>>> -----------------
>>> Alex Shatalin
>>>
>>>
|
|
|
Re: ConcurrentModificationException [message #159515 is a reply to message #159507] |
Sun, 11 November 2007 13:01   |
Eclipse User |
|
|
|
Hmm. It seems I have got things working. And I have a definitive source
of the error. Either I have misunderstood something, or there is a bug
in GMF.
As previously stated, everything works in EMF. This just occurs in GMF.
Scenario:
- A is super of B. B is super of C and D. (A and B should be abstract,
but this does not seem to effect anything)
- If root can contain A's, and an editor for C and another for D is
created - the error occurs.
- If root can contain C's and D's, and an editor for C and another for D
is created - the error does not occur.
Regards,
Tomas Zijdemans
Tomas Zijdemans wrote:
> Thanks for the tip, will check it out. After a week hammering at this
> error, I've lost all faith in my ability to create multiple editors and
> make them function together. I get this error, and Load Resources shows
> nothing in "Browse workspace".
>
> So thought I would ask you guys what needs to be done.
>
> Here is what I do:
> 1. Single ecore and genmodel (with one root element for each editor)
> 2. Derive tooling, graph and map for each editor.
> 3. Derive a generator with these attributes set unique:
> - File extensions
> - Model ID
> - Visual ID
> - Plugin ID
> - Editor ID
>
> Any input is, as always, greatly appreciated :)
>
>
> Best Regards,
>
> Tomas Zijdemans
>
>
> Ed Merks wrote:
>> Tomas,
>>
>> You might not know about it, but in the breakpoints view you can set a
>> breakpoint that will stop when a particular exception is about to be
>> thrown. Look for the "J!" button...
>>
>>
>> Tomas Zijdemans wrote:
>>> Thanks for helping Alex! (I got a deadline coming up, so I'm in a bit
>>> of a hurry on this one)
>>>
>>> I started the editor again to view where in the DocumentProvider I
>>> should start, but then everything worked again !! - This bug truly
>>> has me baffled! Now i can't reproduce the DocumentProvider error
>>> without making completely new diagrams.
>>>
>>> I tried debugging the relation with breakpoints, but everything
>>> seemed normal. So it's a mystery where the Concurrent Exception
>>> originates from..
>>>
>>> Thanks,
>>>
>>> Tomas Zijdemans
>>>
>>>
>>> Alex Shatalin wrote:
>>>> Hello Tomas,
>>>>
>>>>
>>>>> 1. "xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>>>>> Does this mean I have GMF 1 installed ???
>>>> No. Notation model was not changed in GMF for quite a long time..
>>>>
>>>> Can oyu debug DocumentProvider call to see why corresponding
>>>> information can not be loaded from the diagram file? (The files you
>>>> attached looks normal..)
>>>>
>>>> -----------------
>>>> Alex Shatalin
>>>>
>>>>
|
|
|
Re: ConcurrentModificationException [message #159604 is a reply to message #159515] |
Mon, 12 November 2007 06:05   |
Eclipse User |
|
|
|
Originally posted by: jan.herriger.gmx.de
If you have node mappings to supertypes (A and B), you should define
domain specialisations for them (new "constraint" inside the mapping).
The body should be:
oclIsTypeOf(A)
Tomas Zijdemans schrieb:
> Hmm. It seems I have got things working. And I have a definitive source
> of the error. Either I have misunderstood something, or there is a bug
> in GMF.
>
> As previously stated, everything works in EMF. This just occurs in GMF.
> Scenario:
> - A is super of B. B is super of C and D. (A and B should be abstract,
> but this does not seem to effect anything)
> - If root can contain A's, and an editor for C and another for D is
> created - the error occurs.
> - If root can contain C's and D's, and an editor for C and another for D
> is created - the error does not occur.
>
> Regards,
>
> Tomas Zijdemans
>
>
> Tomas Zijdemans wrote:
>> Thanks for the tip, will check it out. After a week hammering at this
>> error, I've lost all faith in my ability to create multiple editors
>> and make them function together. I get this error, and Load Resources
>> shows nothing in "Browse workspace".
>>
>> So thought I would ask you guys what needs to be done.
>>
>> Here is what I do:
>> 1. Single ecore and genmodel (with one root element for each editor)
>> 2. Derive tooling, graph and map for each editor.
>> 3. Derive a generator with these attributes set unique:
>> - File extensions
>> - Model ID
>> - Visual ID
>> - Plugin ID
>> - Editor ID
>>
>> Any input is, as always, greatly appreciated :)
>>
>>
>> Best Regards,
>>
>> Tomas Zijdemans
>>
>>
>> Ed Merks wrote:
>>> Tomas,
>>>
>>> You might not know about it, but in the breakpoints view you can set
>>> a breakpoint that will stop when a particular exception is about to
>>> be thrown. Look for the "J!" button...
>>>
>>>
>>> Tomas Zijdemans wrote:
>>>> Thanks for helping Alex! (I got a deadline coming up, so I'm in a
>>>> bit of a hurry on this one)
>>>>
>>>> I started the editor again to view where in the DocumentProvider I
>>>> should start, but then everything worked again !! - This bug truly
>>>> has me baffled! Now i can't reproduce the DocumentProvider error
>>>> without making completely new diagrams.
>>>>
>>>> I tried debugging the relation with breakpoints, but everything
>>>> seemed normal. So it's a mystery where the Concurrent Exception
>>>> originates from..
>>>>
>>>> Thanks,
>>>>
>>>> Tomas Zijdemans
>>>>
>>>>
>>>> Alex Shatalin wrote:
>>>>> Hello Tomas,
>>>>>
>>>>>
>>>>>> 1.
>>>>>> "xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>>>>>> Does this mean I have GMF 1 installed ???
>>>>> No. Notation model was not changed in GMF for quite a long time..
>>>>>
>>>>> Can oyu debug DocumentProvider call to see why corresponding
>>>>> information can not be loaded from the diagram file? (The files you
>>>>> attached looks normal..)
>>>>>
>>>>> -----------------
>>>>> Alex Shatalin
>>>>>
>>>>>
|
|
|
Re: ConcurrentModificationException [message #159657 is a reply to message #159604] |
Mon, 12 November 2007 07:50   |
Eclipse User |
|
|
|
Originally posted by: trommas.yahoo.com
Thanks for answering. I do not have nodemappings to supertypes.
I've done a reinstall of eclipse and gmf 2.0.1.
Created a root with two elements that relate to each other. Derive a
diagram for both. Run it, and still get the same error!!
Jan Herriger wrote:
> If you have node mappings to supertypes (A and B), you should define
> domain specialisations for them (new "constraint" inside the mapping).
> The body should be:
>
> oclIsTypeOf(A)
>
> Tomas Zijdemans schrieb:
>> Hmm. It seems I have got things working. And I have a definitive
>> source of the error. Either I have misunderstood something, or there
>> is a bug in GMF.
>>
>> As previously stated, everything works in EMF. This just occurs in
>> GMF. Scenario:
>> - A is super of B. B is super of C and D. (A and B should be abstract,
>> but this does not seem to effect anything)
>> - If root can contain A's, and an editor for C and another for D is
>> created - the error occurs.
>> - If root can contain C's and D's, and an editor for C and another for
>> D is created - the error does not occur.
>>
>> Regards,
>>
>> Tomas Zijdemans
>>
>>
>> Tomas Zijdemans wrote:
>>> Thanks for the tip, will check it out. After a week hammering at this
>>> error, I've lost all faith in my ability to create multiple editors
>>> and make them function together. I get this error, and Load Resources
>>> shows nothing in "Browse workspace".
>>>
>>> So thought I would ask you guys what needs to be done.
>>>
>>> Here is what I do:
>>> 1. Single ecore and genmodel (with one root element for each editor)
>>> 2. Derive tooling, graph and map for each editor.
>>> 3. Derive a generator with these attributes set unique:
>>> - File extensions
>>> - Model ID
>>> - Visual ID
>>> - Plugin ID
>>> - Editor ID
>>>
>>> Any input is, as always, greatly appreciated :)
>>>
>>>
>>> Best Regards,
>>>
>>> Tomas Zijdemans
>>>
>>>
>>> Ed Merks wrote:
>>>> Tomas,
>>>>
>>>> You might not know about it, but in the breakpoints view you can set
>>>> a breakpoint that will stop when a particular exception is about to
>>>> be thrown. Look for the "J!" button...
>>>>
>>>>
>>>> Tomas Zijdemans wrote:
>>>>> Thanks for helping Alex! (I got a deadline coming up, so I'm in a
>>>>> bit of a hurry on this one)
>>>>>
>>>>> I started the editor again to view where in the DocumentProvider I
>>>>> should start, but then everything worked again !! - This bug truly
>>>>> has me baffled! Now i can't reproduce the DocumentProvider error
>>>>> without making completely new diagrams.
>>>>>
>>>>> I tried debugging the relation with breakpoints, but everything
>>>>> seemed normal. So it's a mystery where the Concurrent Exception
>>>>> originates from..
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Tomas Zijdemans
>>>>>
>>>>>
>>>>> Alex Shatalin wrote:
>>>>>> Hello Tomas,
>>>>>>
>>>>>>
>>>>>>> 1.
>>>>>>> "xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>>>>>>> Does this mean I have GMF 1 installed ???
>>>>>> No. Notation model was not changed in GMF for quite a long time..
>>>>>>
>>>>>> Can oyu debug DocumentProvider call to see why corresponding
>>>>>> information can not be loaded from the diagram file? (The files
>>>>>> you attached looks normal..)
>>>>>>
>>>>>> -----------------
>>>>>> Alex Shatalin
>>>>>>
>>>>>>
|
|
|
Re: ConcurrentModificationException [message #159666 is a reply to message #159657] |
Mon, 12 November 2007 08:01   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Tomas,
I still haven't seen a full stack trace showing the error. You should
be able to get it from the Error log view. Have you been able to get
the debugger to stop at the point when the exception is thrown using an
exception breakpoint?
Tomas Zijdemans wrote:
> Thanks for answering. I do not have nodemappings to supertypes.
>
> I've done a reinstall of eclipse and gmf 2.0.1.
>
> Created a root with two elements that relate to each other. Derive a
> diagram for both. Run it, and still get the same error!!
>
> Jan Herriger wrote:
>> If you have node mappings to supertypes (A and B), you should define
>> domain specialisations for them (new "constraint" inside the
>> mapping). The body should be:
>>
>> oclIsTypeOf(A)
>>
>> Tomas Zijdemans schrieb:
>>> Hmm. It seems I have got things working. And I have a definitive
>>> source of the error. Either I have misunderstood something, or there
>>> is a bug in GMF.
>>>
>>> As previously stated, everything works in EMF. This just occurs in
>>> GMF. Scenario:
>>> - A is super of B. B is super of C and D. (A and B should be
>>> abstract, but this does not seem to effect anything)
>>> - If root can contain A's, and an editor for C and another for D is
>>> created - the error occurs.
>>> - If root can contain C's and D's, and an editor for C and another
>>> for D is created - the error does not occur.
>>>
>>> Regards,
>>>
>>> Tomas Zijdemans
>>>
>>>
>>> Tomas Zijdemans wrote:
>>>> Thanks for the tip, will check it out. After a week hammering at
>>>> this error, I've lost all faith in my ability to create multiple
>>>> editors and make them function together. I get this error, and Load
>>>> Resources shows nothing in "Browse workspace".
>>>>
>>>> So thought I would ask you guys what needs to be done.
>>>>
>>>> Here is what I do:
>>>> 1. Single ecore and genmodel (with one root element for each editor)
>>>> 2. Derive tooling, graph and map for each editor.
>>>> 3. Derive a generator with these attributes set unique:
>>>> - File extensions
>>>> - Model ID
>>>> - Visual ID
>>>> - Plugin ID
>>>> - Editor ID
>>>>
>>>> Any input is, as always, greatly appreciated :)
>>>>
>>>>
>>>> Best Regards,
>>>>
>>>> Tomas Zijdemans
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>> Tomas,
>>>>>
>>>>> You might not know about it, but in the breakpoints view you can
>>>>> set a breakpoint that will stop when a particular exception is
>>>>> about to be thrown. Look for the "J!" button...
>>>>>
>>>>>
>>>>> Tomas Zijdemans wrote:
>>>>>> Thanks for helping Alex! (I got a deadline coming up, so I'm in a
>>>>>> bit of a hurry on this one)
>>>>>>
>>>>>> I started the editor again to view where in the DocumentProvider
>>>>>> I should start, but then everything worked again !! - This bug
>>>>>> truly has me baffled! Now i can't reproduce the DocumentProvider
>>>>>> error without making completely new diagrams.
>>>>>>
>>>>>> I tried debugging the relation with breakpoints, but everything
>>>>>> seemed normal. So it's a mystery where the Concurrent Exception
>>>>>> originates from..
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Tomas Zijdemans
>>>>>>
>>>>>>
>>>>>> Alex Shatalin wrote:
>>>>>>> Hello Tomas,
>>>>>>>
>>>>>>>
>>>>>>>> 1.
>>>>>>>> "xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>>>>>>>>
>>>>>>>> Does this mean I have GMF 1 installed ???
>>>>>>> No. Notation model was not changed in GMF for quite a long time..
>>>>>>>
>>>>>>> Can oyu debug DocumentProvider call to see why corresponding
>>>>>>> information can not be loaded from the diagram file? (The files
>>>>>>> you attached looks normal..)
>>>>>>>
>>>>>>> -----------------
>>>>>>> Alex Shatalin
>>>>>>>
>>>>>>>
|
|
|
Re: ConcurrentModificationException [message #159680 is a reply to message #159666] |
Mon, 12 November 2007 08:30   |
Eclipse User |
|
|
|
Originally posted by: trommas.yahoo.com
Thanks for helping Ed. I found the breakpointtype you spoke of,
reproduced the error, and copied the Stack. So here it is:
Thread [main] (Suspended (exception ConcurrentModificationException))
BasicEList$EIterator<E1>.checkModCount() line: 1378
BasicEList$EIterator<E1>.doNext() line: 1326
BasicEList$EIterator<E1>.next() line: 1312
UemlbaseDocumentProvider.doSynchronize(Object, IProgressMonitor) line: 402
AbstractDocumentProvider$1SynchronizeOperation.execute(IProg ressMonitor)
line: 983
AbstractDocumentProvider$1SynchronizeOperation(AbstractDocum entProvider$DocumentProviderOperation).run(IProgressMonitor)
line: 66
UemlbaseDocumentProvider(AbstractDocumentProvider).executeOp eration(AbstractDocumentProvider$DocumentProviderOperation,
IProgressMonitor) line: 530
UemlbaseDocumentProvider(AbstractDocumentProvider).synchroni ze(Object)
line: 991
UemlbaseDiagramEditor(DiagramDocumentEditor).handleEditorInp utChanged()
line: 568
UemlbaseDiagramEditor(DiagramDocumentEditor).sanityCheckStat e(IEditorInput)
line: 692
UemlbaseDiagramEditor(DiagramDocumentEditor).safelySanityChe ckState(IEditorInput)
line: 674
DiagramDocumentEditor$ActivationListener.handleActivation() line: 1135
DiagramDocumentEditor$ActivationListener.partActivated(IWork benchPart)
line: 1094
PartListenerList$1.run() line: 72
SafeRunner.run(ISafeRunnable) line: 37
Platform.run(ISafeRunnable) line: 857
PartListenerList.fireEvent(SafeRunnable, IPartListener, IWorkbenchPart,
String) line: 57
PartListenerList.firePartActivated(IWorkbenchPart) line: 70
PartService.firePartActivated(IWorkbenchPartReference) line: 73
PartService.setActivePart(IWorkbenchPartReference) line: 171
WWinPartService.updateActivePart() line: 124
WWinPartService.access$0(WWinPartService) line: 115
WWinPartService$1.partDeactivated(IWorkbenchPartReference) line: 48
PartListenerList2$4.run() line: 113
SafeRunner.run(ISafeRunnable) line: 37
Platform.run(ISafeRunnable) line: 857
PartListenerList2.fireEvent(SafeRunnable, IPartListener2,
IWorkbenchPartReference, String) line: 53
PartListenerList2.firePartDeactivated(IWorkbenchPartReferenc e) line: 111
PartService.firePartDeactivated(IWorkbenchPartReference) line: 116
PartService.setActivePart(IWorkbenchPartReference) line: 165
WorkbenchPagePartList.fireActivePartChanged(IWorkbenchPartRe ference,
IWorkbenchPartReference) line: 56
WorkbenchPagePartList(PartList).setActivePart(IWorkbenchPart Reference)
line: 126
WorkbenchPage.setActivePart(IWorkbenchPart) line: 3402
WorkbenchPage.requestActivation(IWorkbenchPart) line: 2946
EditorPane(PartPane).requestActivation() line: 265
EditorPane.requestActivation() line: 98
EditorPane(PartPane).setFocus() line: 311
EditorPane.setFocus() line: 127
EditorStack(PartStack).presentationSelectionChanged(IPresent ablePart)
line: 846
PartStack.access$1(PartStack, IPresentablePart) line: 829
PartStack$1.selectPart(IPresentablePart) line: 139
TabbedStackPresentation$1.handleEvent(TabFolderEvent) line: 131
DefaultTabFolder(AbstractTabFolder).fireEvent(TabFolderEvent ) line: 267
DefaultTabFolder(AbstractTabFolder).fireEvent(int, AbstractTabItem)
line: 276
DefaultTabFolder.access$1(DefaultTabFolder, int, AbstractTabItem) line: 1
DefaultTabFolder$2.handleEvent(Event) line: 84
EventTable.sendEvent(Event) line: 66
CTabFolder(Widget).sendEvent(Event) line: 938
CTabFolder(Widget).sendEvent(int, Event, boolean) line: 962
CTabFolder(Widget).sendEvent(int, Event) line: 947
CTabFolder(Widget).notifyListeners(int, Event) line: 706
CTabFolder.setSelection(int, boolean) line: 3227
CTabFolder.onMouse(Event) line: 2005
CTabFolder$1.handleEvent(Event) line: 316
EventTable.sendEvent(Event) line: 66
CTabFolder(Widget).sendEvent(Event) line: 938
Display.runDeferredEvents() line: 3682
Display.readAndDispatch() line: 3293
Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2389
Workbench.runUI() line: 2353
Workbench.access$4(Workbench) line: 2219
Workbench$4.run() line: 466
Realm.runWithDefault(Realm, Runnable) line: 289
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 461
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149
IDEApplication.start(IApplicationContext) line: 106
EclipseAppHandle.run(Object) line: 169
EclipseAppLauncher.runApplication(Object) line: 106
EclipseAppLauncher.start(Object) line: 76
EclipseStarter.run(Object) line: 363
EclipseStarter.run(String[], Runnable) line: 176
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
Main.invokeFramework(String[], URL[]) line: 508
Main.basicRun(String[]) line: 447
Main.run(String[]) line: 1173
Main.main(String[]) line: 1148
Ed Merks wrote:
> Tomas,
>
> I still haven't seen a full stack trace showing the error. You should
> be able to get it from the Error log view. Have you been able to get
> the debugger to stop at the point when the exception is thrown using an
> exception breakpoint?
>
>
> Tomas Zijdemans wrote:
>> Thanks for answering. I do not have nodemappings to supertypes.
>>
>> I've done a reinstall of eclipse and gmf 2.0.1.
>>
>> Created a root with two elements that relate to each other. Derive a
>> diagram for both. Run it, and still get the same error!!
>>
>> Jan Herriger wrote:
>>> If you have node mappings to supertypes (A and B), you should define
>>> domain specialisations for them (new "constraint" inside the
>>> mapping). The body should be:
>>>
>>> oclIsTypeOf(A)
>>>
>>> Tomas Zijdemans schrieb:
>>>> Hmm. It seems I have got things working. And I have a definitive
>>>> source of the error. Either I have misunderstood something, or there
>>>> is a bug in GMF.
>>>>
>>>> As previously stated, everything works in EMF. This just occurs in
>>>> GMF. Scenario:
>>>> - A is super of B. B is super of C and D. (A and B should be
>>>> abstract, but this does not seem to effect anything)
>>>> - If root can contain A's, and an editor for C and another for D is
>>>> created - the error occurs.
>>>> - If root can contain C's and D's, and an editor for C and another
>>>> for D is created - the error does not occur.
>>>>
>>>> Regards,
>>>>
>>>> Tomas Zijdemans
>>>>
>>>>
>>>> Tomas Zijdemans wrote:
>>>>> Thanks for the tip, will check it out. After a week hammering at
>>>>> this error, I've lost all faith in my ability to create multiple
>>>>> editors and make them function together. I get this error, and Load
>>>>> Resources shows nothing in "Browse workspace".
>>>>>
>>>>> So thought I would ask you guys what needs to be done.
>>>>>
>>>>> Here is what I do:
>>>>> 1. Single ecore and genmodel (with one root element for each editor)
>>>>> 2. Derive tooling, graph and map for each editor.
>>>>> 3. Derive a generator with these attributes set unique:
>>>>> - File extensions
>>>>> - Model ID
>>>>> - Visual ID
>>>>> - Plugin ID
>>>>> - Editor ID
>>>>>
>>>>> Any input is, as always, greatly appreciated :)
>>>>>
>>>>>
>>>>> Best Regards,
>>>>>
>>>>> Tomas Zijdemans
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>> Tomas,
>>>>>>
>>>>>> You might not know about it, but in the breakpoints view you can
>>>>>> set a breakpoint that will stop when a particular exception is
>>>>>> about to be thrown. Look for the "J!" button...
>>>>>>
>>>>>>
>>>>>> Tomas Zijdemans wrote:
>>>>>>> Thanks for helping Alex! (I got a deadline coming up, so I'm in a
>>>>>>> bit of a hurry on this one)
>>>>>>>
>>>>>>> I started the editor again to view where in the DocumentProvider
>>>>>>> I should start, but then everything worked again !! - This bug
>>>>>>> truly has me baffled! Now i can't reproduce the DocumentProvider
>>>>>>> error without making completely new diagrams.
>>>>>>>
>>>>>>> I tried debugging the relation with breakpoints, but everything
>>>>>>> seemed normal. So it's a mystery where the Concurrent Exception
>>>>>>> originates from..
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Tomas Zijdemans
>>>>>>>
>>>>>>>
>>>>>>> Alex Shatalin wrote:
>>>>>>>> Hello Tomas,
>>>>>>>>
>>>>>>>>
>>>>>>>>> 1.
>>>>>>>>> "xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>>>>>>>>>
>>>>>>>>> Does this mean I have GMF 1 installed ???
>>>>>>>> No. Notation model was not changed in GMF for quite a long time..
>>>>>>>>
>>>>>>>> Can oyu debug DocumentProvider call to see why corresponding
>>>>>>>> information can not be loaded from the diagram file? (The files
>>>>>>>> you attached looks normal..)
>>>>>>>>
>>>>>>>> -----------------
>>>>>>>> Alex Shatalin
>>>>>>>>
>>>>>>>>
|
|
|
Re: ConcurrentModificationException [message #159739 is a reply to message #159680] |
Mon, 12 November 2007 11:47   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Tomas,
So what does the code at "UemlbaseDocumentProvider.doSynchronize(Object,
IProgressMonitor) line: 402" look like?
Tomas Zijdemans wrote:
> Thanks for helping Ed. I found the breakpointtype you spoke of,
> reproduced the error, and copied the Stack. So here it is:
>
>
> Thread [main] (Suspended (exception ConcurrentModificationException))
> BasicEList$EIterator<E1>.checkModCount() line: 1378
> BasicEList$EIterator<E1>.doNext() line: 1326
> BasicEList$EIterator<E1>.next() line: 1312
> UemlbaseDocumentProvider.doSynchronize(Object, IProgressMonitor)
> line: 402
> AbstractDocumentProvider$1SynchronizeOperation.execute(IProg ressMonitor)
> line: 983
> AbstractDocumentProvider$1SynchronizeOperation(AbstractDocum entProvider$DocumentProviderOperation).run(IProgressMonitor)
> line: 66
> UemlbaseDocumentProvider(AbstractDocumentProvider).executeOp eration(AbstractDocumentProvider$DocumentProviderOperation,
> IProgressMonitor) line: 530
> UemlbaseDocumentProvider(AbstractDocumentProvider).synchroni ze(Object)
> line: 991
> UemlbaseDiagramEditor(DiagramDocumentEditor).handleEditorInp utChanged()
> line: 568
> UemlbaseDiagramEditor(DiagramDocumentEditor).sanityCheckStat e(IEditorInput)
> line: 692
> UemlbaseDiagramEditor(DiagramDocumentEditor).safelySanityChe ckState(IEditorInput)
> line: 674
> DiagramDocumentEditor$ActivationListener.handleActivation() line:
> 1135
> DiagramDocumentEditor$ActivationListener.partActivated(IWork benchPart)
> line: 1094
> PartListenerList$1.run() line: 72
> SafeRunner.run(ISafeRunnable) line: 37
> Platform.run(ISafeRunnable) line: 857
> PartListenerList.fireEvent(SafeRunnable, IPartListener,
> IWorkbenchPart, String) line: 57
> PartListenerList.firePartActivated(IWorkbenchPart) line: 70
> PartService.firePartActivated(IWorkbenchPartReference) line: 73
> PartService.setActivePart(IWorkbenchPartReference) line: 171
> WWinPartService.updateActivePart() line: 124
> WWinPartService.access$0(WWinPartService) line: 115
> WWinPartService$1.partDeactivated(IWorkbenchPartReference) line:
> 48
> PartListenerList2$4.run() line: 113
> SafeRunner.run(ISafeRunnable) line: 37
> Platform.run(ISafeRunnable) line: 857
> PartListenerList2.fireEvent(SafeRunnable, IPartListener2,
> IWorkbenchPartReference, String) line: 53
> PartListenerList2.firePartDeactivated(IWorkbenchPartReferenc e)
> line: 111
> PartService.firePartDeactivated(IWorkbenchPartReference) line: 116
> PartService.setActivePart(IWorkbenchPartReference) line: 165
> WorkbenchPagePartList.fireActivePartChanged(IWorkbenchPartRe ference,
> IWorkbenchPartReference) line: 56
> WorkbenchPagePartList(PartList).setActivePart(IWorkbenchPart Reference)
> line: 126
> WorkbenchPage.setActivePart(IWorkbenchPart) line: 3402
> WorkbenchPage.requestActivation(IWorkbenchPart) line: 2946
> EditorPane(PartPane).requestActivation() line: 265
> EditorPane.requestActivation() line: 98
> EditorPane(PartPane).setFocus() line: 311
> EditorPane.setFocus() line: 127
> EditorStack(PartStack).presentationSelectionChanged(IPresent ablePart)
> line: 846
> PartStack.access$1(PartStack, IPresentablePart) line: 829
> PartStack$1.selectPart(IPresentablePart) line: 139
> TabbedStackPresentation$1.handleEvent(TabFolderEvent) line: 131
> DefaultTabFolder(AbstractTabFolder).fireEvent(TabFolderEvent )
> line: 267
> DefaultTabFolder(AbstractTabFolder).fireEvent(int,
> AbstractTabItem) line: 276
> DefaultTabFolder.access$1(DefaultTabFolder, int, AbstractTabItem)
> line: 1
> DefaultTabFolder$2.handleEvent(Event) line: 84
> EventTable.sendEvent(Event) line: 66
> CTabFolder(Widget).sendEvent(Event) line: 938
> CTabFolder(Widget).sendEvent(int, Event, boolean) line: 962
> CTabFolder(Widget).sendEvent(int, Event) line: 947
> CTabFolder(Widget).notifyListeners(int, Event) line: 706
> CTabFolder.setSelection(int, boolean) line: 3227
> CTabFolder.onMouse(Event) line: 2005
> CTabFolder$1.handleEvent(Event) line: 316
> EventTable.sendEvent(Event) line: 66
> CTabFolder(Widget).sendEvent(Event) line: 938
> Display.runDeferredEvents() line: 3682
> Display.readAndDispatch() line: 3293
> Workbench.runEventLoop(Window$IExceptionHandler, Display) line:
> 2389
> Workbench.runUI() line: 2353
> Workbench.access$4(Workbench) line: 2219
> Workbench$4.run() line: 466
> Realm.runWithDefault(Realm, Runnable) line: 289
> Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line:
> 461
> PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line:
> 149
> IDEApplication.start(IApplicationContext) line: 106
> EclipseAppHandle.run(Object) line: 169
> EclipseAppLauncher.runApplication(Object) line: 106
> EclipseAppLauncher.start(Object) line: 76
> EclipseStarter.run(Object) line: 363
> EclipseStarter.run(String[], Runnable) line: 176
> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line:
> not available [native method]
> NativeMethodAccessorImpl.invoke(Object, Object[]) line: not
> available
> DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not
> available
> Method.invoke(Object, Object...) line: not available
> Main.invokeFramework(String[], URL[]) line: 508
> Main.basicRun(String[]) line: 447
> Main.run(String[]) line: 1173
> Main.main(String[]) line: 1148
>
>
>
>
> Ed Merks wrote:
>> Tomas,
>>
>> I still haven't seen a full stack trace showing the error. You
>> should be able to get it from the Error log view. Have you been able
>> to get the debugger to stop at the point when the exception is thrown
>> using an exception breakpoint?
>>
>>
>> Tomas Zijdemans wrote:
>>> Thanks for answering. I do not have nodemappings to supertypes.
>>>
>>> I've done a reinstall of eclipse and gmf 2.0.1.
>>>
>>> Created a root with two elements that relate to each other. Derive a
>>> diagram for both. Run it, and still get the same error!!
>>>
>>> Jan Herriger wrote:
>>>> If you have node mappings to supertypes (A and B), you should
>>>> define domain specialisations for them (new "constraint" inside the
>>>> mapping). The body should be:
>>>>
>>>> oclIsTypeOf(A)
>>>>
>>>> Tomas Zijdemans schrieb:
>>>>> Hmm. It seems I have got things working. And I have a definitive
>>>>> source of the error. Either I have misunderstood something, or
>>>>> there is a bug in GMF.
>>>>>
>>>>> As previously stated, everything works in EMF. This just occurs in
>>>>> GMF. Scenario:
>>>>> - A is super of B. B is super of C and D. (A and B should be
>>>>> abstract, but this does not seem to effect anything)
>>>>> - If root can contain A's, and an editor for C and another for D
>>>>> is created - the error occurs.
>>>>> - If root can contain C's and D's, and an editor for C and another
>>>>> for D is created - the error does not occur.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Tomas Zijdemans
>>>>>
>>>>>
>>>>> Tomas Zijdemans wrote:
>>>>>> Thanks for the tip, will check it out. After a week hammering at
>>>>>> this error, I've lost all faith in my ability to create multiple
>>>>>> editors and make them function together. I get this error, and
>>>>>> Load Resources shows nothing in "Browse workspace".
>>>>>>
>>>>>> So thought I would ask you guys what needs to be done.
>>>>>>
>>>>>> Here is what I do:
>>>>>> 1. Single ecore and genmodel (with one root element for each editor)
>>>>>> 2. Derive tooling, graph and map for each editor.
>>>>>> 3. Derive a generator with these attributes set unique:
>>>>>> - File extensions
>>>>>> - Model ID
>>>>>> - Visual ID
>>>>>> - Plugin ID
>>>>>> - Editor ID
>>>>>>
>>>>>> Any input is, as always, greatly appreciated :)
>>>>>>
>>>>>>
>>>>>> Best Regards,
>>>>>>
>>>>>> Tomas Zijdemans
>>>>>>
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>> Tomas,
>>>>>>>
>>>>>>> You might not know about it, but in the breakpoints view you can
>>>>>>> set a breakpoint that will stop when a particular exception is
>>>>>>> about to be thrown. Look for the "J!" button...
>>>>>>>
>>>>>>>
>>>>>>> Tomas Zijdemans wrote:
>>>>>>>> Thanks for helping Alex! (I got a deadline coming up, so I'm in
>>>>>>>> a bit of a hurry on this one)
>>>>>>>>
>>>>>>>> I started the editor again to view where in the
>>>>>>>> DocumentProvider I should start, but then everything worked
>>>>>>>> again !! - This bug truly has me baffled! Now i can't reproduce
>>>>>>>> the DocumentProvider error without making completely new diagrams.
>>>>>>>>
>>>>>>>> I tried debugging the relation with breakpoints, but everything
>>>>>>>> seemed normal. So it's a mystery where the Concurrent Exception
>>>>>>>> originates from..
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Tomas Zijdemans
>>>>>>>>
>>>>>>>>
>>>>>>>> Alex Shatalin wrote:
>>>>>>>>> Hello Tomas,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> 1.
>>>>>>>>>> "xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>>>>>>>>>>
>>>>>>>>>> Does this mean I have GMF 1 installed ???
>>>>>>>>> No. Notation model was not changed in GMF for quite a long time..
>>>>>>>>>
>>>>>>>>> Can oyu debug DocumentProvider call to see why corresponding
>>>>>>>>> information can not be loaded from the diagram file? (The
>>>>>>>>> files you attached looks normal..)
>>>>>>>>>
>>>>>>>>> -----------------
>>>>>>>>> Alex Shatalin
>>>>>>>>>
>>>>>>>>>
|
|
|
Re: ConcurrentModificationException [message #159753 is a reply to message #159739] |
Mon, 12 November 2007 16:41   |
Eclipse User |
|
|
|
Originally posted by: trommas.yahoo.com
Well, it is a generated method, so it would be kind of strange if the
error was there. But it suggest that the synchronization of the object
(called when I select the diagram) fails.
/**
* @generated
*/
protected void doSynchronize(Object element, IProgressMonitor monitor)
throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
for (Iterator it =
info.getResourceSet().getResources().iterator();
it.hasNext();) {
402 Resource nextResource = (Resource) it.next();
handleElementChanged(info, nextResource, monitor);
}
return;
}
super.doSynchronize(element, monitor);
}
Ed Merks wrote:
> Tomas,
>
> So what does the code at "UemlbaseDocumentProvider.doSynchronize(Object,
> IProgressMonitor) line: 402" look like?
>
>
> Tomas Zijdemans wrote:
>> Thanks for helping Ed. I found the breakpointtype you spoke of,
>> reproduced the error, and copied the Stack. So here it is:
>>
>>
>> Thread [main] (Suspended (exception
>> ConcurrentModificationException))
>> BasicEList$EIterator<E1>.checkModCount() line: 1378
>> BasicEList$EIterator<E1>.doNext() line: 1326
>> BasicEList$EIterator<E1>.next() line: 1312
>> UemlbaseDocumentProvider.doSynchronize(Object, IProgressMonitor) line:
>> 402
>> AbstractDocumentProvider$1SynchronizeOperation.execute(IProg ressMonitor)
>> line: 983
>> AbstractDocumentProvider$1SynchronizeOperation(AbstractDocum entProvider$DocumentProviderOperation).run(IProgressMonitor)
>> line: 66
>> UemlbaseDocumentProvider(AbstractDocumentProvider).executeOp eration(AbstractDocumentProvider$DocumentProviderOperation,
>> IProgressMonitor) line: 530
>> UemlbaseDocumentProvider(AbstractDocumentProvider).synchroni ze(Object)
>> line: 991
>> UemlbaseDiagramEditor(DiagramDocumentEditor).handleEditorInp utChanged()
>> line: 568
>> UemlbaseDiagramEditor(DiagramDocumentEditor).sanityCheckStat e(IEditorInput)
>> line: 692
>> UemlbaseDiagramEditor(DiagramDocumentEditor).safelySanityChe ckState(IEditorInput)
>> line: 674
>> DiagramDocumentEditor$ActivationListener.handleActivation() line:
>> 1135
>> DiagramDocumentEditor$ActivationListener.partActivated(IWork benchPart)
>> line: 1094 PartListenerList$1.run() line: 72
>> SafeRunner.run(ISafeRunnable) line: 37
>> Platform.run(ISafeRunnable) line: 857
>> PartListenerList.fireEvent(SafeRunnable, IPartListener,
>> IWorkbenchPart, String) line: 57
>> PartListenerList.firePartActivated(IWorkbenchPart) line: 70
>> PartService.firePartActivated(IWorkbenchPartReference) line: 73
>> PartService.setActivePart(IWorkbenchPartReference) line: 171
>> WWinPartService.updateActivePart() line: 124
>> WWinPartService.access$0(WWinPartService) line: 115
>> WWinPartService$1.partDeactivated(IWorkbenchPartReference) line: 48
>> PartListenerList2$4.run() line: 113
>> SafeRunner.run(ISafeRunnable) line: 37
>> Platform.run(ISafeRunnable) line: 857
>> PartListenerList2.fireEvent(SafeRunnable, IPartListener2,
>> IWorkbenchPartReference, String) line: 53
>> PartListenerList2.firePartDeactivated(IWorkbenchPartReferenc e) line:
>> 111 PartService.firePartDeactivated(IWorkbenchPartReference)
>> line: 116 PartService.setActivePart(IWorkbenchPartReference)
>> line: 165
>> WorkbenchPagePartList.fireActivePartChanged(IWorkbenchPartRe ference,
>> IWorkbenchPartReference) line: 56
>> WorkbenchPagePartList(PartList).setActivePart(IWorkbenchPart Reference)
>> line: 126 WorkbenchPage.setActivePart(IWorkbenchPart) line:
>> 3402 WorkbenchPage.requestActivation(IWorkbenchPart) line:
>> 2946 EditorPane(PartPane).requestActivation() line: 265
>> EditorPane.requestActivation() line: 98
>> EditorPane(PartPane).setFocus() line: 311 EditorPane.setFocus()
>> line: 127
>> EditorStack(PartStack).presentationSelectionChanged(IPresent ablePart)
>> line: 846 PartStack.access$1(PartStack, IPresentablePart) line:
>> 829 PartStack$1.selectPart(IPresentablePart) line: 139
>> TabbedStackPresentation$1.handleEvent(TabFolderEvent) line: 131
>> DefaultTabFolder(AbstractTabFolder).fireEvent(TabFolderEvent ) line:
>> 267 DefaultTabFolder(AbstractTabFolder).fireEvent(int,
>> AbstractTabItem) line: 276
>> DefaultTabFolder.access$1(DefaultTabFolder, int, AbstractTabItem)
>> line: 1 DefaultTabFolder$2.handleEvent(Event) line: 84
>> EventTable.sendEvent(Event) line: 66
>> CTabFolder(Widget).sendEvent(Event) line: 938
>> CTabFolder(Widget).sendEvent(int, Event, boolean) line: 962
>> CTabFolder(Widget).sendEvent(int, Event) line: 947
>> CTabFolder(Widget).notifyListeners(int, Event) line: 706
>> CTabFolder.setSelection(int, boolean) line: 3227
>> CTabFolder.onMouse(Event) line: 2005
>> CTabFolder$1.handleEvent(Event) line: 316
>> EventTable.sendEvent(Event) line: 66
>> CTabFolder(Widget).sendEvent(Event) line: 938
>> Display.runDeferredEvents() line: 3682 Display.readAndDispatch()
>> line: 3293 Workbench.runEventLoop(Window$IExceptionHandler,
>> Display) line: 2389 Workbench.runUI() line: 2353
>> Workbench.access$4(Workbench) line: 2219 Workbench$4.run() line:
>> 466 Realm.runWithDefault(Realm, Runnable) line: 289
>> Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 461
>> PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line:
>> 149 IDEApplication.start(IApplicationContext) line: 106
>> EclipseAppHandle.run(Object) line: 169
>> EclipseAppLauncher.runApplication(Object) line: 106
>> EclipseAppLauncher.start(Object) line: 76
>> EclipseStarter.run(Object) line: 363
>> EclipseStarter.run(String[], Runnable) line: 176
>> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
>> available [native method]
>> NativeMethodAccessorImpl.invoke(Object, Object[]) line: not
>> available DelegatingMethodAccessorImpl.invoke(Object, Object[])
>> line: not available Method.invoke(Object, Object...) line: not
>> available Main.invokeFramework(String[], URL[]) line: 508
>> Main.basicRun(String[]) line: 447 Main.run(String[]) line:
>> 1173 Main.main(String[]) line: 1148
>>
>>
>>
>> Ed Merks wrote:
>>> Tomas,
>>>
>>> I still haven't seen a full stack trace showing the error. You
>>> should be able to get it from the Error log view. Have you been able
>>> to get the debugger to stop at the point when the exception is thrown
>>> using an exception breakpoint?
>>>
>>>
>>> Tomas Zijdemans wrote:
>>>> Thanks for answering. I do not have nodemappings to supertypes.
>>>>
>>>> I've done a reinstall of eclipse and gmf 2.0.1.
>>>>
>>>> Created a root with two elements that relate to each other. Derive a
>>>> diagram for both. Run it, and still get the same error!!
>>>>
>>>> Jan Herriger wrote:
>>>>> If you have node mappings to supertypes (A and B), you should
>>>>> define domain specialisations for them (new "constraint" inside the
>>>>> mapping). The body should be:
>>>>>
>>>>> oclIsTypeOf(A)
>>>>>
>>>>> Tomas Zijdemans schrieb:
>>>>>> Hmm. It seems I have got things working. And I have a definitive
>>>>>> source of the error. Either I have misunderstood something, or
>>>>>> there is a bug in GMF.
>>>>>>
>>>>>> As previously stated, everything works in EMF. This just occurs in
>>>>>> GMF. Scenario:
>>>>>> - A is super of B. B is super of C and D. (A and B should be
>>>>>> abstract, but this does not seem to effect anything)
>>>>>> - If root can contain A's, and an editor for C and another for D
>>>>>> is created - the error occurs.
>>>>>> - If root can contain C's and D's, and an editor for C and another
>>>>>> for D is created - the error does not occur.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Tomas Zijdemans
>>>>>>
>>>>>>
>>>>>> Tomas Zijdemans wrote:
>>>>>>> Thanks for the tip, will check it out. After a week hammering at
>>>>>>> this error, I've lost all faith in my ability to create multiple
>>>>>>> editors and make them function together. I get this error, and
>>>>>>> Load Resources shows nothing in "Browse workspace".
>>>>>>>
>>>>>>> So thought I would ask you guys what needs to be done.
>>>>>>>
>>>>>>> Here is what I do:
>>>>>>> 1. Single ecore and genmodel (with one root element for each editor)
>>>>>>> 2. Derive tooling, graph and map for each editor.
>>>>>>> 3. Derive a generator with these attributes set unique:
>>>>>>> - File extensions
>>>>>>> - Model ID
>>>>>>> - Visual ID
>>>>>>> - Plugin ID
>>>>>>> - Editor ID
>>>>>>>
>>>>>>> Any input is, as always, greatly appreciated :)
>>>>>>>
>>>>>>>
>>>>>>> Best Regards,
>>>>>>>
>>>>>>> Tomas Zijdemans
>>>>>>>
>>>>>>>
>>>>>>> Ed Merks wrote:
>>>>>>>> Tomas,
>>>>>>>>
>>>>>>>> You might not know about it, but in the breakpoints view you can
>>>>>>>> set a breakpoint that will stop when a particular exception is
>>>>>>>> about to be thrown. Look for the "J!" button...
>>>>>>>>
>>>>>>>>
>>>>>>>> Tomas Zijdemans wrote:
>>>>>>>>> Thanks for helping Alex! (I got a deadline coming up, so I'm in
>>>>>>>>> a bit of a hurry on this one)
>>>>>>>>>
>>>>>>>>> I started the editor again to view where in the
>>>>>>>>> DocumentProvider I should start, but then everything worked
>>>>>>>>> again !! - This bug truly has me baffled! Now i can't reproduce
>>>>>>>>> the DocumentProvider error without making completely new diagrams.
>>>>>>>>>
>>>>>>>>> I tried debugging the relation with breakpoints, but everything
>>>>>>>>> seemed normal. So it's a mystery where the Concurrent Exception
>>>>>>>>> originates from..
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Tomas Zijdemans
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Alex Shatalin wrote:
>>>>>>>>>> Hello Tomas,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> 1.
>>>>>>>>>>> "xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>>>>>>>>>>>
>>>>>>>>>>> Does this mean I have GMF 1 installed ???
>>>>>>>>>> No. Notation model was not changed in GMF for quite a long time..
>>>>>>>>>>
>>>>>>>>>> Can oyu debug DocumentProvider call to see why corresponding
>>>>>>>>>> information can not be loaded from the diagram file? (The
>>>>>>>>>> files you attached looks normal..)
>>>>>>>>>>
>>>>>>>>>> -----------------
>>>>>>>>>> Alex Shatalin
>>>>>>>>>>
>>>>>>>>>>
|
|
|
Re: ConcurrentModificationException [message #159756 is a reply to message #159753] |
Mon, 12 November 2007 16:48   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Tomas,
Since resources are often demand loaded into a resource set as proxies
are resolved, that's probably what's happening here. Maybe try changing
it to
for (Iterator it = new
ArrayList(info.getResourceSet().getResources()).iterator();
Tomas Zijdemans wrote:
> Well, it is a generated method, so it would be kind of strange if the
> error was there. But it suggest that the synchronization of the object
> (called when I select the diagram) fails.
>
> /**
> * @generated
> */
> protected void doSynchronize(Object element, IProgressMonitor monitor)
> throws CoreException {
> ResourceSetInfo info = getResourceSetInfo(element);
> if (info != null) {
> for (Iterator it =
> info.getResourceSet().getResources().iterator();
> it.hasNext();) {
> 402 Resource nextResource = (Resource) it.next();
> handleElementChanged(info, nextResource, monitor);
> }
> return;
> }
> super.doSynchronize(element, monitor);
> }
>
>
> Ed Merks wrote:
>> Tomas,
>>
>> So what does the code at
>> "UemlbaseDocumentProvider.doSynchronize(Object, IProgressMonitor)
>> line: 402" look like?
>>
>>
>> Tomas Zijdemans wrote:
>>> Thanks for helping Ed. I found the breakpointtype you spoke of,
>>> reproduced the error, and copied the Stack. So here it is:
>>>
>>>
>>> Thread [main] (Suspended (exception
>>> ConcurrentModificationException))
>>> BasicEList$EIterator<E1>.checkModCount() line: 1378
>>> BasicEList$EIterator<E1>.doNext() line: 1326
>>> BasicEList$EIterator<E1>.next() line: 1312
>>> UemlbaseDocumentProvider.doSynchronize(Object, IProgressMonitor)
>>> line: 402
>>> AbstractDocumentProvider$1SynchronizeOperation.execute(IProg ressMonitor)
>>> line: 983
>>> AbstractDocumentProvider$1SynchronizeOperation(AbstractDocum entProvider$DocumentProviderOperation).run(IProgressMonitor)
>>> line: 66
>>> UemlbaseDocumentProvider(AbstractDocumentProvider).executeOp eration(AbstractDocumentProvider$DocumentProviderOperation,
>>> IProgressMonitor) line: 530
>>> UemlbaseDocumentProvider(AbstractDocumentProvider).synchroni ze(Object)
>>> line: 991
>>> UemlbaseDiagramEditor(DiagramDocumentEditor).handleEditorInp utChanged()
>>> line: 568
>>> UemlbaseDiagramEditor(DiagramDocumentEditor).sanityCheckStat e(IEditorInput)
>>> line: 692
>>> UemlbaseDiagramEditor(DiagramDocumentEditor).safelySanityChe ckState(IEditorInput)
>>> line: 674
>>> DiagramDocumentEditor$ActivationListener.handleActivation() line:
>>> 1135
>>> DiagramDocumentEditor$ActivationListener.partActivated(IWork benchPart)
>>> line: 1094 PartListenerList$1.run() line: 72
>>> SafeRunner.run(ISafeRunnable) line: 37
>>> Platform.run(ISafeRunnable) line: 857
>>> PartListenerList.fireEvent(SafeRunnable, IPartListener,
>>> IWorkbenchPart, String) line: 57
>>> PartListenerList.firePartActivated(IWorkbenchPart) line: 70
>>> PartService.firePartActivated(IWorkbenchPartReference) line:
>>> 73 PartService.setActivePart(IWorkbenchPartReference) line:
>>> 171 WWinPartService.updateActivePart() line: 124
>>> WWinPartService.access$0(WWinPartService) line: 115
>>> WWinPartService$1.partDeactivated(IWorkbenchPartReference) line:
>>> 48 PartListenerList2$4.run() line: 113
>>> SafeRunner.run(ISafeRunnable) line: 37
>>> Platform.run(ISafeRunnable) line: 857
>>> PartListenerList2.fireEvent(SafeRunnable, IPartListener2,
>>> IWorkbenchPartReference, String) line: 53
>>> PartListenerList2.firePartDeactivated(IWorkbenchPartReferenc e) line:
>>> 111 PartService.firePartDeactivated(IWorkbenchPartReference)
>>> line: 116 PartService.setActivePart(IWorkbenchPartReference)
>>> line: 165
>>> WorkbenchPagePartList.fireActivePartChanged(IWorkbenchPartRe ference,
>>> IWorkbenchPartReference) line: 56
>>> WorkbenchPagePartList(PartList).setActivePart(IWorkbenchPart Reference)
>>> line: 126 WorkbenchPage.setActivePart(IWorkbenchPart) line:
>>> 3402 WorkbenchPage.requestActivation(IWorkbenchPart) line:
>>> 2946 EditorPane(PartPane).requestActivation() line: 265
>>> EditorPane.requestActivation() line: 98
>>> EditorPane(PartPane).setFocus() line: 311
>>> EditorPane.setFocus() line: 127
>>> EditorStack(PartStack).presentationSelectionChanged(IPresent ablePart)
>>> line: 846 PartStack.access$1(PartStack, IPresentablePart)
>>> line: 829 PartStack$1.selectPart(IPresentablePart) line:
>>> 139 TabbedStackPresentation$1.handleEvent(TabFolderEvent)
>>> line: 131
>>> DefaultTabFolder(AbstractTabFolder).fireEvent(TabFolderEvent ) line:
>>> 267 DefaultTabFolder(AbstractTabFolder).fireEvent(int,
>>> AbstractTabItem) line: 276
>>> DefaultTabFolder.access$1(DefaultTabFolder, int, AbstractTabItem)
>>> line: 1 DefaultTabFolder$2.handleEvent(Event) line: 84
>>> EventTable.sendEvent(Event) line: 66
>>> CTabFolder(Widget).sendEvent(Event) line: 938
>>> CTabFolder(Widget).sendEvent(int, Event, boolean) line: 962
>>> CTabFolder(Widget).sendEvent(int, Event) line: 947
>>> CTabFolder(Widget).notifyListeners(int, Event) line: 706
>>> CTabFolder.setSelection(int, boolean) line: 3227
>>> CTabFolder.onMouse(Event) line: 2005
>>> CTabFolder$1.handleEvent(Event) line: 316
>>> EventTable.sendEvent(Event) line: 66
>>> CTabFolder(Widget).sendEvent(Event) line: 938
>>> Display.runDeferredEvents() line: 3682
>>> Display.readAndDispatch() line: 3293
>>> Workbench.runEventLoop(Window$IExceptionHandler, Display) line:
>>> 2389 Workbench.runUI() line: 2353
>>> Workbench.access$4(Workbench) line: 2219 Workbench$4.run()
>>> line: 466 Realm.runWithDefault(Realm, Runnable) line:
>>> 289 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor)
>>> line: 461 PlatformUI.createAndRunWorkbench(Display,
>>> WorkbenchAdvisor) line: 149
>>> IDEApplication.start(IApplicationContext) line: 106
>>> EclipseAppHandle.run(Object) line: 169
>>> EclipseAppLauncher.runApplication(Object) line: 106
>>> EclipseAppLauncher.start(Object) line: 76
>>> EclipseStarter.run(Object) line: 363
>>> EclipseStarter.run(String[], Runnable) line: 176
>>> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
>>> available [native method]
>>> NativeMethodAccessorImpl.invoke(Object, Object[]) line: not
>>> available DelegatingMethodAccessorImpl.invoke(Object,
>>> Object[]) line: not available Method.invoke(Object, Object...)
>>> line: not available Main.invokeFramework(String[], URL[])
>>> line: 508 Main.basicRun(String[]) line: 447
>>> Main.run(String[]) line: 1173 Main.main(String[]) line: 1148
>>>
>>>
>>> Ed Merks wrote:
>>>> Tomas,
>>>>
>>>> I still haven't seen a full stack trace showing the error. You
>>>> should be able to get it from the Error log view. Have you been
>>>> able to get the debugger to stop at the point when the exception is
>>>> thrown using an exception breakpoint?
>>>>
>>>>
>>>> Tomas Zijdemans wrote:
>>>>> Thanks for answering. I do not have nodemappings to supertypes.
>>>>>
>>>>> I've done a reinstall of eclipse and gmf 2.0.1.
>>>>>
>>>>> Created a root with two elements that relate to each other. Derive
>>>>> a diagram for both. Run it, and still get the same error!!
>>>>>
>>>>> Jan Herriger wrote:
>>>>>> If you have node mappings to supertypes (A and B), you should
>>>>>> define domain specialisations for them (new "constraint" inside
>>>>>> the mapping). The body should be:
>>>>>>
>>>>>> oclIsTypeOf(A)
>>>>>>
>>>>>> Tomas Zijdemans schrieb:
>>>>>>> Hmm. It seems I have got things working. And I have a definitive
>>>>>>> source of the error. Either I have misunderstood something, or
>>>>>>> there is a bug in GMF.
>>>>>>>
>>>>>>> As previously stated, everything works in EMF. This just occurs
>>>>>>> in GMF. Scenario:
>>>>>>> - A is super of B. B is super of C and D. (A and B should be
>>>>>>> abstract, but this does not seem to effect anything)
>>>>>>> - If root can contain A's, and an editor for C and another for D
>>>>>>> is created - the error occurs.
>>>>>>> - If root can contain C's and D's, and an editor for C and
>>>>>>> another for D is created - the error does not occur.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Tomas Zijdemans
>>>>>>>
>>>>>>>
>>>>>>> Tomas Zijdemans wrote:
>>>>>>>> Thanks for the tip, will check it out. After a week hammering
>>>>>>>> at this error, I've lost all faith in my ability to create
>>>>>>>> multiple editors and make them function together. I get this
>>>>>>>> error, and Load Resources shows nothing in "Browse workspace".
>>>>>>>>
>>>>>>>> So thought I would ask you guys what needs to be done.
>>>>>>>>
>>>>>>>> Here is what I do:
>>>>>>>> 1. Single ecore and genmodel (with one root element for each
>>>>>>>> editor)
>>>>>>>> 2. Derive tooling, graph and map for each editor.
>>>>>>>> 3. Derive a generator with these attributes set unique:
>>>>>>>> - File extensions
>>>>>>>> - Model ID
>>>>>>>> - Visual ID
>>>>>>>> - Plugin ID
>>>>>>>> - Editor ID
>>>>>>>>
>>>>>>>> Any input is, as always, greatly appreciated :)
>>>>>>>>
>>>>>>>>
>>>>>>>> Best Regards,
>>>>>>>>
>>>>>>>> Tomas Zijdemans
>>>>>>>>
>>>>>>>>
>>>>>>>> Ed Merks wrote:
>>>>>>>>> Tomas,
>>>>>>>>>
>>>>>>>>> You might not know about it, but in the breakpoints view you
>>>>>>>>> can set a breakpoint that will stop when a particular
>>>>>>>>> exception is about to be thrown. Look for the "J!" button...
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Tomas Zijdemans wrote:
>>>>>>>>>> Thanks for helping Alex! (I got a deadline coming up, so I'm
>>>>>>>>>> in a bit of a hurry on this one)
>>>>>>>>>>
>>>>>>>>>> I started the editor again to view where in the
>>>>>>>>>> DocumentProvider I should start, but then everything worked
>>>>>>>>>> again !! - This bug truly has me baffled! Now i can't
>>>>>>>>>> reproduce the DocumentProvider error without making
>>>>>>>>>> completely new diagrams.
>>>>>>>>>>
>>>>>>>>>> I tried debugging the relation with breakpoints, but
>>>>>>>>>> everything seemed normal. So it's a mystery where the
>>>>>>>>>> Concurrent Exception originates from..
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>>
>>>>>>>>>> Tomas Zijdemans
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Alex Shatalin wrote:
>>>>>>>>>>> Hello Tomas,
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> 1.
>>>>>>>>>>>> "xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>>>>>>>>>>>>
>>>>>>>>>>>> Does this mean I have GMF 1 installed ???
>>>>>>>>>>> No. Notation model was not changed in GMF for quite a long
>>>>>>>>>>> time..
>>>>>>>>>>>
>>>>>>>>>>> Can oyu debug DocumentProvider call to see why corresponding
>>>>>>>>>>> information can not be loaded from the diagram file? (The
>>>>>>>>>>> files you attached looks normal..)
>>>>>>>>>>>
>>>>>>>>>>> -----------------
>>>>>>>>>>> Alex Shatalin
>>>>>>>>>>>
>>>>>>>>>>>
|
|
| |
Re: ConcurrentModificationException [message #159845 is a reply to message #159840] |
Mon, 12 November 2007 18:18   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------080800020203040502070200
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Alex,
Making a copy of the list is a bit expensive. Depending on if you want
to visit the demand loaded resources or not, I'd suggest either
List<Resource> resources = resourceSet.getResources();
for (int i = 0; i < resources.size(); ++i)
or
List<Resource> resources = resourceSet.getResources();
for (int i = 0, size = resources.size(); i < size; ++i)
The former would visit even ones added during the traversal, while the
latter would visit only those known to be in the list at the start of
the traversal.
EcoreUtil's resolveAll is written this way because we want to resolve
proxies even in the demand loaded resources.
public static void resolveAll(ResourceSet resourceSet)
{
List<Resource> resources = resourceSet.getResources();
for (int i = 0; i < resources.size(); ++i)
{
resolveAll(resources.get(i));
}
}
Alex Shatalin wrote:
> Hello Ed,
>
>> Since resources are often demand loaded into a resource set as proxies
>> are resolved, that's probably what's happening here. Maybe try
>> changing it to
>>
>> for (Iterator it = new
>> ArrayList(info.getResourceSet().getResources()).iterator();
>
> Should we adopt GMF generator to always use this pattern?
>
> -----------------
> Alex Shatalin
>
>
--------------080800020203040502070200
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Alex,<br>
<br>
Making a copy of the list is a bit expensive. Depending on if you want
to visit the demand loaded resources or not, I'd suggest either<br>
<br>
List<Resource> resources = resourceSet.getResources();<br>
for (int i = 0; i < resources.size(); ++i)<br>
<br>
or <br>
<br>
List<Resource> resources = resourceSet.getResources();<br>
for (int i = 0, size = resources.size(); i < size; ++i)<br>
<br>
The former would visit even ones added during the traversal, while the
latter would visit only those known to be in the list at the start of
the traversal. <br>
<br>
EcoreUtil's resolveAll is written this way because we want to resolve
proxies even in the demand loaded resources.<br>
<blockquote><small> public static void resolveAll(ResourceSet
resourceSet)</small><br>
<small> {</small><br>
<small> List<Resource> resources =
resourceSet.getResources();</small><br>
<small> for (int i = 0; i < resources.size(); ++i)</small><br>
<small> {</small><br>
<small> resolveAll(resources.get(i));</small><br>
<small> }</small><br>
<small> }</small><br>
</blockquote>
<br>
Alex Shatalin wrote:
<blockquote cite="mid:3c3172e61a05c8c9f39c57a4b488@news.eclipse.org"
type="cite">Hello Ed,
<br>
<br>
<blockquote type="cite">Since resources are often demand loaded into
a resource set as proxies
<br>
are resolved, that's probably what's happening here. Maybe try
<br>
changing it to
<br>
<br>
for (Iterator it = new
<br>
ArrayList(info.getResourceSet().getResources()).iterator();
<br>
</blockquote>
<br>
Should we adopt GMF generator to always use this pattern?
<br>
<br>
-----------------
<br>
Alex Shatalin
<br>
<br>
<br>
</blockquote>
<br>
</body>
</html>
--------------080800020203040502070200--
|
|
|
Re: ConcurrentModificationException [message #159874 is a reply to message #159756] |
Tue, 13 November 2007 03:17   |
Eclipse User |
|
|
|
Originally posted by: trommas.yahoo.com
My birthday is coming up, and I've had a hard time making a wish list
for family and friends.. This is probably the gift I'm going to
appreciate the most!
This removes the error from all my editors!
Thanks Ed!
Tomas Zijdemans
Ed Merks wrote:
> Tomas,
>
> Since resources are often demand loaded into a resource set as proxies
> are resolved, that's probably what's happening here. Maybe try changing
> it to
>
> for (Iterator it = new
> ArrayList(info.getResourceSet().getResources()).iterator();
>
>
> Tomas Zijdemans wrote:
>> Well, it is a generated method, so it would be kind of strange if the
>> error was there. But it suggest that the synchronization of the object
>> (called when I select the diagram) fails.
>>
>> /**
>> * @generated
>> */
>> protected void doSynchronize(Object element, IProgressMonitor monitor)
>> throws CoreException {
>> ResourceSetInfo info = getResourceSetInfo(element);
>> if (info != null) {
>> for (Iterator it =
>> info.getResourceSet().getResources().iterator();
>> it.hasNext();) {
>> 402 Resource nextResource = (Resource) it.next();
>> handleElementChanged(info, nextResource, monitor);
>> }
>> return;
>> }
>> super.doSynchronize(element, monitor);
>> }
>>
>>
>> Ed Merks wrote:
>>> Tomas,
>>>
>>> So what does the code at
>>> "UemlbaseDocumentProvider.doSynchronize(Object, IProgressMonitor)
>>> line: 402" look like?
>>>
>>>
>>> Tomas Zijdemans wrote:
>>>> Thanks for helping Ed. I found the breakpointtype you spoke of,
>>>> reproduced the error, and copied the Stack. So here it is:
>>>>
>>>>
>>>> Thread [main] (Suspended (exception
>>>> ConcurrentModificationException))
>>>> BasicEList$EIterator<E1>.checkModCount() line: 1378
>>>> BasicEList$EIterator<E1>.doNext() line: 1326
>>>> BasicEList$EIterator<E1>.next() line: 1312
>>>> UemlbaseDocumentProvider.doSynchronize(Object, IProgressMonitor)
>>>> line: 402
>>>> AbstractDocumentProvider$1SynchronizeOperation.execute(IProg ressMonitor)
>>>> line: 983
>>>> AbstractDocumentProvider$1SynchronizeOperation(AbstractDocum entProvider$DocumentProviderOperation).run(IProgressMonitor)
>>>> line: 66
>>>> UemlbaseDocumentProvider(AbstractDocumentProvider).executeOp eration(AbstractDocumentProvider$DocumentProviderOperation,
>>>> IProgressMonitor) line: 530
>>>> UemlbaseDocumentProvider(AbstractDocumentProvider).synchroni ze(Object)
>>>> line: 991
>>>> UemlbaseDiagramEditor(DiagramDocumentEditor).handleEditorInp utChanged()
>>>> line: 568
>>>> UemlbaseDiagramEditor(DiagramDocumentEditor).sanityCheckStat e(IEditorInput)
>>>> line: 692
>>>> UemlbaseDiagramEditor(DiagramDocumentEditor).safelySanityChe ckState(IEditorInput)
>>>> line: 674
>>>> DiagramDocumentEditor$ActivationListener.handleActivation() line:
>>>> 1135
>>>> DiagramDocumentEditor$ActivationListener.partActivated(IWork benchPart)
>>>> line: 1094 PartListenerList$1.run() line: 72
>>>> SafeRunner.run(ISafeRunnable) line: 37
>>>> Platform.run(ISafeRunnable) line: 857
>>>> PartListenerList.fireEvent(SafeRunnable, IPartListener,
>>>> IWorkbenchPart, String) line: 57
>>>> PartListenerList.firePartActivated(IWorkbenchPart) line: 70
>>>> PartService.firePartActivated(IWorkbenchPartReference) line:
>>>> 73 PartService.setActivePart(IWorkbenchPartReference) line:
>>>> 171 WWinPartService.updateActivePart() line: 124
>>>> WWinPartService.access$0(WWinPartService) line: 115
>>>> WWinPartService$1.partDeactivated(IWorkbenchPartReference) line:
>>>> 48 PartListenerList2$4.run() line: 113
>>>> SafeRunner.run(ISafeRunnable) line: 37
>>>> Platform.run(ISafeRunnable) line: 857
>>>> PartListenerList2.fireEvent(SafeRunnable, IPartListener2,
>>>> IWorkbenchPartReference, String) line: 53
>>>> PartListenerList2.firePartDeactivated(IWorkbenchPartReferenc e) line:
>>>> 111 PartService.firePartDeactivated(IWorkbenchPartReference)
>>>> line: 116 PartService.setActivePart(IWorkbenchPartReference)
>>>> line: 165
>>>> WorkbenchPagePartList.fireActivePartChanged(IWorkbenchPartRe ference,
>>>> IWorkbenchPartReference) line: 56
>>>> WorkbenchPagePartList(PartList).setActivePart(IWorkbenchPart Reference)
>>>> line: 126 WorkbenchPage.setActivePart(IWorkbenchPart) line:
>>>> 3402 WorkbenchPage.requestActivation(IWorkbenchPart) line:
>>>> 2946 EditorPane(PartPane).requestActivation() line: 265
>>>> EditorPane.requestActivation() line: 98
>>>> EditorPane(PartPane).setFocus() line: 311
>>>> EditorPane.setFocus() line: 127
>>>> EditorStack(PartStack).presentationSelectionChanged(IPresent ablePart)
>>>> line: 846 PartStack.access$1(PartStack, IPresentablePart)
>>>> line: 829 PartStack$1.selectPart(IPresentablePart) line:
>>>> 139 TabbedStackPresentation$1.handleEvent(TabFolderEvent)
>>>> line: 131
>>>> DefaultTabFolder(AbstractTabFolder).fireEvent(TabFolderEvent ) line:
>>>> 267 DefaultTabFolder(AbstractTabFolder).fireEvent(int,
>>>> AbstractTabItem) line: 276
>>>> DefaultTabFolder.access$1(DefaultTabFolder, int, AbstractTabItem)
>>>> line: 1 DefaultTabFolder$2.handleEvent(Event) line: 84
>>>> EventTable.sendEvent(Event) line: 66
>>>> CTabFolder(Widget).sendEvent(Event) line: 938
>>>> CTabFolder(Widget).sendEvent(int, Event, boolean) line: 962
>>>> CTabFolder(Widget).sendEvent(int, Event) line: 947
>>>> CTabFolder(Widget).notifyListeners(int, Event) line: 706
>>>> CTabFolder.setSelection(int, boolean) line: 3227
>>>> CTabFolder.onMouse(Event) line: 2005
>>>> CTabFolder$1.handleEvent(Event) line: 316
>>>> EventTable.sendEvent(Event) line: 66
>>>> CTabFolder(Widget).sendEvent(Event) line: 938
>>>> Display.runDeferredEvents() line: 3682
>>>> Display.readAndDispatch() line: 3293
>>>> Workbench.runEventLoop(Window$IExceptionHandler, Display) line:
>>>> 2389 Workbench.runUI() line: 2353
>>>> Workbench.access$4(Workbench) line: 2219 Workbench$4.run()
>>>> line: 466 Realm.runWithDefault(Realm, Runnable) line:
>>>> 289 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor)
>>>> line: 461 PlatformUI.createAndRunWorkbench(Display,
>>>> WorkbenchAdvisor) line: 149
>>>> IDEApplication.start(IApplicationContext) line: 106
>>>> EclipseAppHandle.run(Object) line: 169
>>>> EclipseAppLauncher.runApplication(Object) line: 106
>>>> EclipseAppLauncher.start(Object) line: 76
>>>> EclipseStarter.run(Object) line: 363
>>>> EclipseStarter.run(String[], Runnable) line: 176
>>>> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
>>>> available [native method]
>>>> NativeMethodAccessorImpl.invoke(Object, Object[]) line: not
>>>> available DelegatingMethodAccessorImpl.invoke(Object,
>>>> Object[]) line: not available Method.invoke(Object, Object...)
>>>> line: not available Main.invokeFramework(String[], URL[])
>>>> line: 508 Main.basicRun(String[]) line: 447
>>>> Main.run(String[]) line: 1173 Main.main(String[]) line: 1148
>>>>
>>>> Ed Merks wrote:
>>>>> Tomas,
>>>>>
>>>>> I still haven't seen a full stack trace showing the error. You
>>>>> should be able to get it from the Error log view. Have you been
>>>>> able to get the debugger to stop at the point when the exception is
>>>>> thrown using an exception breakpoint?
>>>>>
>>>>>
>>>>> Tomas Zijdemans wrote:
>>>>>> Thanks for answering. I do not have nodemappings to supertypes.
>>>>>>
>>>>>> I've done a reinstall of eclipse and gmf 2.0.1.
>>>>>>
>>>>>> Created a root with two elements that relate to each other. Derive
>>>>>> a diagram for both. Run it, and still get the same error!!
>>>>>>
>>>>>> Jan Herriger wrote:
>>>>>>> If you have node mappings to supertypes (A and B), you should
>>>>>>> define domain specialisations for them (new "constraint" inside
>>>>>>> the mapping). The body should be:
>>>>>>>
>>>>>>> oclIsTypeOf(A)
>>>>>>>
>>>>>>> Tomas Zijdemans schrieb:
>>>>>>>> Hmm. It seems I have got things working. And I have a definitive
>>>>>>>> source of the error. Either I have misunderstood something, or
>>>>>>>> there is a bug in GMF.
>>>>>>>>
>>>>>>>> As previously stated, everything works in EMF. This just occurs
>>>>>>>> in GMF. Scenario:
>>>>>>>> - A is super of B. B is super of C and D. (A and B should be
>>>>>>>> abstract, but this does not seem to effect anything)
>>>>>>>> - If root can contain A's, and an editor for C and another for D
>>>>>>>> is created - the error occurs.
>>>>>>>> - If root can contain C's and D's, and an editor for C and
>>>>>>>> another for D is created - the error does not occur.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Tomas Zijdemans
>>>>>>>>
>>>>>>>>
>>>>>>>> Tomas Zijdemans wrote:
>>>>>>>>> Thanks for the tip, will check it out. After a week hammering
>>>>>>>>> at this error, I've lost all faith in my ability to create
>>>>>>>>> multiple editors and make them function together. I get this
>>>>>>>>> error, and Load Resources shows nothing in "Browse workspace".
>>>>>>>>>
>>>>>>>>> So thought I would ask you guys what needs to be done.
>>>>>>>>>
>>>>>>>>> Here is what I do:
>>>>>>>>> 1. Single ecore and genmodel (with one root element for each
>>>>>>>>> editor)
>>>>>>>>> 2. Derive tooling, graph and map for each editor.
>>>>>>>>> 3. Derive a generator with these attributes set unique:
>>>>>>>>> - File extensions
>>>>>>>>> - Model ID
>>>>>>>>> - Visual ID
>>>>>>>>> - Plugin ID
>>>>>>>>> - Editor ID
>>>>>>>>>
>>>>>>>>> Any input is, as always, greatly appreciated :)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Best Regards,
>>>>>>>>>
>>>>>>>>> Tomas Zijdemans
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Ed Merks wrote:
>>>>>>>>>> Tomas,
>>>>>>>>>>
>>>>>>>>>> You might not know about it, but in the breakpoints view you
>>>>>>>>>> can set a breakpoint that will stop when a particular
>>>>>>>>>> exception is about to be thrown. Look for the "J!" button...
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Tomas Zijdemans wrote:
>>>>>>>>>>> Thanks for helping Alex! (I got a deadline coming up, so I'm
>>>>>>>>>>> in a bit of a hurry on this one)
>>>>>>>>>>>
>>>>>>>>>>> I started the editor again to view where in the
>>>>>>>>>>> DocumentProvider I should start, but then everything worked
>>>>>>>>>>> again !! - This bug truly has me baffled! Now i can't
>>>>>>>>>>> reproduce the DocumentProvider error without making
>>>>>>>>>>> completely new diagrams.
>>>>>>>>>>>
>>>>>>>>>>> I tried debugging the relation with breakpoints, but
>>>>>>>>>>> everything seemed normal. So it's a mystery where the
>>>>>>>>>>> Concurrent Exception originates from..
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>>
>>>>>>>>>>> Tomas Zijdemans
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Alex Shatalin wrote:
>>>>>>>>>>>> Hello Tomas,
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> 1.
>>>>>>>>>>>>> "xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>>>>>>>>>>>>>
>>>>>>>>>>>>> Does this mean I have GMF 1 installed ???
>>>>>>>>>>>> No. Notation model was not changed in GMF for quite a long
>>>>>>>>>>>> time..
>>>>>>>>>>>>
>>>>>>>>>>>> Can oyu debug DocumentProvider call to see why corresponding
>>>>>>>>>>>> information can not be loaded from the diagram file? (The
>>>>>>>>>>>> files you attached looks normal..)
>>>>>>>>>>>>
>>>>>>>>>>>> -----------------
>>>>>>>>>>>> Alex Shatalin
>>>>>>>>>>>>
>>>>>>>>>>>>
|
|
| |
Re: ConcurrentModificationException [message #159931 is a reply to message #159756] |
Tue, 13 November 2007 07:43   |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Ed et al.,
I seem to recall something about the resources list of the ResourceSet
implementing a custom iterator that was tolerant of additions (by proxy
resolution) during iteration. Was this not done in EMF 2.0 or some such
long ago release? Am I out to lunch? Sounds like a useful capability for
this particular list to have, in general.
Cheers,
Christian
Ed Merks wrote:
> Tomas,
>
> Since resources are often demand loaded into a resource set as proxies
> are resolved, that's probably what's happening here. Maybe try changing
> it to
>
> for (Iterator it = new
> ArrayList(info.getResourceSet().getResources()).iterator();
>
>
> Tomas Zijdemans wrote:
>> Well, it is a generated method, so it would be kind of strange if the
>> error was there. But it suggest that the synchronization of the object
>> (called when I select the diagram) fails.
>>
>> /**
>> * @generated
>> */
>> protected void doSynchronize(Object element, IProgressMonitor monitor)
>> throws CoreException {
>> ResourceSetInfo info = getResourceSetInfo(element);
>> if (info != null) {
>> for (Iterator it =
>> info.getResourceSet().getResources().iterator();
>> it.hasNext();) {
>> 402 Resource nextResource = (Resource) it.next();
>> handleElementChanged(info, nextResource, monitor);
>> }
>> return;
>> }
>> super.doSynchronize(element, monitor);
>> }
>>
-----8<-----
|
|
|
Re: ConcurrentModificationException [message #159947 is a reply to message #159931] |
Tue, 13 November 2007 08:01   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------010506050308060306090700
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Christian,
There's EcoreUtil.ContentTreeIterator.ResourcesIterator, but that's used
for the tree iterators. The iterator for ResourceSet.getResources
itself is just a plain old fail fast iterator. I'm not sure it's a good
idea to make it be not fail fast given that some clients might well
expect to see only resources that were there at the start of the
iteration, which is generally a safe assumption when using an iterator.
Christian W. Damus wrote:
> Hi, Ed et al.,
>
> I seem to recall something about the resources list of the ResourceSet
> implementing a custom iterator that was tolerant of additions (by proxy
> resolution) during iteration. Was this not done in EMF 2.0 or some such
> long ago release? Am I out to lunch? Sounds like a useful capability for
> this particular list to have, in general.
>
> Cheers,
>
> Christian
>
>
> Ed Merks wrote:
>
>
>> Tomas,
>>
>> Since resources are often demand loaded into a resource set as proxies
>> are resolved, that's probably what's happening here. Maybe try changing
>> it to
>>
>> for (Iterator it = new
>> ArrayList(info.getResourceSet().getResources()).iterator();
>>
>>
>> Tomas Zijdemans wrote:
>>
>>> Well, it is a generated method, so it would be kind of strange if the
>>> error was there. But it suggest that the synchronization of the object
>>> (called when I select the diagram) fails.
>>>
>>> /**
>>> * @generated
>>> */
>>> protected void doSynchronize(Object element, IProgressMonitor monitor)
>>> throws CoreException {
>>> ResourceSetInfo info = getResourceSetInfo(element);
>>> if (info != null) {
>>> for (Iterator it =
>>> info.getResourceSet().getResources().iterator();
>>> it.hasNext();) {
>>> 402 Resource nextResource = (Resource) it.next();
>>> handleElementChanged(info, nextResource, monitor);
>>> }
>>> return;
>>> }
>>> super.doSynchronize(element, monitor);
>>> }
>>>
>>>
>
> -----8<-----
>
--------------010506050308060306090700
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Christian,<br>
<br>
There's EcoreUtil.ContentTreeIterator.ResourcesIterator, but that's
used for the tree iterators. The iterator for
ResourceSet.getResources itself is just a plain old fail fast
iterator. I'm not sure it's a good idea to make it be not fail fast
given that some clients might well expect to see only resources that
were there at the start of the iteration, which is generally a safe
assumption when using an iterator.<br>
<br>
<br>
Christian W. Damus wrote:
<blockquote cite="mid:fhc665$v4c$1@build.eclipse.org" type="cite">
<pre wrap="">Hi, Ed et al.,
I seem to recall something about the resources list of the ResourceSet
implementing a custom iterator that was tolerant of additions (by proxy
resolution) during iteration. Was this not done in EMF 2.0 or some such
long ago release? Am I out to lunch? Sounds like a useful capability for
this particular list to have, in general.
Cheers,
Christian
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Tomas,
Since resources are often demand loaded into a resource set as proxies
are resolved, that's probably what's happening here. Maybe try changing
it to
for (Iterator it = new
ArrayList(info.getResourceSet().getResources()).iterator();
Tomas Zijdemans wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Well, it is a generated method, so it would be kind of strange if the
error was there. But it suggest that the synchronization of the object
(called when I select the diagram) fails.
/**
* @generated
*/
protected void doSynchronize(Object element, IProgressMonitor monitor)
throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
for (Iterator it =
info.getResourceSet().getResources().iterator();
it.hasNext();) {
402 Resource nextResource = (Resource) it.next();
handleElementChanged(info, nextResource, monitor);
}
return;
}
super.doSynchronize(element, monitor);
}
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
-----8<-----
</pre>
</blockquote>
<br>
</body>
</html>
--------------010506050308060306090700--
|
|
|
Re: ConcurrentModificationException [message #159995 is a reply to message #159947] |
Tue, 13 November 2007 08:55  |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Ed,
Thanks for clarifying! I'm glad I'm not out to lunch.
I see that the tree iterator naturally has different semantics from the
usual iterator. The very process of iterating contents may add to the
resources list (resolving containment proxies) so this is necessary in that
context. That isn't the case with simple iteration over
ResourceSet::getResources(), so I withdraw my remark.
cW
Ed Merks wrote:
> Christian,
>
> There's EcoreUtil.ContentTreeIterator.ResourcesIterator, but that's used
> for the tree iterators. The iterator for ResourceSet.getResources
> itself is just a plain old fail fast iterator. I'm not sure it's a good
> idea to make it be not fail fast given that some clients might well
> expect to see only resources that were there at the start of the
> iteration, which is generally a safe assumption when using an iterator.
>
>
> Christian W. Damus wrote:
>> Hi, Ed et al.,
>>
>> I seem to recall something about the resources list of the ResourceSet
>> implementing a custom iterator that was tolerant of additions (by proxy
>> resolution) during iteration. Was this not done in EMF 2.0 or some such
>> long ago release? Am I out to lunch? Sounds like a useful capability
>> for this particular list to have, in general.
>>
>> Cheers,
>>
>> Christian
-----8<-----
|
|
|
Goto Forum:
Current Time: Sun Apr 27 10:36:21 EDT 2025
Powered by FUDForum. Page generated in 0.05842 seconds
|