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.

Bug 235411

Summary: CloneableEditorSupport: OutOfMemoryError: Java heap space
Product: platform Reporter: ozziej
Component: TextAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 203513
Attachments: stacktrace

Description ozziej 2013-09-02 12:52:49 UTC
Build: NetBeans IDE 7.4 Beta (Build 201307092200)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b12
OS: Mac OS X

User Comments:
ozziej: attempted to do a global find / replace on a project




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOfRange(Arrays.java:2694)
   at java.lang.String.<init>(String.java:203)
   at java.lang.StringBuilder.toString(StringBuilder.java:405)
   at java.lang.Throwable.toString(Throwable.java:480)
   at org.netbeans.core.startup.logging.NbFormatter.doPrintStackTrace(NbFormatter.java:233)
   at org.netbeans.core.startup.logging.NbFormatter.printStackTrace(NbFormatter.java:209)
Comment 1 ozziej 2013-09-02 12:52:50 UTC
Created attachment 139578 [details]
stacktrace
Comment 2 Jaroslav Tulach 2013-11-19 11:45:21 UTC
The thread that thrown the exception is EDT and was loading a document. Other threads include "Pending refresh" daemon BLOCKED at org.openide.text.CloneableEditorSupport.getDocument or  
"ViewHierarchy-Region-Rebuilding" daemon WAITING	at javax.swing.text.AbstractDocument.readLock(AbstractDocument.java:1387) or  
"Diffsidebar long tasks" daemon WAITING at org.netbeans.modules.versioning.ui.diff.DiffSidebar.getDocumentReader(DiffSidebar.java:1210)

- e.g. there seems to be nothing else running on than loading of a document. The only thread not related to base editor infrastructure seems to be blocked:  
"Code Model Parser 0" daemon WAITING at org.netbeans.modules.cnd.modelimpl.csm.core.ParserQueue.waitReady(ParserQueue.java:530)

heap dump shows that 

32% of memory is occupied by float[] 

plus there is unusually high number of java.awt.geom.AffineTransform - 31MB and 
org.netbeans.modules.editor.lib2.highlighting.HighlightItem - 10MB. 

I believe this out of memory error has to be related to editor (probably painting).