Uploaded image for project: 'Aptana Studio'
  1. Aptana Studio
  2. APSTUD-7524

Failed to parse large JavaScript file, resulting in 100% CPU usage

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2012 Sprint 20
    • Component/s: Indexing, JS
    • Labels:
      None
    • Environment:

      Titanium Studio, build: 3.0.1.201210221016
      (c) Copyright 2012 by Appcelerator, Inc. All rights reserved.

      Build: jenkins-titanium-rcp-release-623 (origin/release)
      Date: 22 October 2012, 10:18:25

    • Story Points:
      8

      Description

      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:

      !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
      	at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:363)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1317)
      	at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:745)
      	at com.aptana.index.core.Index.exitRead(Index.java:417)
      	at com.aptana.index.core.Index.query(Index.java:565)
      	at com.aptana.editor.js.contentassist.index.JSIndexReader.getFunctions(JSIndexReader.java:314)
      	at com.aptana.editor.js.contentassist.JSIndexQueryHelper.getFunctions(JSIndexQueryHelper.java:87)
      	at com.aptana.editor.js.contentassist.JSIndexQueryHelper.getMembers(JSIndexQueryHelper.java:184)
      	at com.aptana.editor.js.contentassist.JSIndexQueryHelper.getTypeMembers(JSIndexQueryHelper.java:391)
      	at com.aptana.editor.js.inferencing.JSNodeTypeInferrer.visit(JSNodeTypeInferrer.java:566)
      	at com.aptana.editor.js.parsing.ast.JSGetPropertyNode.accept(JSGetPropertyNode.java:34)
      	at com.aptana.editor.js.parsing.ast.JSTreeWalker.visit(JSTreeWalker.java:176)
      	at com.aptana.editor.js.inferencing.JSNodeTypeInferrer.getTypes(JSNodeTypeInferrer.java:263)
      	at com.aptana.editor.js.inferencing.JSNodeTypeInferrer.getTypes(JSNodeTypeInferrer.java:244)
      	at com.aptana.editor.js.inferencing.JSNodeTypeInferrer.visit(JSNodeTypeInferrer.java:364)
      	at com.aptana.editor.js.parsing.ast.JSBinaryArithmeticOperatorNode.accept(JSBinaryArithmeticOperatorNode.java:94)
      	at com.aptana.editor.js.parsing.ast.JSTreeWalker.visit(JSTreeWalker.java:176)
      	at com.aptana.editor.js.inferencing.JSSymbolTypeInferrer.processValues(JSSymbolTypeInferrer.java:553)
      	at com.aptana.editor.js.inferencing.JSSymbolTypeInferrer.getSymbolPropertyElement(JSSymbolTypeInferrer.java:339)
      	at com.aptana.editor.js.inferencing.JSSymbolTypeInferrer.processProperties(JSSymbolTypeInferrer.java:461)
      	at com.aptana.editor.js.inferencing.JSSymbolTypeInferrer.getSymbolPropertyElement(JSSymbolTypeInferrer.java:342)
      	at com.aptana.editor.js.inferencing.JSSymbolTypeInferrer.getSymbolPropertyElement(JSSymbolTypeInferrer.java:376)
      	at com.aptana.editor.js.inferencing.JSNodeTypeInferrer.visit(JSNodeTypeInferrer.java:633)
      	at com.aptana.editor.js.parsing.ast.JSIdentifierNode.accept(JSIdentifierNode.java:33)
      	at com.aptana.editor.js.parsing.ast.JSTreeWalker.visit(JSTreeWalker.java:176)
      	at com.aptana.editor.js.validator.JSParserValidator.getTypeName(JSParserValidator.java:387)
      	at com.aptana.editor.js.validator.JSParserValidator.checkTypeForDeprecation(JSParserValidator.java:407)
      	at com.aptana.editor.js.validator.JSParserValidator.checkForDeprecations(JSParserValidator.java:211)
      	at com.aptana.editor.js.validator.JSParserValidator$2.include(JSParserValidator.java:175)
      	at com.aptana.editor.js.validator.JSParserValidator$2.include(JSParserValidator.java:1)
      	at com.aptana.parsing.util.ParseUtil.treeApply(ParseUtil.java:155)
      	at com.aptana.parsing.util.ParseUtil.treeApply(ParseUtil.java:121)
      	at com.aptana.editor.js.validator.JSParserValidator.buildFile(JSParserValidator.java:148)
      	at com.aptana.core.internal.build.LazyBuildParticipant.buildFile(LazyBuildParticipant.java:72)
      	at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:333)
      	at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:273)
      	at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:231)
      	at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.initialReconcile(CommonReconcilingStrategy.java:145)
      	at com.aptana.editor.common.text.reconciler.CommonReconciler.initialProcess(CommonReconciler.java:188)
      	at 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
      	at com.aptana.editor.js.validator.JSParserValidator.buildFile(JSParserValidator.java:146)
      	at com.aptana.core.internal.build.LazyBuildParticipant.buildFile(LazyBuildParticipant.java:72)
      	at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:333)
      	at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:273)
      	at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:231)
      	at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:437)
      	at com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162)
      	at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206)
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                farfromrefuge Martin Guillon (Inactive)
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Integration