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 184530 - OutOfMemoryError: Java heap space
Summary: OutOfMemoryError: Java heap space
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-20 11:33 UTC by imomoi
Modified: 2010-04-23 04:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 141153


Attachments
stacktrace (2.52 KB, text/plain)
2010-04-20 11:34 UTC, imomoi
Details
IDE Log (501.11 KB, application/octet-stream)
2010-04-20 13:22 UTC, imomoi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description imomoi 2010-04-20 11:33:58 UTC
Build: NetBeans IDE 6.8 (Build 200912041610)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Windows XP

User Comments:
GUEST: jsp page coding

GUEST: Executing an SQL command in a table with a BLOB column.

GUEST: The computer was just sitting

GUEST: Attempting to Run a web service client after editing the WebService parameters - which caused the artificats to be regenerated.

GUEST: Solo consultaba la informacion de una tabla dentro de la base de datos de MySQL

rdblaha1: I had altered my table 'provision'.  To see the change I was running select * from 'provision' when I received the error.




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.ruby.FindersHelper$FinderMethod.getSignature(FindersHelper.java:297)
   at org.netbeans.modules.ruby.DatabasePropertiesIndexer.createDynamicFinders(DatabasePropertiesIndexer.java:270)
Comment 1 imomoi 2010-04-20 11:34:03 UTC
Created attachment 97704 [details]
stacktrace
Comment 2 Erno Mononen 2010-04-20 12:14:47 UTC
When this happens the next time, can you please take a heap dump (http://wiki.netbeans.org/FaqMemoryDump) and attach it here to the issue?
Comment 3 imomoi 2010-04-20 13:22:41 UTC
Created attachment 97720 [details]
IDE Log

OutOfMemoryError at the end of file

IllegalArgumentExceptin in the middle
Comment 4 Erno Mononen 2010-04-20 16:03:57 UTC
Thanks, though what would be really useful is a heap dump  (the log file contains just stack traces). Apparently your IDE should already automatically generate a heapdump to 

C:\Documents and Settings\vmolokov\.netbeans\6.8\var\log\heapdump.hprof

Can you please attach that file here? I'm assigning this back to ruby to investigate further whether there is an issue with rails dynamic methods generation, it may consume too much memory. Most of the reports here are not related to that though.
Comment 5 imomoi 2010-04-21 05:49:19 UTC
I had uploaded hepdump to http://molokov.info/sources/heapdump/2010-04-19.zip (35M zipped, unzipped around 500M).
Comment 6 Erno Mononen 2010-04-21 11:06:00 UTC
Thanks - unfortunately I'm not able to unzip the archive though, getting 'unsupported compression method 14' (tried with several zip tools available on linux and also downloading the file again). Which software did you use to create the zip?
Comment 7 imomoi 2010-04-21 13:15:34 UTC
zip file was in 7zip format

Reuploaded it to http://molokov.info/sources/heapdump/2010-04-19.bz2 in BZip2 format
Comment 8 Erno Mononen 2010-04-21 14:35:54 UTC
Thanks! I have now successfully opened the heap dump (as a side note, strange the previous zip didn't work, I tried also with 7z). Anyway, based on the heap dump there indeed seems to be an issue with Rails dynamic finders generation; will fix that for 6.9.

As for the other unrelated reports here, please file separate issues with heap dumps. I'm going to close this issue once I've fixed the aforementioned issue.
Comment 9 Erno Mononen 2010-04-22 11:53:22 UTC
Should be fixed now in ccd3f313e9bc.

Now dynamic finders are generated only for code completion and in addition they are now generated incrementally (one level at time). This should reduce memory consumption quite a lot in these cases when you have rails models with a lot of columns. Thanks once again for reporting and for the heap dump!
Comment 10 Quality Engineering 2010-04-23 04:32:40 UTC
Integrated into 'main-golden', will be available in build *201004230200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ccd3f313e9bc
User: Erno Mononen <emononen@netbeans.org>
Log: #184530 - OutOfMemoryError: Java heap space