Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext 2.12 migration issue (ComputationExceptionStackOverflow)(Updating to Guice 4)
Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1769595] Wed, 02 August 2017 06:26 Go to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 123
Registered: July 2009
Location: India
Senior Member
Hi All,

After migrating to latest Xtext/Java 8, I stumbled across the attached error. I cannot make any more progress.

Almost everyone facing this problem [0] recommend [1] updating to Guice 4. I understand that there is already an issue raised [2], however I would like to know if there are immediate plans of updating Guice.

[0] https://github.com/google/guice/issues/681
[1] https://goo.gl/uo79wJ
[2] https://github.com/eclipse/xtext-core/issues/393

Please comment.

Tx in advance.
  • Attachment: err.txt
    (Size: 19.51KB, Downloaded 15 times)


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1769597 is a reply to message #1769595] Wed, 02 August 2017 06:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
if i understand that you will get only better error messages with guice4
from which xtext version are you migrating?
did you try to use the debugger to find out what binding causes the stackoverflow?
do you use xbase or not?

does this happen with ui module only or with standlone as well?

do you use the new xtext generator (2.9+) or still the old workflow.

could you share a minimal reproducing project

can you diff the generated abstract modules with the new and the old version. are there any diffs?


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com

[Updated on: Wed, 02 August 2017 06:43]

Report message to a moderator

Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1769601 is a reply to message #1769597] Wed, 02 August 2017 07:34 Go to previous messageGo to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 123
Registered: July 2009
Location: India
Senior Member
> if i understand that you will get only better error messages with guice4
Right, for better error message.

> from which xtext version are you migrating?
Migrating from 2.8 to 2.12.

> did you try to use the debugger to find out what binding causes the stackoverflow?
I put breakpoints on "ComputationException" and "StackOverflowError" and thought of tracing back to find the types that Guice is trying to build/bind, but the debugger gets stuck/stops responding (PS attached image). Is there a better place to put the breakpoint(s) ?

> do you use xbase or not?
Yes, with quiet a bit of customization's.

> does this happen with ui module only or with standlone as well?
It happens with the standalone projects. I haven't tested it with the UI module as I do not need it at this moment.

> do you use the new xtext generator (2.9+) or still the old workflow.
Yes I am using the new Xtext generator. With the old workflow, we have some issues with the customizations that we have done to the XBase compiler and other pieces.

> could you share a minimal reproducing project
I'll try to come up with a minimal example. The one where I see the errors cannot be shared.

> can you diff the generated abstract modules with the new and the old version. are there any diffs?
Yes there were many differences, especially in the generated code.
  • Attachment: 037.png
    (Size: 11.53KB, Downloaded 31 times)


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1769603 is a reply to message #1769601] Wed, 02 August 2017 07:38 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
so the change that causes this could be in 2.9 2.10 and 2.11 as well.

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1769606 is a reply to message #1769603] Wed, 02 August 2017 07:53 Go to previous messageGo to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 123
Registered: July 2009
Location: India
Senior Member
Sorry, I cannot confirm as I haven't tried porting to 2.9 2.10 and 2.11.

Give the situation, do you have any hints/recommendations that I could try ? Something that can help me understand more about the actual problem. Tx


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj

[Updated on: Wed, 02 August 2017 07:54]

Report message to a moderator

Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1769607 is a reply to message #1769606] Wed, 02 August 2017 07:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
well i think we need an example.
i wonder which is the JIT binding that is missing and that you could somehow see it in the debugger.
maybe you can do some sysouts in conditional breakpoints
and look whats printed right before the stackoverflow happens


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1770255 is a reply to message #1769607] Wed, 09 August 2017 12:49 Go to previous messageGo to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 123
Registered: July 2009
Location: India
Senior Member
We have a bunch of DSL's in our product. I am experiencing the aforementioned issue in the ones that make use of XBase. This is what I found - In the new generated code (2.9+), the generated class AbstractMyDslRuntimeModule extends the DefaultRuntimeModule. In the old code (2.8) it was extending from the DefaultCommonTypesRuntimeModule. Now, in the new generated code, if I change the AbstractMyDslRuntimeModule to extend DefaultCommonTypesRuntimeModule, everything works fine. I no more see the ComputationExceptionStackOverflow error.

