Project: aptanastudio
Issue APSTUD-7524: Failed to parse large JavaScript file, resulting in 100% CPU usage
I have a project with the file attached, TI Studio hangs + CPU 100% while indexing that file i join the file but the crash log was too big so i just post the related part here: {code} !ENTRY com.aptana.editor.js 4 0 2012-10-23 10:17:44.434 !MESSAGE (Build 3.0.1.201210221016) [ERROR] Failed to parse file:/Volumes/data/dev/xerox/xstar3/trunk/Client/Titanium/RepairMan/Resources/web/three.min.js for JS Parser Validation !STACK 0 java.lang.IllegalMonitorStateException java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:363) java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1317) java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:745) com.aptana.index.core.Index.exitRead(Index.java:417) com.aptana.index.core.Index.query(Index.java:565) com.aptana.editor.js.contentassist.index.JSIndexReader.getFunctions(JSIndexReader.java:314) com.aptana.editor.js.contentassist.JSIndexQueryHelper.getFunctions(JSIndexQueryHelper.java:87) com.aptana.editor.js.contentassist.JSIndexQueryHelper.getMembers(JSIndexQueryHelper.java:184) com.aptana.editor.js.contentassist.JSIndexQueryHelper.getTypeMembers(JSIndexQueryHelper.java:391) com.aptana.editor.js.inferencing.JSNodeTypeInferrer.visit(JSNodeTypeInferrer.java:566) com.aptana.editor.js.parsing.ast.JSGetPropertyNode.accept(JSGetPropertyNode.java:34) com.aptana.editor.js.parsing.ast.JSTreeWalker.visit(JSTreeWalker.java:176) com.aptana.editor.js.inferencing.JSNodeTypeInferrer.getTypes(JSNodeTypeInferrer.java:263) com.aptana.editor.js.inferencing.JSNodeTypeInferrer.getTypes(JSNodeTypeInferrer.java:244) com.aptana.editor.js.inferencing.JSNodeTypeInferrer.visit(JSNodeTypeInferrer.java:364) com.aptana.editor.js.parsing.ast.JSBinaryArithmeticOperatorNode.accept(JSBinaryArithmeticOperatorNode.java:94) com.aptana.editor.js.parsing.ast.JSTreeWalker.visit(JSTreeWalker.java:176) com.aptana.editor.js.inferencing.JSSymbolTypeInferrer.processValues(JSSymbolTypeInferrer.java:553) com.aptana.editor.js.inferencing.JSSymbolTypeInferrer.getSymbolPropertyElement(JSSymbolTypeInferrer.java:339) com.aptana.editor.js.inferencing.JSSymbolTypeInferrer.processProperties(JSSymbolTypeInferrer.java:461) com.aptana.editor.js.inferencing.JSSymbolTypeInferrer.getSymbolPropertyElement(JSSymbolTypeInferrer.java:342) com.aptana.editor.js.inferencing.JSSymbolTypeInferrer.getSymbolPropertyElement(JSSymbolTypeInferrer.java:376) com.aptana.editor.js.inferencing.JSNodeTypeInferrer.visit(JSNodeTypeInferrer.java:633) com.aptana.editor.js.parsing.ast.JSIdentifierNode.accept(JSIdentifierNode.java:33) com.aptana.editor.js.parsing.ast.JSTreeWalker.visit(JSTreeWalker.java:176) com.aptana.editor.js.validator.JSParserValidator.getTypeName(JSParserValidator.java:387) com.aptana.editor.js.validator.JSParserValidator.checkTypeForDeprecation(JSParserValidator.java:407) com.aptana.editor.js.validator.JSParserValidator.checkForDeprecations(JSParserValidator.java:211) com.aptana.editor.js.validator.JSParserValidator$2.include(JSParserValidator.java:175) com.aptana.editor.js.validator.JSParserValidator$2.include(JSParserValidator.java:1) com.aptana.parsing.util.ParseUtil.treeApply(ParseUtil.java:155) com.aptana.parsing.util.ParseUtil.treeApply(ParseUtil.java:121) com.aptana.editor.js.validator.JSParserValidator.buildFile(JSParserValidator.java:148) com.aptana.core.internal.build.LazyBuildParticipant.buildFile(LazyBuildParticipant.java:72) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:333) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:273) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:231) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.initialReconcile(CommonReconcilingStrategy.java:145) com.aptana.editor.common.text.reconciler.CommonReconciler.initialProcess(CommonReconciler.java:188) org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:173) !ENTRY com.aptana.editor.js 4 0 2012-10-23 11:51:52.608 !MESSAGE (Build 3.0.1.201210221016) [ERROR] Failed to parse file:/Volumes/data/dev/xerox/xstar3/trunk/Client/Titanium/RepairMan/Resources/include/utilities.js for JS Parser Validation !STACK 0 java.lang.NullPointerException com.aptana.editor.js.validator.JSParserValidator.buildFile(JSParserValidator.java:146) com.aptana.core.internal.build.LazyBuildParticipant.buildFile(LazyBuildParticipant.java:72) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:333) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:273) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:231) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:437) com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) {code}
Story points: 8