In Spoofax stable, I get a nullpointer exception on any refactoring. Despite this, some refactorings such as the default rename refactoring of the Entity language still work.

The nullpointer arrises because observer.invokeSilent(sname, current, null); is called with a null as last parameter (line 71 over here). In an earlier version of Spoofax runtime, this was not the case and a file was passed instead.

I wonder why this change was made and whether simply passing it a file again will solve things.

Submitted by Oskar van Rest on 24 May 2013 at 00:25

On 24 May 2013 at 00:29 Oskar van Rest tagged @maartje

On 24 May 2013 at 09:21 Vlad Vergu removed tag error

On 24 May 2013 at 09:21 Vlad Vergu tagged error

On 24 May 2013 at 09:21 Vlad Vergu removed tag error

On 24 May 2013 at 09:21 Vlad Vergu removed tag @maartje

On 24 May 2013 at 09:21 Vlad Vergu tagged error

On 24 May 2013 at 09:21 Vlad Vergu tagged @vvergu

On 24 May 2013 at 12:08 Vlad Vergu commented:

I’ve committed a fix, both stable and nightly. I haven’t tested it though. Please update and let me know if this fixed it. Thanks.


On 24 May 2013 at 19:11 Oskar van Rest commented:

That worked, thanks.


On 24 May 2013 at 19:11 Oskar van Rest closed this issue.

On 30 May 2013 at 21:09 Oskar van Rest commented:

I thought it was fixed because the error didn’t show up after updating to the latest Spoofax Nightly. But http://spoofax.org/update/nightly redirects to some old build and the most recent build, which includes your commit, still gives the nullpointer exception.

Here’s the stack trace:

java.lang.NullPointerException
at org.strategoxt.imp.runtime.stratego.EditorIOAgent.getProject(EditorIOAgent.java:202)
at org.strategoxt.imp.runtime.services.StrategoObserver.configureRuntime(StrategoObserver.java:820)
at org.strategoxt.imp.runtime.services.StrategoObserver.invoke(StrategoObserver.java:686)
at org.strategoxt.imp.runtime.services.StrategoObserver.invokeSilent(StrategoObserver.java:750)
at org.strategoxt.imp.runtime.services.StrategoObserver.invokeSilent(StrategoObserver.java:741)
at org.strategoxt.imp.runtime.services.StrategoObserver.invokeSilent(StrategoObserver.java:726)
at org.strategoxt.imp.runtime.services.StrategoTextChangeCalculator$1.invoke(StrategoTextChangeCalculator.java:71)

On 30 May 2013 at 21:09 Oskar van Rest reopened this issue.

On 30 May 2013 at 21:29 Vlad Vergu commented:

Hi, let’s look at this, it does look like a slightly different issue. BTW the update site http://download.spoofax.org/update/nightly does point to the latest build; indeed there seems to be something wrong with the other one.


On 30 May 2013 at 21:29 Oskar van Rest commented:

Ignore my last comment. Your fix did solve the problem. My own code was just messing something up with the interpreter.


On 30 May 2013 at 21:29 Oskar van Rest closed this issue.

Log in to post comments