Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Out of memory
[Acceleo] Out of memory [message #1700360] |
Thu, 02 July 2015 07:27 |
Wilbert Alberts Messages: 210 Registered: June 2010 |
Senior Member |
|
|
Hi,
I'm working on a project that uses Acceleo for generating C++ code.
Unfortunately I'm experiencing out of memory errors. As I expected some errors in my templates or queries I started to comment out parts of my templates.
Somewhere I got to the point that this version was working:
[template public generateDto(e : Entity, r: EntityRecipe, im: ImplementationModel)]
[comment e.generateDTOInterfaceHeader(r, im)/]
[comment e.generateDTOAdapterHeader(r, im)/]
[e.generateDTOAdapterImplementation(r, im)/]
[/template]
Removing the first comment lead to the OOM error. So I started pruning the generateDTOInterfaceHeader template itself. However, up to the point that it was completely empty, I stil ran into OOM errors. So even this didn't work:
[template public generateDto(e : Entity, r: EntityRecipe, im: ImplementationModel)]
[e.generateDTOInterfaceHeader(r, im)/]
[comment e.generateDTOAdapterHeader(r, im)/]
[e.generateDTOAdapterImplementation(r, im)/]
[/template]
[template private generateDTOInterfaceHeader(e : Entity, r: EntityRecipe, im: ImplementationModel)]
[/template]
I'm wondering how invocation of an empty template increases memory.
In order to give some additional information, I'm using the luna eclipse release with Acceleo: 3.5.1.201409021433.
The stack strace reporting the OOM:
!ENTRY com.asml.innovationteam.DCA.generator.ui 4 0 2015-07-02 09:26:29.218
!MESSAGE
!STACK 0
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:423)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:527)
at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:284)
at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:983)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:1018)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:993)
at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1194)
at com.asml.innovationteam.DCA.generator.ui.popupMenus.AcceleoGenerateGeneratorAction.run(AcceleoGenerateGeneratorAction.java:93)
at org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDelegate.java:75)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:243)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:480)
at java.lang.StringBuffer.append(StringBuffer.java:309)
at java.util.regex.Matcher.appendReplacement(Matcher.java:838)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.fitIndentationTo(AcceleoEvaluationVisitor.java:310)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.delegateFitIndentation(AcceleoEvaluationVisitor.java:1446)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluationVisitor.java:1015)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1881)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.java:530)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1858)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.java:530)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1858)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.java:937)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1842)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluationVisitor.java:988)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1881)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.java:937)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1842)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(QueryImpl.java:146)
at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:56)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvaluate(AcceleoEngine.java:365)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate(AcceleoEngine.java:142)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerateTemplate(AcceleoService.java:984)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate(AcceleoService.java:641)
Root exception:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:480)
at java.lang.StringBuffer.append(StringBuffer.java:309)
at java.util.regex.Matcher.appendReplacement(Matcher.java:838)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.fitIndentationTo(AcceleoEvaluationVisitor.java:310)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.delegateFitIndentation(AcceleoEvaluationVisitor.java:1446)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluationVisitor.java:1015)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1881)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.java:530)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1858)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.java:530)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1858)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.java:937)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1842)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluationVisitor.java:988)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1881)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.java:937)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1842)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
at org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(QueryImpl.java:146)
at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:56)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvaluate(AcceleoEngine.java:365)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate(AcceleoEngine.java:142)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerateTemplate(AcceleoService.java:984)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate(AcceleoService.java:641)
Any ideas?
Greetings,
Wilbert.
|
|
|
Re: [Acceleo] Out of memory [message #1700365 is a reply to message #1700360] |
Thu, 02 July 2015 07:51 |
Eclipse User |
|
|
|
Hi,
Did you try increasing the maximum heap size in Eclipse.ini?, i.e.,
-Xmx2048m
Best,
Víctor
El 02/07/2015 a las 9:27, Wilbert Alberts escribió:
> Hi,
>
> I'm working on a project that uses Acceleo for generating C++ code.
>
> Unfortunately I'm experiencing out of memory errors. As I expected some
> errors in my templates or queries I started to comment out parts of my
> templates.
>
> Somewhere I got to the point that this version was working:
>
> [template public generateDto(e : Entity, r: EntityRecipe, im:
> ImplementationModel)]
> [comment e.generateDTOInterfaceHeader(r, im)/]
> [comment e.generateDTOAdapterHeader(r, im)/]
> [e.generateDTOAdapterImplementation(r, im)/]
> [/template]
>
> Removing the first comment lead to the OOM error. So I started pruning
> the generateDTOInterfaceHeader template itself. However, up to the point
> that it was completely empty, I stil ran into OOM errors. So even this
> didn't work:
>
> [template public generateDto(e : Entity, r: EntityRecipe, im:
> ImplementationModel)]
> [e.generateDTOInterfaceHeader(r, im)/]
> [comment e.generateDTOAdapterHeader(r, im)/]
> [e.generateDTOAdapterImplementation(r, im)/]
> [/template]
>
> [template private generateDTOInterfaceHeader(e : Entity, r:
> EntityRecipe, im: ImplementationModel)]
> [/template]
>
> I'm wondering how invocation of an empty template increases memory.
> In order to give some additional information, I'm using the luna eclipse
> release with Acceleo: 3.5.1.201409021433.
> The stack strace reporting the OOM:
> !ENTRY com.asml.innovationteam.DCA.generator.ui 4 0 2015-07-02 09:26:29.218
> !MESSAGE !STACK 0
> java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:423)
> at
> org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:527)
>
> at
> org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:284)
>
> at
> org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:983)
>
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at
> org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:1018)
>
> at
> org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:993)
>
> at
> org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1194)
>
> at
> com.asml.innovationteam.DCA.generator.ui.popupMenus.AcceleoGenerateGeneratorAction.run(AcceleoGenerateGeneratorAction.java:93)
>
> at
> org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDelegate.java:75)
> at
> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:243)
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
>
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
>
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
> Caused by: java.lang.OutOfMemoryError: Java heap space
> at java.util.Arrays.copyOf(Arrays.java:2367)
> at
> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
>
> at
> java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
>
> at
> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:480)
> at java.lang.StringBuffer.append(StringBuffer.java:309)
> at java.util.regex.Matcher.appendReplacement(Matcher.java:838)
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.fitIndentationTo(AcceleoEvaluationVisitor.java:310)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.delegateFitIndentation(AcceleoEvaluationVisitor.java:1446)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluationVisitor.java:1015)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1881)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.java:530)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1858)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.java:530)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1858)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.java:937)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1842)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluationVisitor.java:988)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1881)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.java:937)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1842)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(QueryImpl.java:146)
> at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:56)
> at
> org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvaluate(AcceleoEngine.java:365)
>
> at
> org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate(AcceleoEngine.java:142)
>
> at
> org.eclipse.acceleo.engine.service.AcceleoService.doGenerateTemplate(AcceleoService.java:984)
>
> at
> org.eclipse.acceleo.engine.service.AcceleoService.doGenerate(AcceleoService.java:641)
>
> Root exception:
> java.lang.OutOfMemoryError: Java heap space
> at java.util.Arrays.copyOf(Arrays.java:2367)
> at
> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
>
> at
> java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
>
> at
> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:480)
> at java.lang.StringBuffer.append(StringBuffer.java:309)
> at java.util.regex.Matcher.appendReplacement(Matcher.java:838)
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.fitIndentationTo(AcceleoEvaluationVisitor.java:310)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.delegateFitIndentation(AcceleoEvaluationVisitor.java:1446)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluationVisitor.java:1015)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1881)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.java:530)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1858)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.java:530)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1858)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.java:937)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1842)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluationVisitor.java:988)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1881)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.java:937)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1842)
>
> at
> org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:1065)
>
> at
> org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(QueryImpl.java:146)
> at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:56)
> at
> org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvaluate(AcceleoEngine.java:365)
>
> at
> org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate(AcceleoEngine.java:142)
>
> at
> org.eclipse.acceleo.engine.service.AcceleoService.doGenerateTemplate(AcceleoService.java:984)
>
> at
> org.eclipse.acceleo.engine.service.AcceleoService.doGenerate(AcceleoService.java:641)
>
>
>
> Any ideas?
>
> Greetings,
> Wilbert.
>
|
|
| | | |
Re: [Acceleo] Out of memory [message #1700401 is a reply to message #1700380] |
Thu, 02 July 2015 11:55 |
Wilbert Alberts Messages: 210 Registered: June 2010 |
Senior Member |
|
|
Hi,
I put a breakpoint on the OutOfMemory exception and ran the generator again. Then I found out that it was the result of the template invocation that got that big. Please take a look at the following snippet:
[for (aRecipe : EntityRecipe | anImpModel.recipe->filter(EntityRecipe))]
[for (anEntity : Entity | aRecipe.entity)]
Dit voorkomt een bug.
[anEntity.generateRepo(anImpModel, aRecipe)/]
[anEntity.generateDto(aRecipe, anImpModel)/]
[anEntity.generateEntityDTOFactory(aRecipe, anImpModel)/]
[/for]
[/for]
The exception triggered during the execution of generateRepo. Note that up to this moment (in the generator execution) no file is open. (So the [file] statement is found at a deeper level. For some reason, the result of the generateRepo invocation turned out to consist of only spaces, tabs and newlines. At the end of a template invocation, Acceleo tries to apply the indentation. During this process, a very large string is produced. It is based on some regular expression matching.
By adding 'Dit voorkomt een bug', the regular expression matching seems to work better, or seems not to create such a large string. Anyhow, the bug gets prevented/worked around.
Obeo: do I need to file a bug report for this one?
Greetings,
Wilbert.
|
|
|
Goto Forum:
Current Time: Mon Oct 07 18:22:23 GMT 2024
Powered by FUDForum. Page generated in 0.04610 seconds
|