Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Strage Memory leak in Semantic Highlighting
Strage Memory leak in Semantic Highlighting [message #854055] Mon, 23 April 2012 16:05 Go to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13488
Registered: July 2009
Senior Member
We get following strange memory error in out dsl

Has anybody seen this before an can give a hint what could cause this problem
and what todo to solve it?

Thanks
Christian

!ENTRY org.eclipse.ui 4 0 2012-04-23 17:59:45.187
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size: 134217744, Num elements: 33554432
	at org.eclipse.xtext.ui.editor.syntaxcoloring.LightweightPosition.merge(LightweightPosition.java:174)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor.mergePositions(MergingHighlightedPositionAcceptor.java:122)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor.mergePositions(MergingHighlightedPositionAcceptor.java:77)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor.provideHighlightingFor(MergingHighlightedPositionAcceptor.java:52)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.reconcilePositions(HighlightingReconciler.java:87)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.modelChanged(HighlightingReconciler.java:277)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler$1.process(HighlightingReconciler.java:249)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler$1.process(HighlightingReconciler.java:1)
	at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:37)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.refresh(HighlightingReconciler.java:245)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.install(HighlightingReconciler.java:200)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingHelper.enable(HighlightingHelper.java:82)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingHelper.install(HighlightingHelper.java:71)
	at org.eclipse.xtext.ui.editor.XtextEditor.installHighlightingHelper(XtextEditor.java:491)
	at org.eclipse.xtext.ui.editor.XtextEditor.createPartControl(XtextEditor.java:455)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:66)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:474)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1199)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:494)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:480)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
	at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:64)
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:226)
	at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
	at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:810)
	at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:707)
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:666)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2942)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:252)
	at org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:50)
	at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221)
	at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:186)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:49)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:867)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
	at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:463)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1257)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3755)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:129)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:578)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1411)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Strage Memory leak in Semantic Highlighting [message #854088 is a reply to message #854055] Mon, 23 April 2012 16:46 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
Hi Christian,

this one never occured for me. Looks like you try to highlight the very
same region completely or partly again and again (probably with the same
style id). This may happen if you have two adjacent regions with some
overlapping on top. There were some recent (4 weeks ago) fixes in
MergingHighlightedPositionAcceptor. You may want to check those out:

http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=c4544291b464f212c982c375f3a2ae6e37820abe

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 23.04.12 18:05, schrieb Christian Dietrich:
> We get following strange memory error in out dsl
>
> Has anybody seen this before an can give a hint what could cause this
> problem
> and what todo to solve it?
>
> Thanks
> Christian
>
> !ENTRY org.eclipse.ui 4 0 2012-04-23 17:59:45.187
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size:
> 134217744, Num elements: 33554432
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.LightweightPosition.merge(LightweightPosition.java:174)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor.mergePositions(MergingHighlightedPositionAcceptor.java:122)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor.mergePositions(MergingHighlightedPositionAcceptor.java:77)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor.provideHighlightingFor(MergingHighlightedPositionAcceptor.java:52)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.reconcilePositions(HighlightingReconciler.java:87)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.modelChanged(HighlightingReconciler.java:277)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler$1.process(HighlightingReconciler.java:249)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler$1.process(HighlightingReconciler.java:1)
>
> at
> org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:37)
>
> at
> org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
>
> at
> org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.refresh(HighlightingReconciler.java:245)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.install(HighlightingReconciler.java:200)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingHelper.enable(HighlightingHelper.java:82)
>
> at
> org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingHelper.install(HighlightingHelper.java:71)
>
> at
> org.eclipse.xtext.ui.editor.XtextEditor.installHighlightingHelper(XtextEditor.java:491)
>
> at
> org.eclipse.xtext.ui.editor.XtextEditor.createPartControl(XtextEditor.java:455)
>
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
>
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:66)
>
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:474)
>
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
>
> at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1199)
> at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:494)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:480)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
> at
> org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:64)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:226)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
>
> at
> org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:810)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:707)
>
> at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:666)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2942)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
>
> at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
> at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
>
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
>
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:252)
>
> at
> org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:50)
>
> at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221)
> at
> org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:186)
>
> at
> org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:49)
>
> at
> org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:867)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
> at
> org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
>
> at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:463)
> at
> org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1257)
>
> at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
> at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
> at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3755)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:129)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:578)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1411)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Previous Topic:Providing context values for the Xbase interpreter
Next Topic:Hyperlinking
Goto Forum:
  


Current Time: Mon Jul 06 18:33:22 GMT 2020

Powered by FUDForum. Page generated in 0.02046 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top