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: | OutOfMemoryError: Java heap space | ||
---|---|---|---|
Product: | javascript | Reporter: | carlneto |
Component: | Debugger | Assignee: | Jan Stola <jstola> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mentlicher |
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 205059 |
Attachments: | stacktrace |
Description
carlneto
2015-07-02 15:19:35 UTC
Created attachment 154467 [details]
stacktrace
The message that debugger received just before OOME, has 82 MB. The full JSON object received by debugger has 500 MB! It contains a nodes array, which has 240000 elements. It came as "DOM.setChildNodes" notification. This is a bad design of the debugging protocol, that it can send such insane amount of data. org.netbeans.modules.web.webkit.debugging.api.dom.Node does not clean all properties from the underlying JSON. It retains "nodes", which is an array of other JSON objects, it retains "params", "nodeValue", etc. This is why Node has retains size close to the retain size of JSONObject. But the core of the problem seems to be 220 MB retain size of WebKitPageModel. Mistakenly moved instead of issue #254959. Please ignore the previous comment. The heapdumps 791379 and 791038 show more than 100000 elements in the inspected page. Some time ago I added a warning for the user if this happens: https://hg.netbeans.org/web-main/rev/6c82c8d42e2a The heapdump 784142 shows the problem mentioned by Martin, i.e., huge message (82M) describing 240000 sub-nodes comes from Chrome. I have added a warning when we are about to request sub-node information for an element having more than 20000 sub-nodes: https://hg.netbeans.org/web-main/rev/7b0700c9e7fa The warnings allow the user to stop page inspection and inform him/her that (s)he may run into OutOfMemoryError if (s)he continues with the inspection/debugging. |