Search code examples
antlrxtext

Antlr failed to create lookahead


I have a grammar that is not really super clean considering the notation therefore I have to turn on backtracking for it
(I know that this is not the best solution but as my grammar is being generated by a program I write and fixing these parts will take me a lot time for debugging but that's not the topic here).

However when I try to generate my grammar via the Mwe2 workflow it gives me this error message:

error(10):  internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1279): could not even do k=1 for decision 92; reason: timed out (>100000ms)

As I have read here this may be because Antlr just needs more time for compiling...
My question is if it would be sufficient to just increase the time Antlr can take to generate (and if yes how to do this) or if this may have other reasons such as an endless loop during creation or something similar...

Note: My grammar is almost 3000 lines long

Thanks in advance
Raven

EDIT:
When increasing the conversion time to 5 million ms the above error disappears but nevertheless I end up with a bunch of exceptions:

[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment.generate(XtextAntlrGeneratorFragment.java:48)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:173)
    ... 15 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:613)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)

[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment.generate(XtextAntlrUiGeneratorFragment.java:110)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:173)
    ... 15 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.util.HashMap.newNode(Unknown Source)
    at java.util.HashMap.putVal(Unknown Source)
    at java.util.HashMap.put(Unknown Source)
    at java.util.HashSet.add(Unknown Source)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:630)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)

java.lang.RuntimeException: Problems running workflow raven.GenerateSQF: 
[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment.generate(XtextAntlrGeneratorFragment.java:48)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:173)
    ... 15 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:613)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)

[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment.generate(XtextAntlrUiGeneratorFragment.java:110)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:173)
    ... 15 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.util.HashMap.newNode(Unknown Source)
    at java.util.HashMap.putVal(Unknown Source)
    at java.util.HashMap.put(Unknown Source)
    at java.util.HashSet.add(Unknown Source)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:630)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)

    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:104)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.RuntimeException: 
[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment.generate(XtextAntlrGeneratorFragment.java:48)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:173)
    ... 15 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:613)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)

[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment.generate(XtextAntlrUiGeneratorFragment.java:110)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)

Solution

  • If you want to increase the conversion timeout you need to use this option :

    fragment = parser.antlr.XtextAntlrUiGeneratorFragment auto-inject {
          antlrParam = "-Xconversiontimeout" antlrParam = "30000"
    }
    
    fragment = parser.antlr.XtextAntlrGeneratorFragment auto-inject {
           antlrParam = "-Xconversiontimeout" antlrParam = "30000"
    }