Closed YevgenyFarber closed 2 years ago
Does this exception always happen? Except the version number, the new v0.14.191.8026 is same as the the one v0.13.191.8026.1 in #48 . Another difference is that recently I changed the JDK.
For the problem itself, the exception happen in intellij code, I can't find anything related. If the issue persist, please try the attached v0.14.191.8026, it is built with the same JDK as old release. intellibot.zip
with attached version below exception occure: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'baseDir' of com/millennialmedia/intellibot/psi/ref/RobotFileManager.findFileInRelativePath must not be null at com.millennialmedia.intellibot.psi.ref.RobotFileManager.$$$reportNull$$$0(RobotFileManager.java) at com.millennialmedia.intellibot.psi.ref.RobotFileManager.findFileInRelativePath(RobotFileManager.java) at com.millennialmedia.intellibot.psi.ref.RobotFileManager.findFile(RobotFileManager.java:198) at com.millennialmedia.intellibot.psi.ref.RobotFileManager.findGlobalFile(RobotFileManager.java:173) at com.millennialmedia.intellibot.psi.ref.RobotFileManager.findRobot(RobotFileManager.java:61) at com.millennialmedia.intellibot.psi.ref.RobotArgumentReference.resolveResource(RobotArgumentReference.java:69) at com.millennialmedia.intellibot.psi.ref.RobotArgumentReference.resolve(RobotArgumentReference.java:35) at com.millennialmedia.intellibot.psi.element.HeadingImpl.resolveImport(HeadingImpl.java:531) at com.millennialmedia.intellibot.psi.element.HeadingImpl.collectImportFiles(HeadingImpl.java:357) at com.millennialmedia.intellibot.psi.element.HeadingImpl.getImportedFiles(HeadingImpl.java:339) at com.millennialmedia.intellibot.psi.element.RobotFileImpl.getImportedFiles(RobotFileImpl.java:141) at com.millennialmedia.intellibot.psi.ref.ResolverUtils.resolveKeywordFromFile(ResolverUtils.java:55) at com.millennialmedia.intellibot.psi.ref.RobotArgumentReference.resolveKeyword(RobotArgumentReference.java:59) at com.millennialmedia.intellibot.psi.ref.RobotArgumentReference.resolve(RobotArgumentReference.java:41) at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:177) at com.intellij.codeInsight.TargetElementUtilBase.doGetReferenceOrReferencedElement(TargetElementUtilBase.java:165) at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:210) at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:254) at com.intellij.codeInsight.TargetElementUtilBase.doFindTargetElement(TargetElementUtilBase.java:233) at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:298) at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:147) at com.intellij.model.psi.impl.TargetsKt.fromTargetEvaluator(targets.kt:173) at com.intellij.model.psi.impl.TargetsKt.declarationsOrReferences(targets.kt:134) at com.intellij.model.psi.impl.TargetsKt.declaredReferencedData(targets.kt:41) at com.intellij.model.psi.impl.TargetsKt.targetSymbols(targets.kt:23) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.getTargetSymbols(IdentifierHighlighterPass.java:194) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.highlightReferencesAndDeclarations(IdentifierHighlighterPass.java:186) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:91) at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$updateHighlighted$1(BackgroundHighlighter.java:150) at com.intellij.codeInsight.highlighting.BackgroundHighlightingUtil.lambda$lookForInjectedFileInOtherThread$0(BackgroundHighlightingUtil.java:54) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:536) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:501) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:75) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:115) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:66) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:66) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:112) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:75) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:501) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:408) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)
The last exception happen at: VirtualFile workingDir = originalElement.getContainingFile().getOriginalFile().getVirtualFile().getParent(); PsiFile psiFile = findFileInRelativePath(workingDir, original, path, fileName, project, search, originalElement, directory); That means workingDir, i.e., getParent() return null.
Can you check your project, is any file not in any directory?
Hi,
Yes I do have files outside of directories but not .robot files, can it be fixed?
Hi,
Yes I do have files outside of directories but not .robot files, can it be fixed?
Please try attached patch v0.14.191.8026.2, it solve the 2nd exception: intellibot.zip
Now I see below:
com.intellij.psi.PsiInvalidElementAccessException: Element class com.intellij.psi.impl.source.tree.CompositeElement of type Py:CLASS_DECLARATION (class com.jetbrains.python.psi.impl.stubs.PyClassElementType) at com.intellij.psi.PsiInvalidElementAccessException.createByNode(PsiInvalidElementAccessException.java:80) at com.intellij.psi.impl.source.SubstrateRef$2.getContainingFile(SubstrateRef.java:101) at com.intellij.extapi.psi.StubBasedPsiElementBase.getContainingFile(StubBasedPsiElementBase.java:239) at com.intellij.extapi.psi.StubBasedPsiElementBase.getProject(StubBasedPsiElementBase.java:276) at com.jetbrains.python.psi.impl.PyClassImpl.notNullizeContext(PyClassImpl.java:1740) at com.jetbrains.python.psi.impl.PyClassImpl.getAncestorClasses(PyClassImpl.java:209) at com.jetbrains.python.psi.impl.PyClassImpl.visitMethods(PyClassImpl.java:987) at com.millennialmedia.intellibot.psi.ref.RobotPythonWrapper.addDefinedKeywords(RobotPythonWrapper.java:41) at com.millennialmedia.intellibot.psi.ref.RobotPythonClass.getDefinedKeywords(RobotPythonClass.java:39) at com.millennialmedia.intellibot.psi.ref.ResolverUtils.resolveKeywordFromFile(ResolverUtils.java:67) at com.millennialmedia.intellibot.psi.ref.RobotKeywordReference.resolve(RobotKeywordReference.java:31) at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:177) at com.intellij.codeInsight.TargetElementUtilBase.doGetReferenceOrReferencedElement(TargetElementUtilBase.java:165) at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:210) at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:254) at com.intellij.codeInsight.TargetElementUtilBase.doFindTargetElement(TargetElementUtilBase.java:233) at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:298) at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:147) at com.intellij.model.psi.impl.TargetsKt.fromTargetEvaluator(targets.kt:173) at com.intellij.model.psi.impl.TargetsKt.declarationsOrReferences(targets.kt:134) at com.intellij.model.psi.impl.TargetsKt.declaredReferencedData(targets.kt:41) at com.intellij.model.psi.impl.TargetsKt.targetSymbols(targets.kt:23) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.getTargetSymbols(IdentifierHighlighterPass.java:194) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.highlightReferencesAndDeclarations(IdentifierHighlighterPass.java:186) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:91) at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$updateHighlighted$1(BackgroundHighlighter.java:150) at com.intellij.codeInsight.highlighting.BackgroundHighlightingUtil.lambda$lookForInjectedFileInOtherThread$0(BackgroundHighlightingUtil.java:54) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:536) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:501) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:75) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:115) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:66) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:66) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:112) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:75) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:501) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:408) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)
intellibot v0.14.191.8026 Pycharm exception
com.intellij.psi.PsiInvalidElementAccessException: Element: class com.millennialmedia.intellibot.psi.element.HeadingImpl #Robot because: parent is null invalidated at: see attachment at com.intellij.extapi.psi.ASTDelegatePsiElement.getManager(ASTDelegatePsiElement.java:76) at com.intellij.extapi.psi.ASTDelegatePsiElement.getManager(ASTDelegatePsiElement.java:53) at com.intellij.psi.impl.PsiElementBase.getProject(PsiElementBase.java:213) at com.millennialmedia.intellibot.psi.util.PerformanceCollector.complete(PerformanceCollector.java:27) at com.millennialmedia.intellibot.psi.element.HeadingImpl.getDefinedVariables(HeadingImpl.java:135) at com.millennialmedia.intellibot.psi.element.RobotFileImpl.getOwnDefinedVariables(RobotFileImpl.java:95) at com.millennialmedia.intellibot.psi.element.RobotFileImpl.getDefinedVariables(RobotFileImpl.java:84) at com.millennialmedia.intellibot.psi.ref.ResolverUtils.resolveVariableFromFile(ResolverUtils.java:90) at com.millennialmedia.intellibot.psi.ref.RobotVariableReference.resolve(RobotVariableReference.java:31) at com.millennialmedia.intellibot.ide.inspections.compilation.RobotVariableNotFound.skip(RobotVariableNotFound.java:33) at com.millennialmedia.intellibot.ide.inspections.SimpleInspectionVisitor.visitElement(SimpleInspectionVisitor.java:23) at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:273) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:317) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:325) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:215) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:331) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:294) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$14(InspectionRunner.java:294) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:297) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:282) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:270) at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)