Home » Modeling » GMF (Graphical Modeling Framework) » StackOverflow Problem
StackOverflow Problem [message #213327] |
Fri, 12 December 2008 09:14 |
Eclipse User |
|
|
|
Originally posted by: jgreen.upb.de
Hi,
I'm experiencing a StackOverflowError when I close my diagram editor. This happens with some models, but not with all,
however, I don't see the pattern yet.
java.lang.StackOverflowError
at org.eclipse.emf.ecore.resource.impl.URIMappingRegistryImpl.g etURI(URIMappingRegistryImpl.java:105)
at org.eclipse.emf.ecore.resource.impl.URIMappingRegistryImpl$U RIMapImpl.getURI(URIMappingRegistryImpl.java:168)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.normalize(ExtensibleURIConverterImpl.java:351)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:361)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObje ct(ResourceSetImpl.java:216)
at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 202)
at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 262)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(Ba sicEObjectImpl.java:1470)
at org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreELis t.java:212)
at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.jav a:167)
at
org.eclipse.emf.ecore.util.EObjectContainmentWithInverseELis t$Resolving.resolve(EObjectContainmentWithInverseEList.java: 111)
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 37)
at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.hasNext(EContentsEList.java:441)
at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.next(EContentsEList.java:561)
at org.eclipse.emf.ecore.impl.EModelElementImpl.eObjectForURIFr agmentSegment(EModelElementImpl.java:449)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:775)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:751)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObje ct(ResourceSetImpl.java:219)
at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 202)
at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 262)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(Ba sicEObjectImpl.java:1470)
at org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreELis t.java:212)
at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.jav a:167)
at
org.eclipse.emf.ecore.util.EObjectContainmentWithInverseELis t$Resolving.resolve(EObjectContainmentWithInverseEList.java: 111)
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 37)
...
When I don't get the StackOverflow, I see warnings as follows, could this be related?
"Resource was re-loaded while it was being unloaded, probably because of unintentional proxy resolution:
platform:/resource/..."
The diagram editor is an editor for "meta-rules", thus a lot of other packages are referenced from within the model,
also ecore. Could that be part of the problem?
Any ideas?
Joel
|
|
|
Re: StackOverflow Problem [message #213346 is a reply to message #213327] |
Fri, 12 December 2008 10:16 |
Eclipse User |
|
|
|
Originally posted by: cayla_sha.gmx.net
Hello Joel,
I don`t know, if this helps: I once had also a StackOverflowError and it
was because of a circle, like method1 calls method2 and method2 calls
method1 and then method1 again calls method2...... (actually there were
more than 2 Methods involved) I found the circle through debugging.
The stack, that overflowed in this case, was the StackTrace.
Best wishes
Julia
|
|
|
Re: StackOverflow Problem [message #213438 is a reply to message #213327] |
Fri, 12 December 2008 14:51 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
Hi, Joel,
The warning that you are seeing comes from the
TransactionalEditingDomain used by your GMF-based editor. It indicates
that something in your diagram is causing a resource to be re-loaded
while it is in the process of unloading. I suspect that this is
happening repeatedly (in an unbounded loop) in your case.
The first report of this was in the GMF newsgroup quite some time ago
(early in the 2.1 release development, I think). You can search there
for a thread about a diagram editor that, when closing, would unload its
resource but then some leaking edit-part listeners or something would
fire and cause proxies (just created by the unload) to resolve and load
the same resource again before it finished unloading.
HTH,
Christian
Joel Greenyer wrote:
> Hi,
> I'm experiencing a StackOverflowError when I close my diagram editor.
> This happens with some models, but not with all, however, I don't see
> the pattern yet.
>
> java.lang.StackOverflowError
> at
> org.eclipse.emf.ecore.resource.impl.URIMappingRegistryImpl.g etURI(URIMappingRegistryImpl.java:105)
>
> at
> org.eclipse.emf.ecore.resource.impl.URIMappingRegistryImpl$U RIMapImpl.getURI(URIMappingRegistryImpl.java:168)
>
> at
> org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.normalize(ExtensibleURIConverterImpl.java:351)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:361)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObje ct(ResourceSetImpl.java:216)
>
> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 202)
> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 262)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(Ba sicEObjectImpl.java:1470)
>
> at
> org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreELis t.java:212)
> at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.jav a:167)
> at
> org.eclipse.emf.ecore.util.EObjectContainmentWithInverseELis t$Resolving.resolve(EObjectContainmentWithInverseEList.java: 111)
>
> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 37)
> at
> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.hasNext(EContentsEList.java:441)
>
> at
> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.next(EContentsEList.java:561)
>
> at
> org.eclipse.emf.ecore.impl.EModelElementImpl.eObjectForURIFr agmentSegment(EModelElementImpl.java:449)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:775)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:751)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObje ct(ResourceSetImpl.java:219)
>
> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 202)
> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 262)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(Ba sicEObjectImpl.java:1470)
>
> at
> org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreELis t.java:212)
> at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.jav a:167)
> at
> org.eclipse.emf.ecore.util.EObjectContainmentWithInverseELis t$Resolving.resolve(EObjectContainmentWithInverseEList.java: 111)
>
> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 37)
> ...
>
>
> When I don't get the StackOverflow, I see warnings as follows, could
> this be related?
> "Resource was re-loaded while it was being unloaded, probably because of
> unintentional proxy resolution: platform:/resource/..."
>
> The diagram editor is an editor for "meta-rules", thus a lot of other
> packages are referenced from within the model, also ecore. Could that be
> part of the problem?
>
> Any ideas?
>
> Joel
|
|
|
Re: StackOverflow Problem [message #213987 is a reply to message #213438] |
Thu, 18 December 2008 22:19 |
Eclipse User |
|
|
|
Originally posted by: jgreen.upb.de
Hi Christian,
I've seen the thread you talk about and my feeling tells me you are right, as the loop I get involves the basic ecore stuff.
But what can I do to prevent that from happening, or at least identify where the problem lies?
Thanks for helping
Joel
Christian W. Damus wrote:
> Hi, Joel,
>
> The warning that you are seeing comes from the
> TransactionalEditingDomain used by your GMF-based editor. It indicates
> that something in your diagram is causing a resource to be re-loaded
> while it is in the process of unloading. I suspect that this is
> happening repeatedly (in an unbounded loop) in your case.
>
> The first report of this was in the GMF newsgroup quite some time ago
> (early in the 2.1 release development, I think). You can search there
> for a thread about a diagram editor that, when closing, would unload its
> resource but then some leaking edit-part listeners or something would
> fire and cause proxies (just created by the unload) to resolve and load
> the same resource again before it finished unloading.
>
> HTH,
>
> Christian
>
>
> Joel Greenyer wrote:
>> Hi,
>> I'm experiencing a StackOverflowError when I close my diagram editor.
>> This happens with some models, but not with all, however, I don't see
>> the pattern yet.
>>
>> java.lang.StackOverflowError
>> at
>> org.eclipse.emf.ecore.resource.impl.URIMappingRegistryImpl.g etURI(URIMappingRegistryImpl.java:105)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.URIMappingRegistryImpl$U RIMapImpl.getURI(URIMappingRegistryImpl.java:168)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.normalize(ExtensibleURIConverterImpl.java:351)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:361)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObje ct(ResourceSetImpl.java:216)
>>
>> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 202)
>> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 262)
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(Ba sicEObjectImpl.java:1470)
>>
>> at
>> org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreELis t.java:212)
>> at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.jav a:167)
>> at
>> org.eclipse.emf.ecore.util.EObjectContainmentWithInverseELis t$Resolving.resolve(EObjectContainmentWithInverseEList.java: 111)
>>
>> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 37)
>> at
>> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.hasNext(EContentsEList.java:441)
>>
>> at
>> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.next(EContentsEList.java:561)
>>
>> at
>> org.eclipse.emf.ecore.impl.EModelElementImpl.eObjectForURIFr agmentSegment(EModelElementImpl.java:449)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:775)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:751)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObje ct(ResourceSetImpl.java:219)
>>
>> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 202)
>> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 262)
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(Ba sicEObjectImpl.java:1470)
>>
>> at
>> org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreELis t.java:212)
>> at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.jav a:167)
>> at
>> org.eclipse.emf.ecore.util.EObjectContainmentWithInverseELis t$Resolving.resolve(EObjectContainmentWithInverseEList.java: 111)
>>
>> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 37)
>> ...
>>
>>
>> When I don't get the StackOverflow, I see warnings as follows, could
>> this be related?
>> "Resource was re-loaded while it was being unloaded, probably because
>> of unintentional proxy resolution: platform:/resource/..."
>>
>> The diagram editor is an editor for "meta-rules", thus a lot of other
>> packages are referenced from within the model, also ecore. Could that
>> be part of the problem?
>>
>> Any ideas?
>>
>> Joel
|
|
|
Re: StackOverflow Problem [message #214025 is a reply to message #213987] |
Fri, 19 December 2008 00:17 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
Hi, Joel,
If I were faced with this problem, I would start with a breakpoint in
the ResourceSetManager class where it logs this message, and trace back
to the code that is resolving the proxy. How to figure out why it is
resolving this proxy when, clearly, it shouldn't be is another matter.
I'm afraid that I don't know nearly enough about GMF to surmise why this
could be happening.
Cheers,
Christian
Joel Greenyer wrote:
> Hi Christian,
> I've seen the thread you talk about and my feeling tells me you are
> right, as the loop I get involves the basic ecore stuff.
> But what can I do to prevent that from happening, or at least identify
> where the problem lies?
>
> Thanks for helping
>
> Joel
>
>
>
> Christian W. Damus wrote:
>> Hi, Joel,
>>
>> The warning that you are seeing comes from the
>> TransactionalEditingDomain used by your GMF-based editor. It
>> indicates that something in your diagram is causing a resource to be
>> re-loaded while it is in the process of unloading. I suspect that
>> this is happening repeatedly (in an unbounded loop) in your case.
>>
>> The first report of this was in the GMF newsgroup quite some time ago
>> (early in the 2.1 release development, I think). You can search there
>> for a thread about a diagram editor that, when closing, would unload
>> its resource but then some leaking edit-part listeners or something
>> would fire and cause proxies (just created by the unload) to resolve
>> and load the same resource again before it finished unloading.
>>
>> HTH,
>>
>> Christian
>>
>>
>> Joel Greenyer wrote:
>>> Hi,
>>> I'm experiencing a StackOverflowError when I close my diagram editor.
>>> This happens with some models, but not with all, however, I don't see
>>> the pattern yet.
>>>
>>> java.lang.StackOverflowError
>>> at
>>> org.eclipse.emf.ecore.resource.impl.URIMappingRegistryImpl.g etURI(URIMappingRegistryImpl.java:105)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.URIMappingRegistryImpl$U RIMapImpl.getURI(URIMappingRegistryImpl.java:168)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.normalize(ExtensibleURIConverterImpl.java:351)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:361)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObje ct(ResourceSetImpl.java:216)
>>>
>>> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 202)
>>> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 262)
>>> at
>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(Ba sicEObjectImpl.java:1470)
>>>
>>> at
>>> org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreELis t.java:212)
>>> at
>>> org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.jav a:167)
>>> at
>>> org.eclipse.emf.ecore.util.EObjectContainmentWithInverseELis t$Resolving.resolve(EObjectContainmentWithInverseEList.java: 111)
>>>
>>> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 37)
>>> at
>>> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.hasNext(EContentsEList.java:441)
>>>
>>> at
>>> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.next(EContentsEList.java:561)
>>>
>>> at
>>> org.eclipse.emf.ecore.impl.EModelElementImpl.eObjectForURIFr agmentSegment(EModelElementImpl.java:449)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:775)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:751)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObje ct(ResourceSetImpl.java:219)
>>>
>>> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 202)
>>> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 262)
>>> at
>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(Ba sicEObjectImpl.java:1470)
>>>
>>> at
>>> org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreELis t.java:212)
>>> at
>>> org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.jav a:167)
>>> at
>>> org.eclipse.emf.ecore.util.EObjectContainmentWithInverseELis t$Resolving.resolve(EObjectContainmentWithInverseEList.java: 111)
>>>
>>> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 37)
>>> ...
>>>
>>>
>>> When I don't get the StackOverflow, I see warnings as follows, could
>>> this be related?
>>> "Resource was re-loaded while it was being unloaded, probably because
>>> of unintentional proxy resolution: platform:/resource/..."
>>>
>>> The diagram editor is an editor for "meta-rules", thus a lot of other
>>> packages are referenced from within the model, also ecore. Could that
>>> be part of the problem?
>>>
>>> Any ideas?
>>>
>>> Joel
|
|
|
Goto Forum:
Current Time: Sat May 04 14:52:32 GMT 2024
Powered by FUDForum. Page generated in 0.03418 seconds
|