Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » DomainModel-Sample - StackOverflowException
DomainModel-Sample - StackOverflowException [message #1472167] Thu, 13 November 2014 17:02 Go to next message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

Hi,

today i did some debugging to solve my Entity-problem.

Then i got the idea to use 200 entities in the Xtext domain model sample.

I prepared 200 entities following the pattern:

import org.my.entities[x+1].Entity[x+1]
package org.my.entities[x] {
	entity Entity[x]{
		refx : Entity[x+1]
	}
}


[x] means the current number of my entities from 1 to 200.

And i recognized, that the domain model sample throws an StackOverflowException, if the edited entity is lower than about Entity100.

The problem is, that editing and saving Entity100 will force loading and resolving (incl. derived state) for all entities up to Entity200.

Entity100 -> derived State (Entity100) -> resolve Entity101 -> derived State (Entity101) -> resolve Entity102 -> derived State (Entity102) and so on.

-----

Later i tried the same with Xtend.

Prepared 200 Xtend classes following the pattern:
class Base[x] {
	private Base[x+1] refUpper;
	private Base[x-1] refLower;
}


And i could see, that Xtend will not install the derived state for all 200 classes.
But it just resolves and installes derived state for [x], [x-1] and [x+1].
And no StackOverflowException is thrown.

I tried to find out the difference between the domain model sample and the Xtend implementation.

Could see, that Xtend uses different entries in index. Just the JvmGenericType is available there. But it also points to {resourceURI}#/1.

-------

My question is:
What has to be changed in the domain model sample, that the behavior in terms of resolving will be pretty much the same like in Xtend. I think the main parts involved are index, linking and scoping?

Thanks a lot for your help and input...

Best Florian










Re: DomainModel-Sample - StackOverflowException [message #1473093 is a reply to message #1472167] Fri, 14 November 2014 10:30 Go to previous message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

Thanks,

already found the issue. JvmTypesBuilder#toGetter() resolves the JvmTypeReference.

And i have an idea how to solve. Let's see. Will keep you informed about it.

Best Flo
Previous Topic:implicit variable in XBlockExpression
Next Topic:[XCORE] XCore and and Oomph
Goto Forum:
  


Current Time: Thu Apr 25 13:29:29 GMT 2024

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

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

Back to the top