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 160370

Summary: OutOfMemoryError: Java heap space
Product: ruby Reporter: theknack <theknack>
Component: CodeAssignee: Erno Mononen <emononen>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=146980
Issue Type: DEFECT Exception Reporter: 146980
Attachments: stacktrace

Description theknack 2009-03-16 15:48:43 UTC
Build: NetBeans IDE Dev (Build 200903121546)
VM: OpenJDK Client VM, 1.6.0_0-b12, IcedTea6 1.3.1 (6b12-0ubuntu6.1) Runtime Environment, 1.6.0_0-b12
OS: Linux, 2.6.27-11-generic, i386

User Comments:
GUEST: When I'm editing a ruby file, the IDE hangs during a long time (1 minute or so) and then gives an OutOfMemoryError. The error happened when typing a period after self, (ie: self. ). Maybe is related to Code Complete.

I've had this error several times since build 200903081401. Version 200902270313 works fine.



Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2894)
        at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:117)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:407)
        at java.lang.StringBuilder.append(StringBuilder.java:136)
        at org.netbeans.modules.ruby.FindersHelper.addCombinations(FindersHelper.java:93)
        at org.netbeans.modules.ruby.FindersHelper.addCombinations(FindersHelper.java:97)
Comment 1 theknack 2009-03-16 15:48:48 UTC
Created attachment 78236 [details]
stacktrace
Comment 2 Erno Mononen 2009-03-16 16:23:30 UTC
Thanks for the report, I'll fix this ASAP. This is a performance problem in the new dynamic finded method completer. 
Can you tell me what's maximum amount of columns you have for a table in your app?
Comment 3 theknack 2009-03-17 10:23:53 UTC
I've reproduced the issue. It happens in a Rails model. When I type "self." and I stop typing, a tooltip with "Please
wait..." appears, the IDE hangs for a minute and then raises an OutOfMemory error.

The model has 11 columns in the DB table, but it also has 4 named scopes and it delegates 7 methods to an associated
model. Maybe this will help you.

Thanks for the quick response. NetBeans for Ruby is the best Rails IDE I've used, and I'm using it daily since it's
first version.

If only there would be a better HAML & SASS support... ;-)
Comment 4 Erno Mononen 2009-03-17 11:07:31 UTC
Thanks, that helps. This should be fixed now in #0dce730e5fec, it'll take a while before it gets propagated to the 
daily build though - there should be an automated notification here in this issue once that happens. Thanks again for 
catching this!

PS. Wrt. HAML & SASS - I'll see what I can do for the release after 6.7, for 6.7 I unfortunately don't have the cycles 
to work on that front.
Comment 5 Quality Engineering 2009-03-18 22:34:27 UTC
Integrated into 'main-golden', will be available in build *200903181604* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0dce730e5fec
User: Erno Mononen <emononen@netbeans.org>
Log: #160370: OutOfMemoryError: Java heap space