As documented in WebDSL/226, StrategoAnalysisQueue can cause a null pointer exception.

More details:


Hey,

heeft te maken met een file waarvoor het project niet kan worden gevonden.
In dit geval is het moeilijk te achterhalen waarom dat is…

Merk wel dat de WebDSL plugin slecht functioneerd op Windows. Een van de problemen lijkt te komen doordat StrategoObserver.tryGetProjectPath een OS-specifiek pad terug geeft; in EditorIOAgent.getProject wordt geprobeerd van het project pad een URI te maken. Dat lukt niet als er backslashes in het pad zitten. Misschien altijd padnamen met / gebruiken, dus toOSString vervangen door toString in tryGetProjectPath?

gr
Nathan

— Original message —

Hoi,

WebDSL #fail bij tutorial:

  • Lennart

@ 04:16 PM 10/17/2010, Xabriel J Collazo-Mojica wrote:
Subject: Stack trace from WebDSL on a Mac 64-bit
From: Xabriel J Collazo-Mojicaxcoll001@fiu.edu
To: lennart@lclnet.nl

Stack trace from WebDSL on a Mac 64-bit:

Error: Internal error evaluating strategy editor-analyze

org.spoofax.interpreter.core.InterpreterException:
org.strategoxt.lang.StrategoException: Exception in execution of
primitive ‘SSL_EXT_queue_analysis’
at org.strategoxt.HybridInterpreter.invoke(HybridInterpreter.java:367)
at org.strategoxt.imp.runtime.Environment$1.invoke(Environment.java:193)
at org.strategoxt.imp.runtime.services.StrategoObserver.invoke(StrategoObserver.java:564)
at org.strategoxt.imp.runtime.services.StrategoObserver.invokeSilent(StrategoObserver.java:605)
at org.strategoxt.imp.runtime.services.StrategoObserver.update(StrategoObserver.java:292)
at org.strategoxt.imp.runtime.services.StrategoObserverUpdateJob.analyze(StrategoObserverUpdateJob.java:30)
at org.strategoxt.imp.runtime.services.StrategoAnalysisQueue$UpdateJob.run(StrategoAnalysisQueue.java:88)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.strategoxt.lang.StrategoException: Exception in
execution of primitive ‘SSL_EXT_queue_analysis’
at org.strategoxt.lang.Context.invokePrimitive(Context.java:234)
at org.strategoxt.lang.Context.invokePrimitive(Context.java:210)
at trans.queue_analysis_0_0.invoke(queue_analysis_0_0.java:42)
at trans.lifted189.invoke(lifted189.java:44)
at org.strategoxt.stratego_lib.try_1_0.invoke(try_1_0.java:28)
at trans.read_import_0_1.invoke(read_import_0_1.java:52)
at trans.lifted183.invoke(lifted183.java:27)
at trans.open_import_sig_cached_2_0.invoke(open_import_sig_cached_2_0.java:78)
at trans.lifted233.invoke(lifted233.java:145)
at org.strategoxt.stratego_lib.dr_scope_1_1.invoke(dr_scope_1_1.java:58)
at trans.open_import_sig_4_0.invoke(open_import_sig_4_0.java:86)
at trans.editor_parse_webdsl_module_0_0.invoke(editor_parse_webdsl_module_0_0.java:64)
at trans.lifted99.invoke(lifted99.java:39)
at org.strategoxt.stratego_lib.dr_scope_1_1.invoke(dr_scope_1_1.java:58)
at trans.get_imports_0_0.invoke(get_imports_0_0.java:52)
at org.strategoxt.lang.SRTS_EXT_filter_1_0.filterMaintainAnnos(SRTS_EXT_filter_1_0.java:65)
at org.strategoxt.lang.SRTS_EXT_filter_1_0.invoke(SRTS_EXT_filter_1_0.java:37)
at org.strategoxt.lang.compat.override.performance_tweaks.filter_1_0_override.invoke(filter_1_0_override.java:21)
at trans.lifted77.invoke(lifted77.java:38)
at org.strategoxt.stratego_lib.dr_scope_1_1.invoke(dr_scope_1_1.java:58)
at trans.lifted76.invoke(lifted76.java:52)
at org.webdsl.webdsl_generator.lifted636.invoke(lifted636.java:48)
at org.strategoxt.stratego_lib.dr_scope_1_1.invoke(dr_scope_1_1.java:58)
at org.webdsl.webdsl_generator.in_typechecking_phase_1_0.invoke(in_typechecking_phase_1_0.java:36)
at trans.editor_analyze_work_0_0.invoke(editor_analyze_work_0_0.java:59)
at trans.editor_analyze_0_0.invoke(editor_analyze_0_0.java:59)
at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:30)
at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:194)
at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:185)
at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:247)
at org.spoofax.interpreter.core.Interpreter.invoke(Interpreter.java:72)
at org.strategoxt.HybridInterpreter.invoke(HybridInterpreter.java:359)
… 7 more
Caused by: java.lang.NullPointerException
at org.strategoxt.imp.runtime.services.StrategoAnalysisQueue.queueAnalysis(StrategoAnalysisQueue.java:220)
at org.strategoxt.imp.runtime.stratego.QueueAnalysisPrimitive.queue(QueueAnalysisPrimitive.java:80)
at org.strategoxt.imp.runtime.stratego.QueueAnalysisPrimitive.call(QueueAnalysisPrimitive.java:40)
at org.strategoxt.lang.Context.invokePrimitive(Context.java:221)
… 38 more

Submitted by Lennart Kats on 25 October 2010 at 10:36

On 25 October 2010 at 12:54 Lennart Kats closed this issue.

On 25 October 2010 at 12:54 Lennart Kats commented:

Looking at the problematic code I think Nathan’s analysis is accurate: the exception occurs on the line

IPath absolutePath = project.getLocation().append(path);

where project cannot be null, but apparently refers to some location that does not exist in the workspace. This causes getLocation() to return null.

I changed EditorIOAgent.getProject() in revision 21299, which should address this problem.


On 8 November 2010 at 18:09 Nathan Bruning commented:

But… the tryGetProjectPath method still returns an OS-specific path. This still causes trouble for the WebDSL editor.

Would be nice not to deal with platform specific paths in the editor rules!


On 8 November 2010 at 18:09 Nathan Bruning reopened this issue.

On 9 November 2010 at 10:35 Lennart Kats commented:

Hm, well, that may be a good idea. If you want to change it to “platform independent” paths go right ahead.


On 9 November 2010 at 17:10 Lennart Kats commented:

Should be fixed in r21343: Nathan implemented /-separated paths for all platforms.


On 9 November 2010 at 17:10 Lennart Kats closed this issue.

Log in to post comments