Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » NPE after upgrade to 2.5.0
NPE after upgrade to 2.5.0 [message #1235116] Thu, 23 January 2014 15:55 Go to next message
Matthias Spiller is currently offline Matthias SpillerFriend
Messages: 13
Registered: September 2013
Junior Member

I get an NPE while the XbaseCompiler is running:

	at org.eclipse.xtext.xbase.compiler.TypeConvertingCompiler.mustInsertTypeCast(
	at org.eclipse.xtext.xbase.compiler.TypeConvertingCompiler.internalToConvertedExpression(
	at org.eclipse.xtext.xbase.compiler.TypeConvertingCompiler.internalToJavaExpression(
	at org.eclipse.xtext.xbase.compiler.FeatureCallCompiler.appendReceiver(
	at org.eclipse.xtext.xbase.compiler.FeatureCallCompiler.featureCalltoJavaExpression(

the call to resolvedTypes.getActualType(expression) returns null.

From what I can see this call had also returned null with xtext 2.4, but had not lead to an error.

Any idea what I can do? Is it correct that getActualType() returns null.
When debugging, I see that it looks into "expressionTypes" of class RootResolvedTypes which is empty.

Let me know what else you need to know from my implementation.

Re: NPE after upgrade to 2.5.0 [message #1325587 is a reply to message #1235116] Thu, 01 May 2014 09:25 Go to previous message
Thomas Fritsch is currently offline Thomas FritschFriend
Messages: 28
Registered: April 2013
Location: Germany
Junior Member
I got NPE with same stack-trace after upgrading from Xtext 2.4.3 to 2.5.3.
It happened during generating a Java method body.
Finally it turned out to be a bug in my JvmModelInferrer implementation
(wrong usage of JvmTypesBuilder-methods toClass and newTypeRef).
After fixing this it works fine.

For solving your problem, much more information would be needed
(your grammar, JvmModelInferrer, DSL example to reproduce the problem).
Previous Topic:Reference of Making a language and eclipse plugin with Xtext
Next Topic:[xtend] . vs ::
Goto Forum:

Current Time: Sat Sep 26 21:46:39 GMT 2020

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

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

Back to the top