Community
Participate
Working Groups
Created attachment 221675 [details] jstack output When I opened a small (50 lines or so) HTML file, containing a block of JavaScript, Eclipse hang for about 30 seconds, then gave me an out-of-memory error and asked me to quit. The error from Error Log is below; I'm also attaching several jstack calls made while it was hanging. The last one is after it reported the error. Unhandled event loop exception java.lang.OutOfMemoryError: Java heap space at org.eclipse.wst.jsdt.internal.compiler.parser.Scanner.getLineEnds(Scanner.java:534) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.problemReporter(Parser.java:6335) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.consumeToken(Parser.java:4385) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:5740) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:6036) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:5988) at org.eclipse.wst.jsdt.internal.codeassist.SelectionEngine.doParse(SelectionEngine.java:1286) at org.eclipse.wst.jsdt.internal.codeassist.impl.Engine.accept(Engine.java:91) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.askForBinding(LookupEnvironment.java:279) at org.eclipse.wst.jsdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:249) at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:2105) at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.getType(Scope.java:1876) at org.eclipse.wst.jsdt.core.infer.InferredType.resolveType(InferredType.java:319) at org.eclipse.wst.jsdt.internal.compiler.lookup.MethodScope.createMethod(MethodScope.java:192) at org.eclipse.wst.jsdt.internal.compiler.lookup.MethodScope.createMethod(MethodScope.java:166) at org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding.buildMethods(SourceTypeBinding.java:204) at org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding.buildFieldsAndMethods(SourceTypeBinding.java:77) at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope.buildFieldsAndMethods(CompilationUnitScope.java:186) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:470) at org.eclipse.wst.jsdt.internal.codeassist.impl.Engine.accept(Engine.java:94) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.askForBinding(LookupEnvironment.java:279) at org.eclipse.wst.jsdt.internal.compiler.lookup.PackageBinding.getBinding(PackageBinding.java:156) at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.findBinding(Scope.java:802) at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.findType(Scope.java:821) at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope.buildSuperType(CompilationUnitScope.java:413) at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope.buildTypeBindings(CompilationUnitScope.java:382) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.buildTypeBindings(LookupEnvironment.java:320) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.buildTypeBindings(LookupEnvironment.java:316) at org.eclipse.wst.jsdt.internal.codeassist.SelectionEngine.select(SelectionEngine.java:729) at org.eclipse.wst.jsdt.internal.core.Openable.codeSelect(Openable.java:167) at org.eclipse.wst.jsdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:318) at org.eclipse.wst.jsdt.web.core.javascript.JsTranslation.getElementsFromJsRange(JsTranslation.java:302)
This is Eclipse Juno 20120614-1722, installed from eclipse-jee-juno-macosx-cocoa-x86_64.tar, with all plugins up-to-date.
Try increasing the maximum memory. The default of 512MB may not cover your usage.
I can try that, but the long delay before the out-of-memory error makes me think that this was an out-of-control loop, rather than just a normal case of not enough memory.
It might be better in Juno SR1 in that the problematic calls are less frequent, but it is still possible without tweaking your memory settings. Were you able to try it with a larger heap size?