Comments (14)
Appears to be an issue caused by deserialization. Perhaps for the record, the issue even occurred after the following steps:
- Close the SPT file
- Clean the project (without rebuild)
- Close Eclipse
- Delete
pieStore
- Open Eclipse
- Build the project
- Open the SPT file
Which excludes deserialization after updating as a cause.
from spoofax-pie.
If deserialization fails, it defaults to an empty state and will rebuild everything, so that should not be an issue.
from spoofax-pie.
When I check out your project and open checks.spt
, I get a lot of errors like:
mb.constraint.common.ConstraintAnalyzerExceptions$StrategoInvokeFail: Constraint analyzer failed unexpectedly due to failure in Stratego execution
Caused by: mb.stratego.common.StrategoExceptions$ExceptionalFail: Invoking Stratego strategy 'editor-analyze' failed exceptionally
Stratego stack trace:
report_failure_1_0
report_failure_0_2
with_1_1
origin_track_forced_1_0
explicate_injections_chocopy_FuncDef_0_0
with_1_1
origin_track_forced_1_0
explicate_injections_chocopy_TopLevelDef_0_0
map_1_0
with_1_1
origin_track_forced_1_0
explicate_injections_chocopy_Program_0_0
pre_analyze_0_0
map_1_0
with_1_1
stx__editor_analyze_2_2
stx_editor_analyze_2_2
editor_analyze_0_0
editor_analyze_0_0
Stratego input term:
AnalyzeSingle(
[ ( "spt##/chocopy/test/checks.spt!!64"
, Added(
Body(
[ VarDef(ConcreteVarDef(TypedVar("a", IdType("int")), Int("2")))
, FuncDef(
ConcreteFuncDef(
"func_no_args"
, []
, ()
, FuncBody(
[]
, [Return(Plus(Id("a"), Literal(Int("2"))))]
)
)
)
]
, [Assignment([TargetId("b")], IdBrackets("func_no_args", []))]
)
)
)
]
, ()
, BLOB_org.metaborg.util.task.ThreadCancel@20fc1551()
)
Caused by: org.spoofax.interpreter.core.InterpreterException: Exception during evaluation: Legal exit: return code 1
at org.spoofax.interpreter.core.Interpreter.evaluate(Interpreter.java:113)
at org.spoofax.interpreter.core.Interpreter.invoke(Interpreter.java:80)
at org.strategoxt.HybridInterpreter.invoke(HybridInterpreter.java:458)
at mb.stratego.common.StrategoRuntime.invokeOrNull(StrategoRuntime.java:169)
at mb.stratego.common.StrategoRuntime.invokeOrNull(StrategoRuntime.java:147)
at mb.stratego.common.StrategoRuntime.invoke(StrategoRuntime.java:56)
at mb.constraint.common.ConstraintAnalyzer.doAnalyze(ConstraintAnalyzer.java:383)
at mb.constraint.common.ConstraintAnalyzer.analyze(ConstraintAnalyzer.java:268)
at mb.constraint.common.ConstraintAnalyzer.analyze(ConstraintAnalyzer.java:256)
at mb.chocopy.task.ChocopyAnalyze.analyze(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2Fadapter%2Fmb%2Fchocopy%2Ftask%2FChocopyAnalyze.java:71)
at mb.constraint.pie.ConstraintAnalyzeTaskDef.lambda$exec$0(ConstraintAnalyzeTaskDef.java:75)
at mb.common.result.Result.lambda$mapCatchingOrRethrow$4(Result.java:324)
at mb.common.result.ResultUtil.tryCatchOrRethrow(ResultUtil.java:39)
at mb.common.result.Result.mapCatchingOrRethrow(Result.java:324)
at mb.constraint.pie.ConstraintAnalyzeTaskDef.exec(ConstraintAnalyzeTaskDef.java:73)
at mb.constraint.pie.ConstraintAnalyzeTaskDef.exec(ConstraintAnalyzeTaskDef.java:17)
at mb.pie.api.Task.exec(Task.java:56)
at mb.pie.runtime.exec.TaskExecutor.execInternal(TaskExecutor.java:128)
at mb.pie.runtime.exec.TaskExecutor.exec(TaskExecutor.java:85)
at mb.pie.runtime.exec.TopDownRunner.exec(TopDownRunner.java:192)
at mb.pie.runtime.exec.TopDownRunner.executeOrGetExisting(TopDownRunner.java:137)
at mb.pie.runtime.exec.TopDownRunner.require(TopDownRunner.java:80)
at mb.pie.runtime.exec.ExecContextImpl.require(ExecContextImpl.java:117)
at mb.pie.runtime.exec.ExecContextImpl.require(ExecContextImpl.java:97)
at mb.chocopy.task.ChocopyCheck.exec(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2Fadapter%2Fmb%2Fchocopy%2Ftask%2FChocopyCheck.java:77)
at mb.chocopy.task.ChocopyCheck.exec(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2Fadapter%2Fmb%2Fchocopy%2Ftask%2FChocopyCheck.java:20)
at mb.pie.api.Task.exec(Task.java:56)
at mb.pie.runtime.exec.TaskExecutor.execInternal(TaskExecutor.java:128)
at mb.pie.runtime.exec.TaskExecutor.exec(TaskExecutor.java:85)
at mb.pie.runtime.exec.TopDownRunner.exec(TopDownRunner.java:192)
at mb.pie.runtime.exec.TopDownRunner.executeOrGetExisting(TopDownRunner.java:137)
at mb.pie.runtime.exec.TopDownRunner.require(TopDownRunner.java:80)
at mb.pie.runtime.exec.TopDownRunner.requireInitial(TopDownRunner.java:59)
at mb.pie.runtime.MixedSessionImpl.lambda$requireWithoutObserving$2(MixedSessionImpl.java:110)
at mb.pie.runtime.SessionImpl.handleException(SessionImpl.java:215)
at mb.pie.runtime.MixedSessionImpl.requireWithoutObserving(MixedSessionImpl.java:110)
at mb.spt.expectation.CheckCountExpectation.evaluate(CheckCountExpectation.java:88)
at mb.spt.task.SptCheck.runTests(SptCheck.java:163)
at mb.spt.task.SptCheck.lambda$runTests$1(SptCheck.java:147)
at mb.common.result.Result.ifThrowingElse(Result.java:235)
at mb.spt.task.SptCheck.runTests(SptCheck.java:146)
at mb.spt.task.SptCheck.lambda$exec$0(SptCheck.java:111)
at mb.common.result.Result.ifThrowingElse(Result.java:235)
at mb.spt.task.SptCheck.exec(SptCheck.java:109)
at mb.spt.task.SptCheck.exec(SptCheck.java:41)
at mb.pie.api.Task.exec(Task.java:56)
at mb.pie.runtime.exec.TaskExecutor.execInternal(TaskExecutor.java:128)
at mb.pie.runtime.exec.TaskExecutor.exec(TaskExecutor.java:85)
at mb.pie.runtime.exec.BottomUpRunner.exec(BottomUpRunner.java:369)
at mb.pie.runtime.exec.BottomUpRunner.getData(BottomUpRunner.java:211)
at mb.pie.runtime.exec.BottomUpRunner.require(BottomUpRunner.java:185)
at mb.pie.runtime.exec.BottomUpRunner.requireInitial(BottomUpRunner.java:94)
at mb.pie.runtime.TopDownSessionImpl.lambda$require$0(TopDownSessionImpl.java:72)
at mb.pie.runtime.SessionImpl.handleException(SessionImpl.java:215)
at mb.pie.runtime.TopDownSessionImpl.require(TopDownSessionImpl.java:72)
at mb.pie.api.TopDownSession.getOutputOrRequireAndEnsureExplicitlyObserved(TopDownSession.java:60)
at mb.spoofax.eclipse.pie.PieRunner.getOrRequire(PieRunner.java:495)
at mb.spoofax.eclipse.pie.PieRunner.addOrUpdateEditor(PieRunner.java:152)
at mb.spoofax.eclipse.editor.EditorUpdateJob.update(EditorUpdateJob.java:97)
at mb.spoofax.eclipse.editor.EditorUpdateJob.run(EditorUpdateJob.java:74)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.spoofax.interpreter.core.InterpreterExit: Legal exit: return code 1
at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:196)
at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:183)
at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:245)
at org.spoofax.interpreter.core.Interpreter.evaluate(Interpreter.java:105)
... 60 more
Caused by: org.strategoxt.lang.StrategoExit: Legal exit: return code 1
at org.strategoxt.lang.Context.invokePrimitive(Context.java:221)
at org.strategoxt.lang.Context.invokePrimitive(Context.java:201)
at strategolib.trans.exit_0_0.invoke(exit_0_0.java:10)
at strategolib.trans.report_failure_0_2_lifted0.invoke(report_failure_0_2_lifted0.java:18)
at strategolib.trans.report_failure_1_0.invoke(report_failure_1_0.java:27)
at strategolib.trans.report_failure_0_2.invoke(report_failure_0_2.java:16)
at strategolib.trans.with_1_1.invoke(with_1_1.java:25)
at mb.chocopy.strategies.explicate_injections_chocopy_$Func$Def_0_0_lifted0.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fexplicate_injections_chocopy_%24Func%24Def_0_0_lifted0.java:45)
at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:90)
at org.strategoxt.lang.SRTS_all.invoke(SRTS_all.java:23)
at mb.chocopy.strategies.origin_track_forced_1_0.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Forigin_track_forced_1_0.java:14)
at mb.chocopy.strategies.explicate_injections_chocopy_$Func$Def_0_0.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fexplicate_injections_chocopy_%24Func%24Def_0_0.java:23)
at mb.chocopy.strategies.explicate_injections_chocopy_$Top$Level$Def_0_0_lifted3.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fexplicate_injections_chocopy_%24Top%24Level%24Def_0_0_lifted3.java:12)
at strategolib.trans.with_1_1.invoke(with_1_1.java:17)
at mb.chocopy.strategies.explicate_injections_chocopy_$Top$Level$Def_0_0_lifted2.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fexplicate_injections_chocopy_%24Top%24Level%24Def_0_0_lifted2.java:27)
at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:90)
at org.strategoxt.lang.SRTS_all.invoke(SRTS_all.java:23)
at mb.chocopy.strategies.origin_track_forced_1_0.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Forigin_track_forced_1_0.java:14)
at mb.chocopy.strategies.explicate_injections_chocopy_$Top$Level$Def_0_0.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fexplicate_injections_chocopy_%24Top%24Level%24Def_0_0.java:28)
at strategolib.trans.map_1_0_x0.invoke(map_1_0_x0.java:28)
at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:33)
at org.strategoxt.lang.gradual.Proxy.invokeDynamic(Proxy.java:42)
at org.strategoxt.lang.gradual.Proxy.invoke(Proxy.java:55)
at strategolib.trans.map_1_0.invoke(map_1_0.java:36)
at mb.chocopy.strategies.explicate_injections_chocopy_$Program_0_0_lifted1.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fexplicate_injections_chocopy_%24Program_0_0_lifted1.java:14)
at strategolib.trans.with_1_1.invoke(with_1_1.java:17)
at mb.chocopy.strategies.explicate_injections_chocopy_$Program_0_0_lifted0.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fexplicate_injections_chocopy_%24Program_0_0_lifted0.java:33)
at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:90)
at org.strategoxt.lang.SRTS_all.invoke(SRTS_all.java:23)
at mb.chocopy.strategies.origin_track_forced_1_0.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Forigin_track_forced_1_0.java:14)
at mb.chocopy.strategies.explicate_injections_chocopy_$Program_0_0.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fexplicate_injections_chocopy_%24Program_0_0.java:19)
at mb.chocopy.strategies.pre_analyze_0_0.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fpre_analyze_0_0.java:11)
at mb.chocopy.strategies.stx__editor_analyze_2_2_lifted5.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fstx__editor_analyze_2_2_lifted5.java:16)
at strategolib.trans.map_1_0.invoke(map_1_0.java:29)
at mb.chocopy.strategies.stx__editor_analyze_2_2_lifted1.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fstx__editor_analyze_2_2_lifted1.java:31)
at strategolib.trans.with_1_1.invoke(with_1_1.java:17)
at mb.chocopy.strategies.stx__editor_analyze_2_2.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fstx__editor_analyze_2_2.java:72)
at mb.chocopy.strategies.stx_editor_analyze_2_2.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Fstx_editor_analyze_2_2.java:11)
at mb.chocopy.strategies.editor_analyze_0_0.invoke(%2Fchocopy%2Fbuild%2Fgenerated%2Fsources%2FlanguageSpecification%2Fjava%2Fmb%2Fchocopy%2Fstrategies%2Feditor_analyze_0_0.java:20)
at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:33)
at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:192)
... 63 more
I traced this down to the SDF3 rule: ReturnType = <>
which is invalid (but does not give an error, which is a bug). That production should be given a constructor like ReturnType.NoReturnType = <>
.
I cannot reproduce the NullPointerException
though.
from spoofax-pie.
Thanks for checking out my project. I'll update the rule you refer to and I'll keep an eye on the editor updates to see if can give you more specifics about the exception.
from spoofax-pie.
There was another SDF3 rule with the same problem: ClassBody = <pass>
should be ClassBody.BodyPass = <pass>
from spoofax-pie.
I've fixed a bug in 0.15.1 that might cause these NullPointerException
s, can you try that out?
from spoofax-pie.
I run into NullPointerException
s with version 0.15.2 when I open correctness.spt
(link to my project on GitLab). It happens whenever I open, edit or save this file. Previously, I was using version 0.14.2. That version did not have this issue.
from spoofax-pie.
@ThijsRay damn, but I was at least able to trigger it with your project on my machine, and hopefully have a fix coming soon, thanks!
You can temporarily downgrade to an older version by uninstalling the Spoofax plugin (Help -> Install New Software... -> Click "what is already installed" -> click the plugin without a name and with id spoofax.lwb.eclipse.feature.feature.group -> press Uninstall...), and installing Spoofax again from the update site for that version, for example https://artifacts.metaborg.org/content/unzip/releases-unzipped/org/metaborg/spoofax.lwb.eclipse.repository/0.14.2/spoofax.lwb.eclipse.repository-0.14.2.zip-unzip/
for 0.14.2.
from spoofax-pie.
I've fixed another bug in 0.15.3 that causes these NullPointerException
s, can you try that out?
from spoofax-pie.
Thank you for the quick response! While it does seem to fix the NullPointerException
, the same file causes the syntax highlighting to break and causes the SPT Test Runner
to go into something that seems like an infinite loop. The offending tests in the same correctness.spt
file are
- test list assign homogeneous
- test list assign hetrogeneous assign
- test hetrogeneous list assign value
Removing these tests fixes this issue, but commenting them out does not seem to work for me.
from spoofax-pie.
@ThijsRay What do you mean by "commenting them out does not seem to work for me"? I noticed the infinite loop in those tests as well. That is caused by an infinite loop in analysis, possibly due to your Statix specification. Take a look at those tests and related constraints in your Statix specification to check if there is anything wrong. If you can't figure it out, ask for help on Mattermost, @AZWN can probably help you with this.
from spoofax-pie.
I just had a StackOverflow occur. I am on version 0.15.2. Here is the log file:
bak_0 copy.log
from spoofax-pie.
@Gohla Perhaps we should add -XX:MaxJavaStackTraceDepth=-1
to the JVM arguments, to see the bottom of these traces.
from spoofax-pie.
I'm closing this issue as the intermittent NullPointerException
problem seems to be solved in 0.15.3. Please comment only on this issue if you still get intermittent NullPointerException
s in 0.15.3 or higher. Otherwise, create a new issue.
from spoofax-pie.
Related Issues (20)
- IllegalStateException: The root project is not yet available for build HOT 1
- Support Gradle 7 HOT 1
- Invalid AST shape error when using strings for brackets HOT 1
- Having no SDF3 files in the main source directory results in compilation issues in generated files HOT 2
- Forgetting to specify `context-free start-symbols` in SDF3 leads to unclear parsing errors HOT 1
- Empty lines are considered "uncommented" for toggle-comment sakes HOT 1
- Old generated signatures persist even after source file is deleted/renamed HOT 1
- Task with same key is visited with different input when changing SDF3 source directory HOT 1
- SPT tests ignore start symbol HOT 1
- Literal character incorrectly parsed as layout
- BUG: parser returned null output even though parsing did not fail
- Eclipse dependencies confuse IntelliJ
- Source exports should be language specific
- Java Compilation does not show error messages for failed annotation processors. HOT 1
- Debug commands showing analyzed things fail on the command line
- Error messages from commands are not printed on the command line
- Spurious Hidden Dependency Error
- `ImmutableSeparatorRepr` not serializable
- Duplicate error when using Gradle 7.1+
- `ConcurrentModificationException` on editor update of dynamic language that is currently built
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spoofax-pie.