Various exceptions: "s.ExpressionTypingVisitor" / "Internal Error: processing file" / "PSI Service: request timed out"

We are seeing various web-interface errors + log exceptions when users attempt to use the internal file viewer within upsource to inspect code within a review.

errors shown in the web-interface include:

  • "Internal Error: processing file - path to file"
  • "PSI Service: request timed out"

 

some screenshots of the various errors:

 



 

exceptions in the "/opt/upsource-server/current/logs/upsource-frontend/warn.log" log include (redacted):
(a more complete log can be found here: https://pastebin.com/DCJpikuh)

java.lang.ClassCastException
[2017-05-09 11:26:12,463] ERROR C: server executor-8                 s.ExpressionTypingVisitor[IDE] - Exception while analyzing expression at (45,23) in /redacted{redacted-redacted-3622ab9d72569b9e95e032450349492f93483838}/redacted/server/server-core/src/test/kotlin/impl/redacted.kt:
mock(Intact::class.java)

 

java.lang.ClassCastException
[2017-05-09 11:33:29,002] ERROR C: server executor-9                 pc.impl.server.RpcTaskRunnable - Failed to execute RPC command: getFileInspectionMarkup:{"projectId":"redacted","revisionId":"legacy-redacted-2748458cd28dba5e80a5b338ce160677b1f91c13","fileName":"/redacted/path/to/redacted.kt","fileNode":"Hk0BAP5MAQATzAIoNjc4NWY1Nzg2MWIyYWU4NmNmZWQ2OTU1YmExYWY3NzJkNzc1MjE0NQ=="}
java.lang.Error: Processing file /redacted{legacy-redacted-2748458cd28dba5e80a5b338ce160677b1f91c13}/redacted/path/to/redacted.kt
    at com.jetbrains.upsource.psi.impl.FilePsiServices.a(FilePsiServices.kt:541)
    at com.jetbrains.upsource.psi.impl.FilePsiServices.getInspectionMarkup(FilePsiServices.kt:486)
    at com.jetbrains.upsource.psi.impl.commands.PsiServiceCommandFactory$getGetFileInspectionMarkupCommand$1$execute$1.invoke(PsiServiceCommandFactory.kt:83)
    at com.jetbrains.upsource.psi.impl.commands.PsiServiceCommandFactory$getGetFileInspectionMarkupCommand$1$execute$1.invoke(PsiServiceCommandFactory.kt:79)
    at com.jetbrains.upsource.psi.impl.PsiServicesFactory$withIndexedAsync$1$1.apply(PsiServicesFactory.kt:123)
    at com.jetbrains.upsource.psi.impl.PsiServicesFactory$withIndexedAsync$1$1.apply(PsiServicesFactory.kt:36)
    at com.jetbrains.upsource.stats.StatsCompanionKt$thenApplyAsyncWithStats$1$1.apply(StatsCompanion.kt:48)
    at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
    at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
    at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at com.jetbrains.upsource.util.NamedDaemonThreadFactory.a(NamedDaemonThreadFactory.java:34)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException

 

[2017-05-09 11:33:29,537] ERROR C: server executor-1                 .StubProcessingHelperBase[IDE] - PSI and index do not match: PSI HtmlFile:package.html
Text <html>
<head>
<title></title>
</head>
<body>

<p>Exposes <a href="http://www.jython.org" target="_blank">Jython</a> objects to templates.
The {@link freemarker.template.DefaultObjectWrapper default object wrapper} of FreeMarker
automatically wraps Jython nodes with this.

<p>Most of the issues dealing with Jython objects are handled by the
{@link freemarker.ext.jython.JythonWrapper#wrap(Object)} method. In
normal cases, this is the only method you should use to turn an
arbitrary Jython object into a FreeMarker
{@link freemarker.template.TemplateModel}. Additionally, you can
manually create instances of any wrapper class using its constructors.

</body>
</html>

stubTree PsiFileStubImpl
 
java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:135)
    at com.intellij.psi.stubs.StubProcessingHelperBase.a(StubProcessingHelperBase.java:176)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:158)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:52)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceStubIndex.a(UpsourceStubIndex.java:208)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceStubIndex.a(UpsourceStubIndex.java:230)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceStubIndex.processElements(UpsourceStubIndex.java:182)
    at com.intellij.psi.stubs.StubIndex.process(StubIndex.java:77)
    at com.intellij.psi.stubs.StubIndex.processElements(StubIndex.java:106)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:146)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:135)
    at com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.get(JavaFullClassNameIndex.java:48)
    at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.a(JavaFileManagerImpl.java:96)
    at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClasses(JavaFileManagerImpl.java:83)
    at com.intellij.psi.impl.PsiElementFinderImpl.findClasses(PsiElementFinderImpl.java:60)
    at com.intellij.psi.impl.JavaPsiFacadeImpl.findClasses(JavaPsiFacadeImpl.java:164)
    at com.intellij.psi.impl.file.PsiPackageImpl.c(PsiPackageImpl.java:212)
    at com.intellij.psi.impl.file.PsiPackageImpl.findClassByShortName(PsiPackageImpl.java:278)
    at com.intellij.psi.impl.file.PsiPackageImpl.processDeclarations(PsiPackageImpl.java:317)
    at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.a(PsiJavaFileBaseImpl.java:424)
    at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.a(PsiJavaFileBaseImpl.java:363)
    at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.processDeclarations(PsiJavaFileBaseImpl.java:309)
    at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:69)
    at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:51)
    at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:218)
    at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:149)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.a(PsiReferenceExpressionImpl.java:332)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.a(PsiReferenceExpressionImpl.java:270)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.access$000(PsiReferenceExpressionImpl.java:61)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver.resolve(PsiReferenceExpressionImpl.java:197)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver.resolve(PsiReferenceExpressionImpl.java:186)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:193)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver$1.elementFinished(PsiReferenceExpressionImpl.java:235)
    at com.intellij.psi.JavaRecursiveElementWalkingVisitor$1.elementFinished(JavaRecursiveElementWalkingVisitor.java:35)
    at com.intellij.psi.JavaRecursiveElementWalkingVisitor$1.elementFinished(JavaRecursiveElementWalkingVisitor.java:32)
    at com.intellij.util.WalkingState.next(WalkingState.java:97)
    at com.intellij.util.WalkingState.walkChildren(WalkingState.java:61)
    at com.intellij.util.WalkingState.elementStarted(WalkingState.java:52)
    at com.intellij.psi.PsiWalkingState.elementStarted(PsiWalkingState.java:73)
    at com.intellij.psi.JavaRecursiveElementWalkingVisitor.visitElement(JavaRecursiveElementWalkingVisitor.java:41)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver$1.visitReferenceExpression(PsiReferenceExpressionImpl.java:228)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.accept(PsiReferenceExpressionImpl.java:712)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver.a(PsiReferenceExpressionImpl.java:218)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver.resolve(PsiReferenceExpressionImpl.java:196)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver.resolve(PsiReferenceExpressionImpl.java:186)
    at com.intellij.psi.impl.source.resolve.ResolveCache$4.compute(ResolveCache.java:191)
    at com.intellij.psi.impl.source.resolve.ResolveCache$4.compute(ResolveCache.java:188)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:188)
    at com.intellij.psi.impl.PsiImplUtil.multiResolveImpl(PsiImplUtil.java:754)
    at com.intellij.psi.impl.PsiImplUtil.multiResolveImpl(PsiImplUtil.java:743)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.multiResolve(PsiReferenceExpressionImpl.java:346)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionBase.advancedResolve(PsiReferenceExpressionBase.java:86)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionBase.resolve(PsiReferenceExpressionBase.java:48)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl.resolveMethod(PsiMethodCallExpressionImpl.java:60)
    at com.intellij.psi.impl.source.resolve.graphInference.PsiPolyExpressionUtil.isPolyExpression(PsiPolyExpressionUtil.java:54)
    at com.intellij.psi.impl.source.resolve.graphInference.constraints.ExpressionCompatibilityConstraint.reduce(ExpressionCompatibilityConstraint.java:44)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.c(InferenceSession.java:1053)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.repeatInferencePhases(InferenceSession.java:1036)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.a(InferenceSession.java:373)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.b(InferenceSession.java:352)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.infer(InferenceSession.java:342)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.infer(InferenceSession.java:334)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSessionContainer.infer(InferenceSessionContainer.java:135)
    at com.intellij.psi.impl.source.resolve.graphInference.PsiGraphInferenceHelper.inferTypeArguments(PsiGraphInferenceHelper.java:71)
    at com.intellij.psi.impl.source.resolve.PsiResolveHelperImpl.inferTypeArguments(PsiResolveHelperImpl.java:190)
    at com.intellij.psi.infos.MethodCandidateInfo$4.compute(MethodCandidateInfo.java:418)
    at com.intellij.psi.infos.MethodCandidateInfo$4.compute(MethodCandidateInfo.java:403)
    at com.intellij.psi.infos.MethodCandidateInfo.computeForOverloadedCandidate(MethodCandidateInfo.java:273)
    at com.intellij.psi.infos.MethodCandidateInfo.inferTypeArguments(MethodCandidateInfo.java:403)
    at com.intellij.psi.infos.MethodCandidateInfo.inferTypeArguments(MethodCandidateInfo.java:382)
    at com.intellij.psi.infos.MethodCandidateInfo.getSubstitutor(MethodCandidateInfo.java:317)
    at com.intellij.psi.infos.MethodCandidateInfo.getSubstitutor(MethodCandidateInfo.java:300)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl.captureReturnType(PsiMethodCallExpressionImpl.java:240)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl$TypeEvaluator.a(PsiMethodCallExpressionImpl.java:229)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl$TypeEvaluator.fun(PsiMethodCallExpressionImpl.java:186)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl$TypeEvaluator.fun(PsiMethodCallExpressionImpl.java:155)
    at com.intellij.psi.impl.source.resolve.JavaResolveCache.getType(JavaResolveCache.java:87)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl.getType(PsiMethodCallExpressionImpl.java:55)
    at com.intellij.codeInspection.compiler.JavacQuirksInspectionVisitor.visitVariable(JavacQuirksInspectionVisitor.java:115)
    at com.intellij.psi.JavaElementVisitor.visitLocalVariable(JavaElementVisitor.java:174)
    at com.intellij.psi.impl.source.tree.java.PsiLocalVariableImpl.accept(PsiLocalVariableImpl.java:284)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:81)
    at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:69)
    at com.intellij.codeInspection.InspectionEngine.a(InspectionEngine.java:153)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceJobLauncher.invokeConcurrentlyUnderProgress(UpsourceJobLauncher.java:61)
    at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:57)
    at com.intellij.codeInspection.InspectionEngine.inspectElements(InspectionEngine.java:166)
    at com.intellij.codeInspection.InspectionEngine.inspectEx(InspectionEngine.java:129)
    at com.jetbrains.upsource.psi.impl.intellij.inspections.InspectionsRunner.runInspections(InspectionsRunner.kt:59)
    at com.jetbrains.upsource.psi.impl.FilePsiServices$getInspectionMarkup$1$build$$inlined$runReadAction$1.compute(actions.kt:47)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceApplication.a(UpsourceApplication.java:103)
    at __.read_lock_redacted_legacyxredactedx3622ab9d72569b9e95e032450349492f93483838.__(JavaGeneratorTemplate.java:52)
    at org.jonnyzzz.stack.NamedStackFrame.frame(NamedStackFrame.java:59)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceLocksManager.runAction(UpsourceLocksManager.java:309)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceLocksManager.runAction(UpsourceLocksManager.java:280)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceApplication.runReadAction(UpsourceApplication.java:101)
    at com.jetbrains.upsource.psi.impl.FilePsiServices$getInspectionMarkup$1.build(FilePsiServices.kt:589)
    at com.jetbrains.upsource.psi.impl.FilePsiServices$getInspectionMarkup$1.build(FilePsiServices.kt:486)
    at com.jetbrains.upsource.psi.impl.FilePsiServices.a(FilePsiServices.kt:531)
    at com.jetbrains.upsource.psi.impl.FilePsiServices.getInspectionMarkup(FilePsiServices.kt:486)
    at com.jetbrains.upsource.psi.impl.commands.PsiServiceCommandFactory$getGetFileInspectionMarkupCommand$1$execute$1.invoke(PsiServiceCommandFactory.kt:83)
    at com.jetbrains.upsource.psi.impl.commands.PsiServiceCommandFactory$getGetFileInspectionMarkupCommand$1$execute$1.invoke(PsiServiceCommandFactory.kt:79)
    at com.jetbrains.upsource.psi.impl.PsiServicesFactory$withIndexedAsync$1$1.apply(PsiServicesFactory.kt:123)
    at com.jetbrains.upsource.psi.impl.PsiServicesFactory$withIndexedAsync$1$1.apply(PsiServicesFactory.kt:36)
    at com.jetbrains.upsource.stats.StatsCompanionKt$thenApplyAsyncWithStats$1$1.apply(StatsCompanion.kt:48)
    at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
    at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
    at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at com.jetbrains.upsource.util.NamedDaemonThreadFactory.a(NamedDaemonThreadFactory.java:34)
    at java.lang.Thread.run(Thread.java:745)
