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 246628

Summary: OutOfMemoryError: Java heap space
Product: web Reporter: Exceptions Reporter <exceptions_reporter>
Component: InspectionAssignee: Jan Stola <jstola>
Status: RESOLVED FIXED    
Severity: normal CC: jhavlin
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 211375
Attachments: stacktrace

Description Exceptions Reporter 2014-08-22 07:50:09 UTC
This issue was reported manually by jhavlin.
It already has 1 duplicates 


Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) Client VM, 24.60-b09, Java(TM) SE Runtime Environment, 1.7.0_60-b19
OS: Windows 7

User Comments:
GUEST: I just opened Netbeans




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.lang.Class.getDeclaredFields0(Class.java:0)
   at java.lang.Class.privateGetDeclaredFields(Class.java:0)
   at java.lang.Class.getField0(Class.java:0)
   at java.lang.Class.getField(Class.java:0)
   at com.sun.jna.Native.getStructureAlignment(Native.java:506)
   at com.sun.jna.Structure.setAlignType(Structure.java:237)
Comment 1 Exceptions Reporter 2014-08-22 07:50:11 UTC
Created attachment 148834 [details]
stacktrace
Comment 2 Jaroslav Havlin 2014-08-22 07:56:03 UTC
Object with the biggest retained size (161 MB) is an instance of class org.netbeans.modules.web.inspect.webkit.WebKitPageModel.

Reassigning to web/Inspection. Please evaluate.

Note that the heap size limit is only 512 MB (-Xmx512m). Maybe it is just too low.

Thank you.
Comment 3 Jaroslav Havlin 2014-08-22 08:03:41 UTC
Note: Class with the highest total retained size is o.n.m.web.webkit.debugging.api.dom.Node:
199 678 instances, 246 MB retained size.
Comment 4 Jan Stola 2015-03-12 14:45:11 UTC
The heap dump shows almost 200000 elements loaded by the inspected page. We cannot do much when the inspected page is that large. I have added a warning when the number of elements reaches 100000. This warning tells the user (s)he may run into OutOfMemoryError and suggests closing of the page/stopping of the page inspection.

Modified file: https://hg.netbeans.org/web-main/rev/6c82c8d42e2a