intellij-emberjs: String index out of range
Hello. My RubyMine raise me ide fatal error. Before this i have trables with very long indexing, and as a result it raise error. Here is a error log.
String index out of range: 11
java.lang.StringIndexOutOfBoundsException: String index out of range: 11
at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:933)
at java.lang.StringBuilder.substring(StringBuilder.java:76)
at java.lang.AbstractStringBuilder.subSequence(AbstractStringBuilder.java:912)
at java.lang.StringBuilder.subSequence(StringBuilder.java:76)
at com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReferenceSet.reparse(FileReferenceSet.java:264)
at com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReferenceSet.reparse(FileReferenceSet.java:212)
at com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReferenceSet.<init>(FileReferenceSet.java:99)
at com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReferenceSet.<init>(FileReferenceSet.java:77)
at com.emberjs.resolver.EmberModuleReferenceContributor$getAllReferences$refs$1.<init>(EmberModuleReferenceContributor.kt:61)
at com.emberjs.resolver.EmberModuleReferenceContributor.getAllReferences(EmberModuleReferenceContributor.kt:61)
at com.intellij.lang.javascript.psi.resolve.JSModuleReferenceContributor.getReferences(JSModuleReferenceContributor.java:131)
at com.intellij.lang.javascript.frameworks.amd.JSAmdReferenceContributor$1.getReferencesByElement(JSAmdReferenceContributor.java:85)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getReferences(ReferenceProvidersRegistryImpl.java:135)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:123)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:102)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:59)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:53)
at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.createRefs(JSLiteralExpressionImpl.java:91)
at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.access$000(JSLiteralExpressionImpl.java:47)
at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl$1.compute(JSLiteralExpressionImpl.java:74)
at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl$1.compute(JSLiteralExpressionImpl.java:70)
at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:45)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:35)
at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:96)
at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.getReferences(JSLiteralExpressionImpl.java:81)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.addTypeFromAmdModuleReference(JSTypeEvaluator.java:1469)
at com.intellij.lang.javascript.ecmascript6.TypeScriptTypeEvaluator.addTypeFromAmdModuleReference(TypeScriptTypeEvaluator.java:708)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.addTypeFromVariableResolveResult(JSTypeEvaluator.java:1321)
at com.intellij.lang.javascript.ecmascript6.TypeScriptTypeEvaluator.addTypeFromVariableResolveResult(TypeScriptTypeEvaluator.java:224)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.addTypeFromResolveResult(JSTypeEvaluator.java:1293)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.processRefExpr(JSTypeEvaluator.java:1223)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.lambda$doEvaluateTypes$5(JSTypeEvaluator.java:385)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.processWithEvaluationGuard(JSTypeEvaluator.java:2190)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.processItem(JSTypeEvaluator.java:2153)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.doEvaluateTypes(JSTypeEvaluator.java:381)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.evaluateTypes(JSTypeEvaluator.java:355)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.evaluateExpressionOrElementTypes(JSTypeEvaluator.java:135)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.evaluateTypes(JSTypeEvaluator.java:123)
at com.intellij.lang.javascript.psi.resolve.JSReferenceExpressionResolver.resolve(JSReferenceExpressionResolver.java:135)
at com.intellij.lang.javascript.psi.resolve.JSReferenceExpressionResolver.resolve(JSReferenceExpressionResolver.java:53)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:145)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:175)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167)
at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.resolve(JSResolveUtil.java:2080)
at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.multiResolve(JSReferenceExpressionImpl.java:468)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.getResolveResultsFromQualifier(JSTypeEvaluator.java:1254)
at com.intellij.lang.javascript.ecmascript6.TypeScriptTypeEvaluator.getResolveResultsFromQualifier(TypeScriptTypeEvaluator.java:579)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.processRefExpr(JSTypeEvaluator.java:1195)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.lambda$doEvaluateTypes$5(JSTypeEvaluator.java:385)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.processWithEvaluationGuard(JSTypeEvaluator.java:2190)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.processItem(JSTypeEvaluator.java:2153)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.doEvaluateTypes(JSTypeEvaluator.java:381)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.evaluateTypes(JSTypeEvaluator.java:355)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.evaluateExpressionOrElementTypes(JSTypeEvaluator.java:135)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.evaluateTypes(JSTypeEvaluator.java:123)
at com.intellij.lang.javascript.psi.resolve.JSReferenceExpressionResolver.resolve(JSReferenceExpressionResolver.java:135)
at com.intellij.lang.javascript.psi.resolve.JSReferenceExpressionResolver.resolve(JSReferenceExpressionResolver.java:53)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:145)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:175)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167)
at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.resolve(JSResolveUtil.java:2080)
at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.multiResolve(JSReferenceExpressionImpl.java:468)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.getResolveResultsFromQualifier(JSTypeEvaluator.java:1254)
at com.intellij.lang.javascript.ecmascript6.TypeScriptTypeEvaluator.getResolveResultsFromQualifier(TypeScriptTypeEvaluator.java:579)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.processRefExpr(JSTypeEvaluator.java:1195)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.lambda$doEvaluateTypes$5(JSTypeEvaluator.java:385)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.processWithEvaluationGuard(JSTypeEvaluator.java:2190)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.processItem(JSTypeEvaluator.java:2153)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.doEvaluateTypes(JSTypeEvaluator.java:381)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.evaluateTypes(JSTypeEvaluator.java:355)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.evaluateExpressionOrElementTypes(JSTypeEvaluator.java:135)
at com.intellij.lang.javascript.psi.resolve.JSTypeEvaluator.evaluateTypes(JSTypeEvaluator.java:123)
at com.intellij.lang.javascript.psi.resolve.JSReferenceExpressionResolver.resolve(JSReferenceExpressionResolver.java:135)
at com.intellij.lang.javascript.psi.resolve.JSReferenceExpressionResolver.resolve(JSReferenceExpressionResolver.java:53)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:145)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:175)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167)
at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.resolve(JSResolveUtil.java:2080)
at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.multiResolve(JSReferenceExpressionImpl.java:468)
at com.intellij.lang.javascript.psi.ExpectedTypeEvaluator.visitJSArgumentList(ExpectedTypeEvaluator.java:453)
at com.intellij.lang.javascript.psi.impl.JSArgumentListImpl.accept(JSArgumentListImpl.java:57)
at com.intellij.lang.javascript.psi.ExpectedTypeEvaluator.findExpectedType(ExpectedTypeEvaluator.java:64)
at com.intellij.lang.javascript.dialects.JSDialectSpecificHandlersFactory.findExpectedType(JSDialectSpecificHandlersFactory.java:77)
at com.intellij.lang.javascript.psi.resolve.JSPropertyNameResolver.resolve(JSPropertyNameResolver.java:22)
at com.intellij.lang.javascript.psi.resolve.JSPropertyNameResolver.resolve(JSPropertyNameResolver.java:16)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:145)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:175)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167)
at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.resolve(JSResolveUtil.java:2080)
at com.intellij.lang.javascript.psi.impl.JSPropertyNameReference.multiResolve(JSPropertyNameReference.java:75)
at com.intellij.lang.javascript.psi.impl.JSPropertyNameReference.resolve(JSPropertyNameReference.java:57)
at com.intellij.lang.javascript.psi.impl.JSPropertyNameReference.resolveAndUnwrapMergedTypeMembers(JSPropertyNameReference.java:120)
at com.intellij.lang.javascript.psi.impl.JSPropertyNameReference.isReferenceTo(JSPropertyNameReference.java:184)
at com.intellij.lang.ecmascript6.findUsages.JSFindReferencesResultProcessor.processTextOccurrence(JSFindReferencesResultProcessor.java:35)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$3.lambda$execute$0(PsiSearchHelperImpl.java:762)
at com.intellij.psi.impl.search.LowLevelSearchUtil.processTreeUp(LowLevelSearchUtil.java:139)
at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsAtOffsets(LowLevelSearchUtil.java:226)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$3.execute(PsiSearchHelperImpl.java:758)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:247)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:238)
at com.intellij.openapi.application.ReadActionProcessor.lambda$process$0(ReadActionProcessor.java:28)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:47)
at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:28)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processCandidates$13(PsiSearchHelperImpl.java:718)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processVirtualFile$5(PsiSearchHelperImpl.java:422)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1122)
at com.intellij.openapi.application.ex.ApplicationUtil.tryRunReadAction(ApplicationUtil.java:43)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.processVirtualFile(PsiSearchHelperImpl.java:406)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processPsiFileRoots$2(PsiSearchHelperImpl.java:320)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$3(PsiSearchHelperImpl.java:353)
at com.intellij.concurrency.ApplierCompleter.a(ApplierCompleter.java:133)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:534)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:479)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.concurrency.ApplierCompleter.a(ApplierCompleter.java:116)
at com.intellij.concurrency.ApplierCompleter.d(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.pollAndExecCC(ForkJoinPool.java:1190)
at java.util.concurrent.ForkJoinPool.helpComplete(ForkJoinPool.java:1879)
at java.util.concurrent.ForkJoinPool.awaitJoin(ForkJoinPool.java:2045)
at java.util.concurrent.ForkJoinTask.doJoin(ForkJoinTask.java:390)
at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:719)
at java.util.concurrent.ForkJoinPool.invoke(ForkJoinPool.java:2616)
at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:65)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.processFilesConcurrentlyDespiteWriteActions(PsiSearchHelperImpl.java:376)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.processPsiFileRoots(PsiSearchHelperImpl.java:318)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.processCandidates(PsiSearchHelperImpl.java:713)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.processGlobalRequestsOptimized(PsiSearchHelperImpl.java:689)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.processRequests(PsiSearchHelperImpl.java:607)
at com.intellij.psi.search.SearchRequestQuery.processResults(SearchRequestQuery.java:45)
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:80)
at com.intellij.util.MergeQuery.processSubQuery(MergeQuery.java:85)
at com.intellij.util.MergeQuery.forEach(MergeQuery.java:57)
at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:67)
at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:57)
at com.intellij.lang.javascript.inspections.JSUnusedGlobalSymbolsInspection.calcUnused(JSUnusedGlobalSymbolsInspection.java:191)
at com.intellij.lang.javascript.inspections.JSUnusedGlobalSymbolsInspection.calcUnused(JSUnusedGlobalSymbolsInspection.java:165)
at com.intellij.lang.javascript.inspections.JSUnusedGlobalSymbolsInspection$MyJSElementVisitor.checkUnused(JSUnusedGlobalSymbolsInspection.java:421)
at com.intellij.lang.javascript.inspections.JSUnusedGlobalSymbolsInspection$MyJSElementVisitor.visitJSProperty(JSUnusedGlobalSymbolsInspection.java:366)
at com.intellij.lang.javascript.psi.JSElementVisitor.visitES6FunctionProperty(JSElementVisitor.java:484)
at com.intellij.lang.ecmascript6.psi.impl.ES6FunctionPropertyImpl.accept(ES6FunctionPropertyImpl.java:47)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:82)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:70)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:286)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:254)
at com.intellij.concurrency.ApplierCompleter.a(ApplierCompleter.java:133)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1127)
at com.intellij.concurrency.ApplierCompleter.b(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:534)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:479)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.concurrency.ApplierCompleter.a(ApplierCompleter.java:116)
at com.intellij.concurrency.ApplierCompleter.d(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 20 (8 by maintainers)
Commits related to this issue
- chore: catch StringIndexOutOfBoundsException in the module reference contributer see #176 — committed to makepanic/intellij-emberjs by makepanic 5 years ago
- fix: catch StringIndexOutOfBoundsException in the module reference contributer see #176 — committed to makepanic/intellij-emberjs by makepanic 5 years ago
I created a repository to store all the times this problem arises. Would you like to take a look?
By-the-way, I’m using:
Is it possible for anyone reporting this error to provide the file that causes the issue?
@Turbo87 If it helps, I believe I was getting this consistently with a .jsx file - It felt to me like the plugin looked at the JSX code, assumed it was Ember-related code, and tried to parse it, but failed because it wasn’t actually Ember code.
I’ll re enable the plugin tomorrow at work, and see if I can reproduce it again.
I have exactly the same error as @acdn-mmadden with the latest build of PhpStorm:
PhpStorm 2017.3.2 Build #PS-173.4127.29, built on December 22, 2017 JRE: 1.8.0_152-release-1024-b8 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.13.2