This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Memory leak in Text Editor when perform open, search&replace and closed editor for multiple times | ||
---|---|---|---|
Product: | editor | Reporter: | theng |
Component: | Search | Assignee: | Milutin Kristofic <mkristofic> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Sample XML to reproduce the issue
NetBeans\8.2\var\log Screenshot on the Memory Usage Part 1 Screenshot on the Memory Usage Part 2 |
Created attachment 163146 [details]
NetBeans\8.2\var\log
Have uploaded the heap dump file to http://deadlock.netbeans.org/job/upload/ Build Number: #1411 File Name: BugId269230.zip Bud id: 269230 Created attachment 163147 [details]
Screenshot on the Memory Usage Part 1
Created attachment 163148 [details]
Screenshot on the Memory Usage Part 2
|
Created attachment 163145 [details] Sample XML to reproduce the issue Java Version : JDK 1.8 Update 111 Netbeans Version: Netbeans 8.2 Observed behaviour: 1) The Search and Replace action in text editor hang more than 15 seconds when perform "open, search&replace and closed" on a large XML file (3MB) after repeating the action multiple times (around 5 ~ 7 times). 2) Based on the heap dump, a lot of objects with big size are not clear even when the text editor is closed and GC is performed via VisualVM. Those objects are from or.netbeans.lib.lexer.TokenHierarchyOperation, org.netbeans.modules.editor.NbEditorDocument, org.netbeans.modules.editor.lib2.document.CharContent Expected behaviour: 1) Created objects should be cleared when the text editor is closed. 2) The process time for Search and Replace actions should <= 5seconds Attached also with the heap dump generated by VisualVM for further investigation. This heap dump was took after the "hang" happens and GC performed (via VisualVM). Based on the JVisual VM, the "hang" process usually happens when the OldGen and Eden used space is high, and the memory cannot be cleared even editor is closed and performed GC via VisualVM. Steps to reproduce 1) Create a new java project and put the XML file into the project 2) Open the 3MB XML file. (as attached) 3) Open the search and replace bar 4) Type "mapping" in the search bar and replace with "abc". The occurrences is around 24922 5) Perform replace all 6) Closed the XML file 7) Repeat step 2 to 6 more than 5 times(i.e. Open the XML file, retype the search keyword and click replace all)