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 236700 - OutOfMemoryError: Java heap space
Summary: OutOfMemoryError: Java heap space
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: All All
: P1 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
: 249704 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-03 13:49 UTC by Exceptions Reporter
Modified: 2015-04-09 13:57 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 204344


Attachments
stacktrace (1.59 KB, text/plain)
2013-10-03 13:49 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2013-10-03 13:49:13 UTC
This bug was originally marked as duplicate of bug 225440, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.4 RC1 (Build 201309162201)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.0-b56, Java(TM) SE Runtime Environment, 1.7.0_40-b43
OS: Windows 7

User Comments:
medeag: commenting code

GUEST: <Please provide a description of the problem or the steps to reproduce>

GUEST: on close ide




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:0)
   at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:0)
   at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:0)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:0)
   at java.lang.StringBuilder.append(StringBuilder.java:0)
   at org.netbeans.modules.editor.hints.ParseErrorAnnotation.<init>(ParseErrorAnnotation.java:76)
Comment 1 Exceptions Reporter 2013-10-03 13:49:14 UTC
Created attachment 140760 [details]
stacktrace
Comment 2 Milutin Kristofic 2013-10-03 14:22:35 UTC
When you extract last heapdump with gzip -dc < heapdump-694731.hprof.gz > result.hprof

you can see that 
org.netbeans.modules.editor.hints.ParseErrorAnnotation#77

has some Annotations with 88mb String descriptions like :

Expected semicolon ; after "/*Debitore delete - precontrolli
                jQuery("#debitore_delete").click(function() {
                    var id = jQuery("#jqlist_debitori").jqGrid('getGridParam', 'selrow');
                    if (id) {
                        var ret = jQuery("#jqlist_debitori").jqGrid('getRowData', id);
                        Debitori_exe('DELETE', ret.anagrafiche_id, ret.qualifica);
                    } else {
                        alert("Seleziona un Debitore");
                    }
                });

                //Debitore update - precontrolli
                jQuery("#debitore_update").click(function() {
                    var id = jQuery("#jqlist_debitori").jqGrid('getGridParam', 'selrow');
                    if (id) {
                        var ret = jQuery("#jqlist_debitori").jqGrid('getRowData', id);
                        Debitori_exe('UPDATE', ret.anagrafiche_id, ret.qualifica);
                    } else {
                        alert("Seleziona un Debitore");
                    }
                });
                
                //SEZIONE DEBITORI - FINE

                // {{{ LEGALI DEI DEBITORI
                jQuery("#debitorilegali_delete").click(function()
Comment 3 Exceptions Reporter 2014-11-22 07:58:01 UTC
This bug already has 100 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=204344
Comment 4 Petr Pisl 2015-03-24 14:32:46 UTC
I have went through more then 20 head dumps and all was cased by very big Error token in js file. 

The problem was that the js parser has better recovery then the coloring lexer. The hints are counted based on the ast. But the hints usually displays the text from the token which is on the error position. So if there were many hints in the long error token, then the text of error token was copied for every hint.

After the fix are not created some hints that has are position in the lexical error token.
Comment 5 Quality Engineering 2015-03-25 03:22:00 UTC
Integrated into 'main-silver', will be available in build *201503250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/55ca41587cc7
User: Petr Pisl <ppisl@netbeans.org>
Log: #236700 - OutOfMemoryError: Java heap space
Comment 6 Petr Pisl 2015-04-09 13:57:08 UTC
*** Bug 249704 has been marked as a duplicate of this bug. ***