I am running several tests with the nightly SPT core and since today (I believe commit 2f75777b4d18a200854261f987b2bfe43d4d8cad, merged 2016-06-09, might have introduced the error) I get a NullPointerException on many tests:

java.lang.NullPointerException: null
	at org.metaborg.core.source.SourceRegion.contains(SourceRegion.java:87)
	at org.metaborg.spt.core.run.expectations.AnalyzeExpectationEvaluator.checkMessages(AnalyzeExpectationEvaluator.java:81)
	at org.metaborg.spt.core.run.expectations.AnalyzeExpectationEvaluator.evaluate(AnalyzeExpectationEvaluator.java:60)
	at org.metaborg.spt.core.run.expectations.AnalyzeExpectationEvaluator.evaluate(AnalyzeExpectationEvaluator.java:1)
	at org.metaborg.spt.core.run.SpoofaxTestCaseRunner.evaluateExpectations(SpoofaxTestCaseRunner.java:69)
	at org.metaborg.spt.core.run.SpoofaxTestCaseRunner.evaluateExpectations(SpoofaxTestCaseRunner.java:1)
	at org.metaborg.mbt.core.run.TestCaseRunner.run(TestCaseRunner.java:86)
	at org.metaborg.spt.core.run.SpoofaxTestCaseRunner.run(SpoofaxTestCaseRunner.java:42)
...

Could it be that the newly introduced call to SourceRegion.contains(ISourceRegion) fails because the given argument region is null and the contains method doesn't guard against this? (as per Javadoc IMessage.region() is allowed to return null, so this isn't it.)

Submitted by Daniel Lehmann on 10 June 2016 at 21:36

Log in to post comments