The class AbstractMyDslRuntimeModule is part of the "src-gen" folder and I shouldn't be changing it manually. Is there a way for me to generate the AbstractMyDslRuntimeModule that extends DefaultCommonTypesRuntimeModule ? I looked into the "XbaseGeneratorFragment2", but didn't find anything that could help. Any clue ???

PS : I create a sample DSL (based on XBase) using Xtext 2.8 and then ported (updated mwe2, regenerated code) to Xtext 2.12, but I couldn't reproduce the issue. It appears that the problem is with my office project and I might have overlooked something. Nevertheless, the above fix works.

Tx in advance.


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj

[Updated on: Wed, 09 August 2017 13:11]

Report message to a moderator

Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1770261 is a reply to message #1770255] Wed, 09 August 2017 13:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
are you sure you inherit from xbase? or xtype? or teminals? how does the header of your lang look like? how the workflow?

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com

[Updated on: Wed, 09 August 2017 13:45]

Report message to a moderator

Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1770277 is a reply to message #1770261] Wed, 09 August 2017 15:02 Go to previous messageGo to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 123
Registered: July 2009
Location: India
Senior Member
Correction - The language for which I see the error "does not" inherit from XBase. It does define a custom - JVMModelInferrer, ResourceDescriptionStrategy (extends XbaseResourceDescriptionStrategy) and bindings for the same. In addition, following bindings are provided - XbaseQualifiedNameProvider, JvmModelAssociator, BatchLinkableResource..etc

The workflow is quiet straightforward.
  • Attachment: mydsl.mwe2
    (Size: 1.90KB, Downloaded 21 times)


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1770280 is a reply to message #1770277] Wed, 09 August 2017 15:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
would have expected a

commonTypesSupport = {
onlyEnabledIfGrammarIsUsed = false
}

inside the language section


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1770283 is a reply to message #1770280] Wed, 09 August 2017 15:46 Go to previous messageGo to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 123
Registered: July 2009
Location: India
Senior Member
Very nice. It works now.

Thank you very much for the help.


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1770358 is a reply to message #1770283] Thu, 10 August 2017 11:39 Go to previous messageGo to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 123
Registered: July 2009
Location: India
Senior Member
Hello Christian,

Sorry, I still have one last bit pending. Highly appreciate if I could get some hints.

The above works perfectly fine for the "standalone" modules. However, when I try the UI modules, I see the same error -ComputationExceptionStackOverflow.

In the DSL that uses XBase (with org.eclipse.xtext.xbase.Xbase), the AbstractXXDslIdeModule extends from the DefaultXbaseIdeModule. Based on what I saw above, I manually changed the AbstractMyDslIdeModule (non xbase) to extend DefaultXbaseIdeModule, but that didn't work.

I am not sure how to proceed. Do you have any clue ?

Tx in advance.



Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1770361 is a reply to message #1770358] Thu, 10 August 2017 12:02 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
can you simply compare the bindings in the abstract generated ui and ide module and their hardcodeded supertypes from a real xbase language with yours to find out whats missing?
i assume it has todo with some JIT bindings that rather need an explicit binding


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1770363 is a reply to message #1770361] Thu, 10 August 2017 12:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
there is e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=467213

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext 2.12 migration issue (ComputationExceptionStackOverflow) [message #1770364 is a reply to message #1770363] Thu, 10 August 2017 12:05 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
=> it would be nice to have a minimal reproducing example

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Previous Topic:content assist
Next Topic:(newbie) Rule error on CrossReferences
Goto Forum:
  


Current Time: Wed Jan 17 01:48:56 GMT 2018

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

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