Out of memory error

I'm running RubyMine 7.0.2 on Mac 10.10.1.
Whenever I try to edit coffeescript files I get an "Out of Memory" error message that asks me to increase Xms setting.
I already increased Xmx to 1025MB and MaxPermSize to 512MB, without any change.

Here is the log:

2015-01-12 11:27:28,967 [  37833]  ERROR - on.CompletionProgressIndicator - Java heap space
java.lang.OutOfMemoryError: Java heap space
 at com.intellij.openapi.util.io.FileUtilRt.loadBytes(FileUtilRt.java:493)
 at com.intellij.openapi.util.io.FileUtil.loadBytes(FileUtil.java:1469)
 at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.contentsToByteArray(LocalFileSystemBase.java:455)
 at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.contentsToByteArray(PersistentFSImpl.java:501)
 at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:108)
 at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:102)
 at com.intellij.openapi.fileEditor.impl.LoadTextUtil.loadText(LoadTextUtil.java:373)
 at com.intellij.psi.SingleRootFileViewProvider$VirtualFileContent.getText(SingleRootFileViewProvider.java:494)
 at com.intellij.psi.SingleRootFileViewProvider.getContents(SingleRootFileViewProvider.java:339)
 at com.intellij.lang.javascript.index.JSMinifiedFileIndexer$Factory.createVisitor(JSMinifiedFileIndexer.java:35)
 at com.intellij.lang.javascript.index.JSSymbolUtil.indexFile(JSSymbolUtil.java:151)
 at com.intellij.lang.javascript.index.JavaScriptIndex$4$1.compute(JavaScriptIndex.java:426)
 at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
 at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:200)
 at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
 at com.intellij.lang.javascript.index.JavaScriptIndex.getEntryForNonJavaScriptFile(JavaScriptIndex.java:444)
 at com.intellij.lang.javascript.index.JavaScriptIndex.getEntryForFileImpl(JavaScriptIndex.java:560)
 at com.intellij.lang.javascript.index.JavaScriptIndex.getEntryForFile(JavaScriptIndex.java:509)
 at com.intellij.lang.javascript.index.JavaScriptIndex.processIt(JavaScriptIndex.java:409)
 at com.intellij.lang.javascript.index.JavaScriptIndex.processAllSymbols(JavaScriptIndex.java:366)
 at com.intellij.lang.javascript.completion.JSReferenceCompletionUtil.calcDefaultVariants(JSReferenceCompletionUtil.java:132)
 at com.intellij.lang.javascript.completion.JSCompletionContributor.addReferenceVariants(JSCompletionContributor.java:141)
 at com.intellij.lang.javascript.completion.JSCompletionContributor.fillCompletionVariants(JSCompletionContributor.java:103)
 at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:84)
 at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:135)
 at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:128)
 at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$1.addCompletions(LiveTemplateCompletionContributor.java:75)
 at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
 at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:154)
 at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:84)
 at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:115)
 at com.intellij.codeInsight.completion.CompletionProgressIndicator.a(CompletionProgressIndicator.java:784)
2015-01-12 11:27:28,968 [  37834]  ERROR - on.CompletionProgressIndicator - RubyMine 7.0.2  Build #RM-139.800
2015-01-12 11:27:28,968 [  37834]  ERROR - on.CompletionProgressIndicator - JDK: 1.6.0_65
2015-01-12 11:27:28,968 [  37834]  ERROR - on.CompletionProgressIndicator - VM: Java HotSpot(TM) 64-Bit Server VM
2015-01-12 11:27:28,968 [  37834]  ERROR - on.CompletionProgressIndicator - Vendor: Apple Inc.
2015-01-12 11:27:28,968 [  37834]  ERROR - on.CompletionProgressIndicator - OS: Mac OS X
2015-01-12 11:27:28,968 [  37834]  ERROR - on.CompletionProgressIndicator - Last Action: EditorEnter

Any suggestion?
Thanks

7 comments
Comment actions Permalink

Hi,

What's the size of your project? Please try excluding rarely used folders containing javascript files from project to prevent its indexing, e.g. libraries, node_modules etc.

Regards,
Konstantin

0
Comment actions Permalink

Hi,

The project is not that big (50 js files).
My colleague is working on the same project using RubyMine and he has no problems, so it must be something with my environment.
Any other suggestions?

Thanks

0
Comment actions Permalink

Done. File name is RM-139.800_or_13.01.2015_15.30.08.zip

0
Comment actions Permalink

The snapshot shows 44M of used memory. Could you please capture it with -XX:+HeapDumpOnOutOfMemoryError in vmoptions file?

0
Comment actions Permalink

I tried, but a snapshot wasn't created.
I'm presented with the error message I described, and I can choose whether to quit or ignore. A memory dump isn't created either way.
The strange thing is that in the activity monitor I see RubyMine uses only ~ 400MB, which is less than the 1024MB limit I configured.

0
Comment actions Permalink

Any way I can try finding what's the problem?
It happens every time I hit '.' in a coffeescript file and auto completion starts.

0

Please sign in to leave a comment.