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.
Hi I am using NB 6.0 on OpenSuse10.3, It seems that this is purely a memmory management issue and files/list are getting read in memory instead of getting streamed. I have attached a screen shot for better understanding.
Created attachment 53375 [details] a screenshot of the error
Adding the real stackTrace pdating installed gems... Bulk updating Gem source index for: http://gems.rubyforge.org Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.HashMap.<init>(HashMap.java:209) at org.jvyamlb.ResolverImpl.descendResolver(ResolverImpl.java:112) at org.jvyamlb.ComposerImpl.composeNode(ComposerImpl.java:124) at org.jvyamlb.ComposerImpl.composeNode(ComposerImpl.java:163) at org.jvyamlb.ComposerImpl.composeNode(ComposerImpl.java:167) at org.jvyamlb.ComposerImpl.composeNode(ComposerImpl.java:167) at org.jvyamlb.ComposerImpl.composeDocument(ComposerImpl.java:100) at org.jvyamlb.ComposerImpl.getNode(ComposerImpl.java:76) at org.jvyamlb.BaseConstructorImpl.getData(BaseConstructorImpl.java:97) at org.jruby.RubyYAML.load(RubyYAML.java:221) at org.jruby.RubyYAMLInvokerSload1.call(Unknown Source) at org.jruby.runtime.callback.FastInvocationCallback.execute(FastInvocationCallback.java:49) at org.jruby.internal.runtime.methods.SimpleCallbackMethod.call(SimpleCallbackMethod.java:81) at org.jruby.evaluator.EvaluationState.callNode(EvaluationState.java:571) at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:207) at org.jruby.evaluator.EvaluationState.orNode(EvaluationState.java:1461) at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:339) at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:164) at org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java:142) at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79) at org.jruby.evaluator.EvaluationState.fCallNode(EvaluationState.java:1025) at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:253) at org.jruby.evaluator.EvaluationState.blockNode(EvaluationState.java:533) at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:201) at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:164) at org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java:142) at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79) at org.jruby.evaluator.EvaluationState.fCallNode(EvaluationState.java:1025) at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:253) at org.jruby.evaluator.EvaluationState.localAsgnNode(EvaluationState.java:1236) at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:286) at org.jruby.evaluator.EvaluationState.blockNode(EvaluationState.java:533)
Hi. Does it happen every time and which version of NetBeans are you using? Did you try to give more memory to your NetBeans. It could help in the case, you really just need larger heap (a lot of files, huge project, etc.). In the case of leak we will need more information. Stacktrace does not help here to find a leak. See. http://wiki.netbeans.org/wiki/view/FaqNetBeansAndOOME. So depending on the answers we can proceed further. Thanks for the feedback.
It happens always and it is independent of what project I have opened. As you can see in the screen shot this is happening when i am running GEM tool on NB 6.0 so if i go to tools and run GEM even if when no project is opened the same thing happens. Moreover shouldn't it just work with default memory settings? This seems a very basic operation the same thing is also happening when i goto new ruby project->update ruby.
There is probably a problem but I haven't faced it on any hardware configuration when I tried gems dialog. Memory consumption goes up when you do the following: - open Tools|Ruby Gems - wait until gems are populated - click 'Reload Gems' several times sapanparikh18, please, could you use latest NetBeans 6.0 RC2 and attach messages.log? Thanks.
Also, how much memory do you have on your machine? Thanks.
My machine has 1.2 GB of main memory and maybe 8-10 GB of Linux Swap memory. I think i wont use the NB RC2 right now as NB 6.0 is just lined up and i will have to install it anyways in couple of days.
What happens if you run gem list --remote on the command line? (with JRuby) The "Ruby Gems" manager in NetBeans is simply a GUI shell on top of the command line gem tool - and as far as I can tell, the separate JRuby process is running into Out Of Memory issues. That should happen on the command line too.. does it? Have you set any environment variables that could affect JRuby, such as JRUBY_EXTRA_VM_ARGS ? If not, what happens if you set it to "-Xmx512m" and then restart the IDE?
I have now NB 6.0 production version and same problem is appening. Cant't test it on command line as it just doesnt work on command line. Moreover I am not that great a linux user who can do much about it.
Tor, this is a JRuby issue and I usually run into it as well. I'm not able to fix it using the JRUBY_EXTRA_VM_ARGS variable, however, editing the _jrubyvmopts file in the jruby bin directory does solve the problem. /Brian
What exactly do you change? I just changed "set _MEM=-Xmx378m" to "set _MEM=-Xmx640m" but the problem still persists.
Yes, that's what I changed, however, I only bumped it up to 512. I would recommend you refile this issue on the jruby.org web site. As the RubyGem repository is growing rapidly, they probably need a more efficient way of populating their list. Doing a quick search, I did find these issues which are probably related: http://jira.codehaus.org/browse/JRUBY-1085 http://jira.codehaus.org/browse/JRUBY-1437 /Brian
sapanparikh18, could you try the same from the CLI? You might see what command is used when you turn on the logging: http://wiki.netbeans.org/wiki/view/FaqRubyNBLogging Then you might either copy-paste the command into the command-line or you can run something like: $ ./bin/jruby -S gem list --both Which should be the same. Does it also throw OOME?
No need to investigate further. I've just reproduced it as well. Exactly the same scenario. I've copy-pasted command and run from command-line, getting exactly the same error. We are passing "-Xmx256m" which is not enough for gem listing. I did not read Brian's comment carefully before. I'll bump-up maximum heap space to 512m, which is what is done in JRuby scripts.
Fixed. Checking in RubyExecution.java; new revision: 1.3; previous revision: 1.2
*** Issue 124622 has been marked as a duplicate of this issue. ***
Hi Peter, could you patch the 6.0 branch so users can take the update for 6.0 from UC to get rid of this bug? Not sure how much has to be done, if there is some 'official' process. Pasting fix against the release60. Thanks. Index: projects/src/org/netbeans/modules/ruby/rubyproject/api/RubyExecution.java =================================================================== RCS file: /cvs/ruby/projects/src/org/netbeans/modules/ruby/rubyproject/api/Attic/RubyExecution.java,v retrieving revision 1.18 diff -u -r1.18 RubyExecution.java --- projects/src/org/netbeans/modules/ruby/rubyproject/api/RubyExecution.java 1 Nov 2007 15:01:23 -0000 1.18 +++ projects/src/org/netbeans/modules/ruby/rubyproject/api/RubyExecution.java 7 Jan 2008 12:42:26 -0000 @@ -169,7 +169,7 @@ String extraArgs = System.getenv("JRUBY_EXTRA_VM_ARGS"); // NOI18N - String javaMemory = "-Xmx256m"; // NOI18N + String javaMemory = "-Xmx512m"; // NOI18N String javaStack = "-Xss1024k"; // NOI18N if (extraArgs != null) {
PS: patch against $NB_SRC/ruby directory
Verified in custom nbm provided by Martin.
*** Issue 126538 has been marked as a duplicate of this issue. ***
The fix has been ported into the release601_fixes branch. Checking in RubyExecution.java; /cvs/ruby/projects/src/org/netbeans/modules/ruby/rubyproject/api/Attic/RubyExecution.java,v <-- RubyExecution.java new revision: 1.18.6.1; previous revision: 1.18 done
I still see this problem in Product Version: NetBeans IDE 6.0.1 (Build 200801291616) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Linux version 2.6.22-14-386 running on i386; UTF-8; en_US (nb)
Have you applied all Ruby updates from Stable AUC?
No, I just downloaded 6.0.1. So the fix is not in 6.0.1 itself?
The fix is part of update for NetBeans IDE 6.0.1 . The list of all updates for NetBeans IDE 6.0 and NetBeans IDE 6.0.1 can be found at http://wiki.netbeans.org/NetBeans6.0PatchesInfo . Since both IDEs share the same AUC there is the common list of updates. All issues with release date after Jan/31/2008 (NetBeans IDE 6.0.1 release date) are updates for NetBeans IDE 6.0.1 .
Right, updating the Ruby and Rails module helped. Thanks.