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
Hi,

I get an NPE while the XbaseCompiler is running:

java.lang.NullPointerException
	at org.eclipse.xtext.xbase.compiler.TypeConvertingCompiler.mustInsertTypeCast(TypeConvertingCompiler.java:118)
	at org.eclipse.xtext.xbase.compiler.TypeConvertingCompiler.internalToConvertedExpression(TypeConvertingCompiler.java:91)
	at org.eclipse.xtext.xbase.compiler.TypeConvertingCompiler.internalToJavaExpression(TypeConvertingCompiler.java:71)
	at org.eclipse.xtext.xbase.compiler.FeatureCallCompiler.appendReceiver(FeatureCallCompiler.java:715)
	at org.eclipse.xtext.xbase.compiler.FeatureCallCompiler.featureCalltoJavaExpression(FeatureCallCompiler.java:436)


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.

Thanks,
Matthias
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: Fri Apr 19 07:07:35 GMT 2024

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

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

Back to the top