[2017-05-09 11:33:29,538] ERROR C: server executor-1                 mpl.intellij.UpsourceStubIndex - Error processing stub for file jar:///opt/upsource-server/upsource-3.5.3616/data/upsource-frontend/gradle-cache/caches/modules-2/files-2.1/org.freemarker/freemarker/2.3.20/ed2c6f2a00062d3ddf8d86870a047e50a5355e65/freemarker-2.3.20-sources.jar!/freemarker/ext/jython/package.html
Index: java.class.fqn
Key: 2140778292
IndexEntry: [com.jetbrains.upsource.psi.impl.intellij.LibraryIndexCache$IndexValue@213f06f2]
 
java.lang.Error
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceStubProcessingHelper.onInternalError(UpsourceStubProcessingHelper.java:24)
    at com.intellij.psi.stubs.StubProcessingHelperBase.a(StubProcessingHelperBase.java:177)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:158)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:52)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceStubIndex.a(UpsourceStubIndex.java:208)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceStubIndex.a(UpsourceStubIndex.java:230)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceStubIndex.processElements(UpsourceStubIndex.java:182)
    at com.intellij.psi.stubs.StubIndex.process(StubIndex.java:77)
    at com.intellij.psi.stubs.StubIndex.processElements(StubIndex.java:106)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:146)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:135)
    at com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.get(JavaFullClassNameIndex.java:48)
    at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.a(JavaFileManagerImpl.java:96)
    at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClasses(JavaFileManagerImpl.java:83)
    at com.intellij.psi.impl.PsiElementFinderImpl.findClasses(PsiElementFinderImpl.java:60)
    at com.intellij.psi.impl.JavaPsiFacadeImpl.findClasses(JavaPsiFacadeImpl.java:164)
    at com.intellij.psi.impl.file.PsiPackageImpl.c(PsiPackageImpl.java:212)
    at com.intellij.psi.impl.file.PsiPackageImpl.findClassByShortName(PsiPackageImpl.java:278)
    at com.intellij.psi.impl.file.PsiPackageImpl.processDeclarations(PsiPackageImpl.java:317)
    at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.a(PsiJavaFileBaseImpl.java:424)
    at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.a(PsiJavaFileBaseImpl.java:363)
    at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.processDeclarations(PsiJavaFileBaseImpl.java:309)
    at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:69)
    at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:51)
    at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:218)
    at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:149)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.a(PsiReferenceExpressionImpl.java:332)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.a(PsiReferenceExpressionImpl.java:270)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.access$000(PsiReferenceExpressionImpl.java:61)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver.resolve(PsiReferenceExpressionImpl.java:197)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver.resolve(PsiReferenceExpressionImpl.java:186)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:193)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver$1.elementFinished(PsiReferenceExpressionImpl.java:235)
    at com.intellij.psi.JavaRecursiveElementWalkingVisitor$1.elementFinished(JavaRecursiveElementWalkingVisitor.java:35)
    at com.intellij.psi.JavaRecursiveElementWalkingVisitor$1.elementFinished(JavaRecursiveElementWalkingVisitor.java:32)
    at com.intellij.util.WalkingState.next(WalkingState.java:97)
    at com.intellij.util.WalkingState.walkChildren(WalkingState.java:61)
    at com.intellij.util.WalkingState.elementStarted(WalkingState.java:52)
    at com.intellij.psi.PsiWalkingState.elementStarted(PsiWalkingState.java:73)
    at com.intellij.psi.JavaRecursiveElementWalkingVisitor.visitElement(JavaRecursiveElementWalkingVisitor.java:41)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver$1.visitReferenceExpression(PsiReferenceExpressionImpl.java:228)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.accept(PsiReferenceExpressionImpl.java:712)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver.a(PsiReferenceExpressionImpl.java:218)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver.resolve(PsiReferenceExpressionImpl.java:196)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$OurGenericsResolver.resolve(PsiReferenceExpressionImpl.java:186)
    at com.intellij.psi.impl.source.resolve.ResolveCache$4.compute(ResolveCache.java:191)
    at com.intellij.psi.impl.source.resolve.ResolveCache$4.compute(ResolveCache.java:188)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:188)
    at com.intellij.psi.impl.PsiImplUtil.multiResolveImpl(PsiImplUtil.java:754)
    at com.intellij.psi.impl.PsiImplUtil.multiResolveImpl(PsiImplUtil.java:743)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.multiResolve(PsiReferenceExpressionImpl.java:346)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionBase.advancedResolve(PsiReferenceExpressionBase.java:86)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionBase.resolve(PsiReferenceExpressionBase.java:48)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl.resolveMethod(PsiMethodCallExpressionImpl.java:60)
    at com.intellij.psi.impl.source.resolve.graphInference.PsiPolyExpressionUtil.isPolyExpression(PsiPolyExpressionUtil.java:54)
    at com.intellij.psi.impl.source.resolve.graphInference.constraints.ExpressionCompatibilityConstraint.reduce(ExpressionCompatibilityConstraint.java:44)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.c(InferenceSession.java:1053)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.repeatInferencePhases(InferenceSession.java:1036)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.a(InferenceSession.java:373)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.b(InferenceSession.java:352)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.infer(InferenceSession.java:342)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSession.infer(InferenceSession.java:334)
    at com.intellij.psi.impl.source.resolve.graphInference.InferenceSessionContainer.infer(InferenceSessionContainer.java:135)
    at com.intellij.psi.impl.source.resolve.graphInference.PsiGraphInferenceHelper.inferTypeArguments(PsiGraphInferenceHelper.java:71)
    at com.intellij.psi.impl.source.resolve.PsiResolveHelperImpl.inferTypeArguments(PsiResolveHelperImpl.java:190)
    at com.intellij.psi.infos.MethodCandidateInfo$4.compute(MethodCandidateInfo.java:418)
    at com.intellij.psi.infos.MethodCandidateInfo$4.compute(MethodCandidateInfo.java:403)
    at com.intellij.psi.infos.MethodCandidateInfo.computeForOverloadedCandidate(MethodCandidateInfo.java:273)
    at com.intellij.psi.infos.MethodCandidateInfo.inferTypeArguments(MethodCandidateInfo.java:403)
    at com.intellij.psi.infos.MethodCandidateInfo.inferTypeArguments(MethodCandidateInfo.java:382)
    at com.intellij.psi.infos.MethodCandidateInfo.getSubstitutor(MethodCandidateInfo.java:317)
    at com.intellij.psi.infos.MethodCandidateInfo.getSubstitutor(MethodCandidateInfo.java:300)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl.captureReturnType(PsiMethodCallExpressionImpl.java:240)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl$TypeEvaluator.a(PsiMethodCallExpressionImpl.java:229)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl$TypeEvaluator.fun(PsiMethodCallExpressionImpl.java:186)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl$TypeEvaluator.fun(PsiMethodCallExpressionImpl.java:155)
    at com.intellij.psi.impl.source.resolve.JavaResolveCache.getType(JavaResolveCache.java:87)
    at com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl.getType(PsiMethodCallExpressionImpl.java:55)
    at com.intellij.codeInspection.compiler.JavacQuirksInspectionVisitor.visitVariable(JavacQuirksInspectionVisitor.java:115)
    at com.intellij.psi.JavaElementVisitor.visitLocalVariable(JavaElementVisitor.java:174)
    at com.intellij.psi.impl.source.tree.java.PsiLocalVariableImpl.accept(PsiLocalVariableImpl.java:284)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:81)
    at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:69)
    at com.intellij.codeInspection.InspectionEngine.a(InspectionEngine.java:153)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceJobLauncher.invokeConcurrentlyUnderProgress(UpsourceJobLauncher.java:61)
    at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:57)
    at com.intellij.codeInspection.InspectionEngine.inspectElements(InspectionEngine.java:166)
    at com.intellij.codeInspection.InspectionEngine.inspectEx(InspectionEngine.java:129)
    at com.jetbrains.upsource.psi.impl.intellij.inspections.InspectionsRunner.runInspections(InspectionsRunner.kt:59)
    at com.jetbrains.upsource.psi.impl.FilePsiServices$getInspectionMarkup$1$build$$inlined$runReadAction$1.compute(actions.kt:47)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceApplication.a(UpsourceApplication.java:103)
    at __.read_lock_redacted_legacyxredactedx3622ab9d72569b9e95e032450349492f93483838.__(JavaGeneratorTemplate.java:52)
    at org.jonnyzzz.stack.NamedStackFrame.frame(NamedStackFrame.java:59)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceLocksManager.runAction(UpsourceLocksManager.java:309)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceLocksManager.runAction(UpsourceLocksManager.java:280)
    at com.jetbrains.upsource.psi.impl.intellij.UpsourceApplication.runReadAction(UpsourceApplication.java:101)
    at com.jetbrains.upsource.psi.impl.FilePsiServices$getInspectionMarkup$1.build(FilePsiServices.kt:589)
    at com.jetbrains.upsource.psi.impl.FilePsiServices$getInspectionMarkup$1.build(FilePsiServices.kt:486)
    at com.jetbrains.upsource.psi.impl.FilePsiServices.a(FilePsiServices.kt:531)
    at com.jetbrains.upsource.psi.impl.FilePsiServices.getInspectionMarkup(FilePsiServices.kt:486)
    at com.jetbrains.upsource.psi.impl.commands.PsiServiceCommandFactory$getGetFileInspectionMarkupCommand$1$execute$1.invoke(PsiServiceCommandFactory.kt:83)
    at com.jetbrains.upsource.psi.impl.commands.PsiServiceCommandFactory$getGetFileInspectionMarkupCommand$1$execute$1.invoke(PsiServiceCommandFactory.kt:79)
    at com.jetbrains.upsource.psi.impl.PsiServicesFactory$withIndexedAsync$1$1.apply(PsiServicesFactory.kt:123)
    at com.jetbrains.upsource.psi.impl.PsiServicesFactory$withIndexedAsync$1$1.apply(PsiServicesFactory.kt:36)
    at com.jetbrains.upsource.stats.StatsCompanionKt$thenApplyAsyncWithStats$1$1.apply(StatsCompanion.kt:48)
    at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
    at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
    at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at com.jetbrains.upsource.util.NamedDaemonThreadFactory.a(NamedDaemonThreadFactory.java:34)
    at java.lang.Thread.run(Thread.java:745)
[2017-05-09 11:33:30,105] ERROR C: server executor-5                 s.ExpressionTypingVisitor[IDE] - Exception while analyzing expression at (40,45) in /redacted{legacy-redacted-fa39b1dd7db93083ee4cfd6e9e4a9433c79de5b9}/redacted/path/to/code/RunnerTest.kt:
mock(ObjectFactory::class.java)

 

2 comments

Hi Jim,

Lots of things regarding PSI have been reworked in the latest Upsource release. So let's start with Upsource upgrade and then see if these issues can be reproduced there.

1

Hi Artem,

Thanks for the response. We actually upgraded to the new release yesterday morning and have not had issues so far. I will keep you updated on whether this remains the case over the next few weeks.

 

thanks!

0

Please sign in to leave a comment.