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 - OutOfMemoryError: Java heap space
Summary: OutOfMemoryError: Java heap space
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Inspection (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-22 07:50 UTC by Exceptions Reporter
Modified: 2015-03-12 14:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 211375


Attachments
stacktrace (1.13 KB, text/plain)
2014-08-22 07:50 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
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