Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343081

Summary: Memory leak in Maven Pom Editor
Product: z_Archived Reporter: Snjezana Peco <snjezana.peco>
Component: m2eAssignee: Milos Kleint <mkleint>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: igor, mkleint
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
0001-M2e-Performance-Pom-Editor-leak none

Description Snjezana Peco CLA 2011-04-17 18:29:48 EDT
Build Identifier: 

The Maven Pom Editor has a huge memory leak. Just opening/closing
jboss-as-parent/pom.xml causes the JVM heap to increase in size by 2-10MB
which can cause Eclipse to crash (OOM).

The leak happens when clicking the Effective POM tab. M2eclipse calls
effectivePomSourcePage.setInput(editorInput) every time when clicking this tab.
Calling StructuredTextEditor.setInput the second time adds a selection change
listener that isn't released which retains the complete MavenPomEditor
structure in the heap. The patch changes the contents of the Effective POM page
using the IDocument interface.

Patch: 0001-M2e-Performance-Pom-Editor-Leak.patch

See bug #342903


Reproducible: Always

Steps to Reproduce:
1. open some pom.xml file using the Maven Pom Editor
2. click the Effective POM tab
If you repeat these steps, you will see that the JVM heap size is continuously increasing.
Comment 1 Snjezana Peco CLA 2011-04-17 18:30:22 EDT
Created attachment 193452 [details]
0001-M2e-Performance-Pom-Editor-leak
Comment 3 Denis Roy CLA 2021-04-19 13:23:24 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/