Nullpointer on refactorings
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 anull
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
Issue Log
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.
That worked, thanks.
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)
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.
Ignore my last comment. Your fix did solve the problem. My own code was just messing something up with the interpreter.
Log in to post comments