Assertion fails
In Spoofax 1.4.0 the following assertion fails when invoking ‘analysis’ via the API. If I disable assertion checking, things seem to work fine.
Submitted by Oskar van Rest on 19 August 2015 at 17:19java.lang.AssertionError: null at org.spoofax.terms.AbstractSimpleTerm.putAttachment(AbstractSimpleTerm.java:28) ~[org.spoofax.terms-1.4.0.jar:na] at org.spoofax.interpreter.library.index.IndexEntryFactory.create(IndexEntryFactory.java:43) ~[org.spoofax.interpreter.library.index-1.4.0.jar:na] at org.spoofax.interpreter.library.index.IndexCollector.add(IndexCollector.java:51) ~[org.spoofax.interpreter.library.index-1.4.0.jar:na] at org.spoofax.interpreter.library.index.Index.collect(Index.java:49) ~[org.spoofax.interpreter.library.index-1.4.0.jar:na] at org.spoofax.interpreter.library.index.primitives.LANG_index_collect_boolean.call(LANG_index_collect_boolean.java:21) ~[org.spoofax.interpreter.library.index-1.4.0.jar:na] at org.spoofax.interpreter.stratego.PrimT.eval(PrimT.java:63) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.spoofax.interpreter.stratego.Strategy.evaluate(Strategy.java:76) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.spoofax.interpreter.stratego.SDefT.evaluate(SDefT.java:213) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.strategoxt.lang.InteropStrategy.invokeDynamic(InteropStrategy.java:57) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.DynamicStrategy.invoke(DynamicStrategy.java:22) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.stratego_lib.preserve_annos_1_0.invoke(preserve_annos_1_0.java:29) ~[strategoxt-min-jar-1.4.0.jar:na] at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:40) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:192) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:183) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:245) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.eval(InteropSDefT.java:238) ~[org.strategoxt.strj-1.4.0.jar:na] at org.spoofax.interpreter.stratego.Strategy.evaluate(Strategy.java:76) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.spoofax.interpreter.stratego.SDefT.evaluate(SDefT.java:213) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.strategoxt.lang.InteropStrategy.invokeDynamic(InteropStrategy.java:57) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.DynamicStrategy.invoke(DynamicStrategy.java:22) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.stratego_lib.preserve_annos_1_0.invoke(preserve_annos_1_0.java:29) ~[strategoxt-min-jar-1.4.0.jar:na] at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:40) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:192) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:183) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:245) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.eval(InteropSDefT.java:238) ~[org.strategoxt.strj-1.4.0.jar:na] at org.spoofax.interpreter.stratego.Strategy.evaluate(Strategy.java:76) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.spoofax.interpreter.stratego.SDefT.evaluate(SDefT.java:213) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.strategoxt.lang.InteropStrategy.invokeDynamic(InteropStrategy.java:57) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.DynamicStrategy.invoke(DynamicStrategy.java:22) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.stratego_lib.preserve_annos_1_0.invoke(preserve_annos_1_0.java:29) ~[strategoxt-min-jar-1.4.0.jar:na] at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:40) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:192) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:183) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:245) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.eval(InteropSDefT.java:238) ~[org.strategoxt.strj-1.4.0.jar:na] at org.spoofax.interpreter.stratego.Strategy.evaluate(Strategy.java:76) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.spoofax.interpreter.stratego.SDefT.evaluate(SDefT.java:213) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.strategoxt.lang.InteropStrategy.invokeDynamic(InteropStrategy.java:57) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.DynamicStrategy.invoke(DynamicStrategy.java:22) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.stratego_lib.preserve_annos_1_0.invoke(preserve_annos_1_0.java:29) ~[strategoxt-min-jar-1.4.0.jar:na] at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:40) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:192) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:183) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:245) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.eval(InteropSDefT.java:238) ~[org.strategoxt.strj-1.4.0.jar:na] at org.spoofax.interpreter.stratego.Strategy.evaluate(Strategy.java:76) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.spoofax.interpreter.stratego.SDefT.evaluate(SDefT.java:213) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.strategoxt.lang.InteropStrategy.invokeDynamic(InteropStrategy.java:57) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.DynamicStrategy.invoke(DynamicStrategy.java:22) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.stratego_lib.preserve_annos_1_0.invoke(preserve_annos_1_0.java:29) ~[strategoxt-min-jar-1.4.0.jar:na] at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:40) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:192) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:183) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:245) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.eval(InteropSDefT.java:238) ~[org.strategoxt.strj-1.4.0.jar:na] at org.spoofax.interpreter.stratego.Strategy.evaluate(Strategy.java:76) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.spoofax.interpreter.stratego.SDefT.evaluate(SDefT.java:213) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.strategoxt.lang.InteropStrategy.invokeDynamic(InteropStrategy.java:57) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.DynamicStrategy.invoke(DynamicStrategy.java:22) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.SRTS_all.map(SRTS_all.java:60) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.SRTS_all.invoke(SRTS_all.java:21) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.compat.override.performance_tweaks.map_1_0_override.invoke(map_1_0_override.java:29) ~[strategoxt-min-jar-1.4.0.jar:na] at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:40) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:192) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:183) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:245) ~[org.strategoxt.strj-1.4.0.jar:na] at org.strategoxt.lang.InteropSDefT$StrategyBody.eval(InteropSDefT.java:238) ~[org.strategoxt.strj-1.4.0.jar:na] at org.spoofax.interpreter.stratego.Strategy.evaluate(Strategy.java:76) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.spoofax.interpreter.core.Interpreter.evaluate(Interpreter.java:109) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.spoofax.interpreter.core.Interpreter.invoke(Interpreter.java:82) ~[org.spoofax.interpreter.core-1.4.0.jar:na] at org.strategoxt.HybridInterpreter.invoke(HybridInterpreter.java:442) ~[org.strategoxt.strj-1.4.0.jar:na] at org.metaborg.spoofax.core.stratego.StrategoRuntimeUtils.invoke(StrategoRuntimeUtils.java:15) ~[org.metaborg.spoofax.core-1.4.0.jar:na] at org.metaborg.spoofax.core.analysis.stratego.StrategoAnalysisService.analyzeSingleAST(StrategoAnalysisService.java:181) ~[org.metaborg.spoofax.core-1.4.0.jar:na] at org.metaborg.spoofax.core.analysis.stratego.StrategoAnalysisService.analyze(StrategoAnalysisService.java:115) ~[org.metaborg.spoofax.core-1.4.0.jar:na]
Issue Log
On 21 August 2015 at 00:52 Gabriël Konat commented:
Related/duplicate: https://yellowgrass.org/issue/Spoofax/951
On 27 August 2015 at 23:44 Gabriël Konat commented:
https://github.com/metaborg/mb-rep/commit/165b8de51e59ca2ac200f8c9e35a0e5b02a9ee97 fixes the assertion. This will go into the 1.4.1 release which you can then depend on in your project.
On 27 August 2015 at 23:53 Gabriël Konat closed this issue.
Log in to post comments