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 161310 - [67cat] OutOfMemoryError: Java heap space
Summary: [67cat] OutOfMemoryError: Java heap space
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: YAML (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: esmithbss
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 21:44 UTC by esmithbss
Modified: 2009-05-06 09:03 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 148362


Attachments
stacktrace (2.60 KB, text/plain)
2009-03-26 21:44 UTC, esmithbss
Details
stacktrace (2.60 KB, text/plain)
2009-03-29 20:03 UTC, esmithbss
Details
stacktrace (2.71 KB, text/plain)
2009-04-02 02:54 UTC, esmithbss
Details
Log File (51.91 KB, text/plain)
2009-04-12 06:18 UTC, esmithbss
Details
Log File (26.39 KB, text/plain)
2009-04-24 05:08 UTC, esmithbss
Details
Profile Output. (43.12 KB, application/octet-stream)
2009-04-29 03:43 UTC, esmithbss
Details
Log File (69.40 KB, text/plain)
2009-04-29 03:44 UTC, esmithbss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2009-03-26 21:44:05 UTC
Build: NetBeans IDE Dev (Build 200903250219)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Linux, 2.6.27-14-generic, i386

User Comments:
esmithbss: Default Installation of 200903250219.

Using Ruby on Rails project (4 projects open).

Launched Rails Console for one project. (no debugger processes or running processes launched).

Generated this exception.



Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2882)
        at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
        at java.lang.StringBuilder.append(StringBuilder.java:119)
        at org.netbeans.modules.languages.yaml.YamlParser.parse(YamlParser.java:254)
        at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:194)
Comment 1 esmithbss 2009-03-26 21:44:12 UTC
Created attachment 78945 [details]
stacktrace
Comment 2 esmithbss 2009-03-29 20:02:53 UTC
Build: NetBeans IDE Dev (Build 200903250219)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Linux, 2.6.27-14-generic, i386

User Comments: 
Loading a legacy Ruby in Rails application into the IDE along with 2 additonal RoR projects (total of 3 open projects).  Error occurred during "Scanning Projects" processing.

Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2882)
        at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
        at java.lang.StringBuilder.append(StringBuilder.java:119)
        at org.netbeans.modules.languages.yaml.YamlParser.parse(YamlParser.java:254)
        at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:194)
Comment 3 esmithbss 2009-03-29 20:03:11 UTC
Created attachment 79018 [details]
stacktrace
Comment 4 esmithbss 2009-04-02 02:54:38 UTC
Build: NetBeans IDE Dev (Build 200903311400)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Linux, 2.6.27-14-generic, i386

User Comments: 
Initial boot of clean system.  Loaded 2 Ruby on Rails projects which caused activation of some components.

Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2882)
        at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
        at java.lang.StringBuilder.append(StringBuilder.java:119)
        at org.netbeans.modules.languages.yaml.YamlParser.parse(YamlParser.java:254)
        at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:194)
Comment 5 esmithbss 2009-04-02 02:54:42 UTC
Created attachment 79254 [details]
stacktrace
Comment 6 esmithbss 2009-04-12 06:17:26 UTC
This time I had one project open and tried to open a second Ruby On Rails project.
Comment 7 esmithbss 2009-04-12 06:18:30 UTC
Created attachment 79942 [details]
Log File
Comment 8 esmithbss 2009-04-13 04:27:04 UTC
NetBeans now generates this exception whenever opening a second Ruby on Rails project.  It appears to be a problem
within the scanning projects process.
Comment 9 Petr Jiricka 2009-04-22 14:49:02 UTC
Hi, can you please attach the Rails project that causes this? It looks like the YAML parser is the root cause, and I
understand you may not need to upload your Ruby sources, so could you attach a minimal project with just YAML files
which reproduces the problem?

Also, does this happen with the latest build?
Comment 10 esmithbss 2009-04-22 17:47:45 UTC
The memory usage is improving, but after loading 2 of the original 3 projects, I'm peaking at around 190MB in the memory
window.

So far, I cannot reproduce in latest version so I'm marking this WORKSFORME.  If I can reproduce, I'll reopen.

Comment 11 esmithbss 2009-04-24 05:03:31 UTC
I'm reopening this.

I just reproduced the exception in 200904231401.

Exception Reports #194601 #194602

First opening of new install to clean folder.

Accepted import of 6.5 settings

Exception thrown while scanning projects.

Comment 12 esmithbss 2009-04-24 05:08:55 UTC
Created attachment 80812 [details]
Log File
Comment 13 Erno Mononen 2009-04-24 07:02:47 UTC
Would it be possible for you to attach the yaml files you have in the opened projects? Are there some really large yaml 
files or anything like that? 
Comment 14 Erno Mononen 2009-04-24 08:05:17 UTC
As discussed via email with Eric, there is a large test fixture (7 Mb) that is very likely causing the issue. The 
parser can't handle such files and in fact there is already a check for size, but that happens only after constructing 
the source from the tokens and the OOME gets thrown already at that phase. I'll look into this.
Comment 15 Erno Mononen 2009-04-24 10:04:23 UTC
Should be fixed now, 5cbb6dd8138a in ruby-main.
Comment 16 Quality Engineering 2009-04-24 18:57:50 UTC
Integrated into 'main-golden', will be available in build *200904241401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5cbb6dd8138a
User: Erno Mononen <emononen@netbeans.org>
Log: #161310: OutOfMemoryError: Java heap space
Comment 17 esmithbss 2009-04-29 03:40:57 UTC
It appears that this may not have been fixed or we have a regression.  Attaching new messages.log and profile trace.  
Comment 18 esmithbss 2009-04-29 03:43:31 UTC
Created attachment 81153 [details]
Profile Output.
Comment 19 esmithbss 2009-04-29 03:44:21 UTC
Created attachment 81154 [details]
Log File
Comment 20 Erno Mononen 2009-04-29 07:27:52 UTC
Seems that you're using beta, right? The fix didn't make it to the beta clone, it is only in trunk. Could you please 
try whether you still encounter this in trunk?
Comment 21 Jiri Kovalsky 2009-05-05 13:07:01 UTC
Eric, any update on this? Thanks!
Comment 22 esmithbss 2009-05-06 06:34:17 UTC
I keep running into the OutOfMemory Java Heap Space issues, but apparently, since there are multiple issues which I am
encountering.  I had thought they were all tied to one.

I just downloaded latest nightly.  I'll retest and see what's happening.
Comment 23 esmithbss 2009-05-06 09:03:04 UTC
It appears that changes to YAML file reading have fixed this issue.