Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.Exception #449

Closed
DmitryOlshansky opened this issue Dec 29, 2022 · 1 comment
Closed

java.lang.Exception #449

DmitryOlshansky opened this issue Dec 29, 2022 · 1 comment

Comments

@DmitryOlshansky
Copy link

Bug description

Exception after checking out a branch which is a few commits older.

Environment

  • detekt Idea Version: 1.22.0
  • Platform Version: 2022.3
  • Platform Vendor: JetBrains s.r.o.
  • Java Version: 17.0.5
  • OS Name: Linux

Stacktrace

java.lang.Exception
	at com.intellij.psi.stubs.StubTreeLoaderImpl.diagnoseLengthMismatch(StubTreeLoaderImpl.java:191)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.checkLengthMatch(StubTreeLoaderImpl.java:157)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.readFromVFile(StubTreeLoaderImpl.java:124)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:49)
	at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:634)
	at com.intellij.psi.impl.source.PsiFileImpl.getStub(PsiFileImpl.java:597)
	at org.jetbrains.kotlin.psi.KtFile.getStub(KtFile.kt:195)
	at org.jetbrains.kotlin.psi.KtFile.getPackageFqName(KtFile.kt:91)
	at org.jetbrains.kotlin.idea.vfilefinder.KotlinPartialPackageNamesIndex.toPackageFqName(KotlinPartialPackageNamesIndex.kt:59)
	at org.jetbrains.kotlin.idea.vfilefinder.KotlinPartialPackageNamesIndex.getIndexer$lambda-2(KotlinPartialPackageNamesIndex.kt:68)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapByIndexer(MapReduceIndex.java:317)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:308)
	at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:176)
	at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:40)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInputAndPrepareUpdate(MapReduceIndex.java:253)
	at com.intellij.indexing.composite.CompositeInvertedIndexBase.updateBaseIndex(CompositeInvertedIndexBase.java:284)
	at com.intellij.indexing.composite.CompositeInvertedIndexBase.mapInputAndPrepareUpdate(CompositeInvertedIndexBase.java:62)
	at com.intellij.indexing.composite.CompositeInvertedIndexBase.mapInputAndPrepareUpdate(CompositeInvertedIndexBase.java:28)
	at com.intellij.util.indexing.FileBasedIndexImpl.updateIndexInNonCancellableSection(FileBasedIndexImpl.java:1047)
	at com.intellij.util.indexing.FileBasedIndexImpl.lambda$indexUnsavedDocument$16(FileBasedIndexImpl.java:1021)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyWithProvidedValueIn(FileTypeManagerImpl.java:670)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:653)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexUnsavedDocument(FileBasedIndexImpl.java:1009)
	at com.intellij.util.indexing.RegisteredIndexes$DocumentUpdateTask.doProcess(RegisteredIndexes.java:182)
	at com.intellij.util.indexing.RegisteredIndexes$DocumentUpdateTask.doProcess(RegisteredIndexes.java:173)
	at com.intellij.util.indexing.UpdateTask.process(UpdateTask.java:63)
	at com.intellij.util.indexing.UpdateTask.processAll(UpdateTask.java:32)
	at com.intellij.util.indexing.FileBasedIndexImpl.lambda$indexUnsavedDocuments$15(FileBasedIndexImpl.java:976)
	at com.intellij.util.indexing.StorageBufferingHandler.runUpdate(StorageBufferingHandler.java:22)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexUnsavedDocuments(FileBasedIndexImpl.java:976)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:810)
	at com.intellij.util.indexing.FileBasedIndexEx.processExceptions(FileBasedIndexEx.java:322)
	at com.intellij.util.indexing.FileBasedIndexEx.processValueIterator(FileBasedIndexEx.java:443)
	at com.intellij.util.indexing.FileBasedIndexEx.processValuesInScope(FileBasedIndexEx.java:403)
	at com.intellij.util.indexing.FileBasedIndexImpl.processValuesInScope(FileBasedIndexImpl.java:1123)
	at com.intellij.util.indexing.FileBasedIndexEx.processValues(FileBasedIndexEx.java:301)
	at com.intellij.util.indexing.FileBasedIndexEx.processValues(FileBasedIndexEx.java:289)
	at org.jetbrains.kotlin.idea.base.indices.KotlinPackageIndexUtils.packageExists(KotlinPackageIndexUtils.kt:38)
	at org.jetbrains.kotlin.idea.caches.PerModulePackageCacheService.packageExists(PerModulePackageCacheService.kt:321)
	at org.jetbrains.kotlin.idea.stubindex.resolve.PluginDeclarationProviderFactory.stubBasedPackageExists(PluginDeclarationProviderFactory.kt:51)
	at org.jetbrains.kotlin.idea.stubindex.resolve.PluginDeclarationProviderFactory.packageExists(PluginDeclarationProviderFactory.kt:46)
	at org.jetbrains.kotlin.resolve.lazy.declarations.AbstractDeclarationProviderFactory.getPackageMemberDeclarationProvider(AbstractDeclarationProviderFactory.java:41)
	at org.jetbrains.kotlin.resolve.lazy.ResolveSession.getPackageFragment(ResolveSession.java:258)
	at org.jetbrains.kotlin.resolve.lazy.ResolveSession.getPackageFragmentOrDiagnoseFailure(ResolveSession.java:273)
	at org.jetbrains.kotlin.resolve.lazy.FileScopeFactory.createScopesForFile(FileScopeFactory.kt:63)
	at org.jetbrains.kotlin.resolve.lazy.FileScopeFactory.createScopesForFile$default(FileScopeFactory.kt:61)
	at org.jetbrains.kotlin.resolve.lazy.FileScopeProviderImpl$cache$1.invoke(FileScopeProvider.kt:48)
	at org.jetbrains.kotlin.resolve.lazy.FileScopeProviderImpl$cache$1.invoke(FileScopeProvider.kt:46)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:578)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:651)
	at org.jetbrains.kotlin.resolve.lazy.FileScopeProviderImpl.getFileScopes(FileScopeProvider.kt:53)
	at org.jetbrains.kotlin.resolve.lazy.FileScopeProvider.getFileResolutionScope(FileScopeProvider.kt:30)
	at org.jetbrains.kotlin.resolve.lazy.ResolveSession.createAnnotations(ResolveSession.java:243)
	at org.jetbrains.kotlin.resolve.lazy.ResolveSession.lambda$new$0(ResolveSession.java:232)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:578)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:651)
	at org.jetbrains.kotlin.resolve.lazy.ResolveSession.getFileAnnotations(ResolveSession.java:379)
	at org.jetbrains.kotlin.idea.project.ResolveElementCache.ensureFileAnnotationsResolved(ResolveElementCache.kt:343)
	at org.jetbrains.kotlin.idea.project.ResolveElementCache.resolveToElement(ResolveElementCache.kt:277)
	at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl$analyze$3.invoke(ModuleResolutionFacadeImpl.kt:53)
	at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl$analyze$3.invoke(ModuleResolutionFacadeImpl.kt:52)
	at com.intellij.openapi.progress.impl.CancellationCheck.withCancellationCheck(CancellationCheck.kt:59)
	at com.intellij.openapi.progress.impl.CancellationCheck$Companion.runWithCancellationCheck(CancellationCheck.kt:105)
	at org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt.runWithCancellationCheck(ApplicationUtils.kt:56)
	at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl.analyze(ModuleResolutionFacadeImpl.kt:52)
	at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeWithDebugInfo.analyze(ResolutionFacadeWithDebugInfo.kt:44)
	at org.jetbrains.kotlin.idea.caches.resolve.ExtendedResolutionApiKt.analyze(ExtendedResolutionApi.kt:124)
	at org.jetbrains.kotlin.idea.caches.resolve.ExtendedResolutionApiKt.safeAnalyzeNonSourceRootCode(ExtendedResolutionApi.kt:158)
	at org.jetbrains.kotlin.idea.caches.resolve.ExtendedResolutionApiKt.safeAnalyzeNonSourceRootCode(ExtendedResolutionApi.kt:152)
	at org.jetbrains.kotlin.idea.references.KtFe10ReferenceResolutionHelperImpl.partialAnalyze(KtFe10ReferenceResolutionHelperImpl.kt:48)
	at org.jetbrains.kotlin.references.fe10.base.KtFe10PolyVariantResolver.resolveToPsiElements(KtFe10PolyVariantResolver.kt:27)
	at org.jetbrains.kotlin.references.fe10.base.KtFe10PolyVariantResolver.resolve(KtFe10PolyVariantResolver.kt:73)
	at org.jetbrains.kotlin.references.fe10.base.KtFe10PolyVariantResolver.resolve(KtFe10PolyVariantResolver.kt:22)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolveWithCaching$1(ResolveCache.java:161)
	at com.intellij.openapi.util.Computable.get(Computable.java:16)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:237)
	at com.intellij.openapi.util.Computable.get(Computable.java:16)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:215)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:160)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:147)
	at org.jetbrains.kotlin.idea.references.AbstractKtReference.multiResolve(KtReference.kt:32)
	at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.resolves(PsiMultiReference.java:51)
	at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.lambda$static$0(PsiMultiReference.java:35)
	at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
	at java.base/java.util.TimSort.sort(TimSort.java:220)
	at java.base/java.util.Arrays.sort(Arrays.java:1233)
	at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.chooseReference(PsiMultiReference.java:70)
	at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.resolve(PsiMultiReference.java:134)
	at org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinTargetElementEvaluator.getElementByReference(KotlinTargetElementEvaluator.kt:61)
	at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:172)
	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.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getPsiElementIn(TextEditorPsiDataProvider.java:235)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getSlowData(TextEditorPsiDataProvider.java:145)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.lambda$getData$0(TextEditorPsiDataProvider.java:72)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromProviderInner(DataManagerImpl.java:241)
	at com.intellij.ide.impl.DataManagerImpl.getSlowData(DataManagerImpl.java:225)
	at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRuleInner$6(DataManagerImpl.java:177)
	at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRuleInner$8(DataManagerImpl.java:182)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromRuleInner(DataManagerImpl.java:112)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromRulesInner(DataManagerImpl.java:99)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromProviderAndRulesInner(DataManagerImpl.java:85)
	at com.intellij.ide.impl.DataManagerImpl.lambda$getDataFromRuleInner$3(DataManagerImpl.java:113)
	at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:68)
	at com.intellij.ide.impl.dataRules.NavigatableRule.getData(NavigatableRule.java:39)
	at com.intellij.ide.impl.DataManagerImpl.getRulesData(DataManagerImpl.java:210)
	at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRuleInner$8(DataManagerImpl.java:183)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromRuleInner(DataManagerImpl.java:112)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromRulesInner(DataManagerImpl.java:99)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromProviderAndRulesInner(DataManagerImpl.java:85)
	at com.intellij.ide.impl.DataManagerImpl.lambda$getDataFromRuleInner$3(DataManagerImpl.java:113)
	at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:68)
	at com.intellij.ide.impl.dataRules.NavigatableArrayRule.getData(NavigatableArrayRule.java:23)
	at com.intellij.ide.impl.DataManagerImpl.getRulesData(DataManagerImpl.java:210)
	at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRuleInner$8(DataManagerImpl.java:183)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromRuleInner(DataManagerImpl.java:112)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromRulesInner(DataManagerImpl.java:99)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromRules(DataManagerImpl.java:67)
	at com.intellij.openapi.actionSystem.impl.PreCachedDataContext.getDataInner(PreCachedDataContext.java:224)
	at com.intellij.openapi.actionSystem.impl.PreCachedDataContext.getData(PreCachedDataContext.java:166)
	at com.intellij.openapi.actionSystem.DataContext.getData(DataContext.java:42)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$ensureSlowDataKeysPreCached$20(ActionUpdater.java:471)
	at com.intellij.diagnostic.telemetry.TraceKt.runWithSpan(trace.kt:74)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.ensureSlowDataKeysPreCached(ActionUpdater.java:466)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$6(ActionUpdater.java:201)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1086)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:201)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:161)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:137)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:124)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:705)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:556)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:309)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$14(ActionUpdater.java:377)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$15(ActionUpdater.java:396)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1086)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$tryRunReadActionAndCancelBeforeWrite$19(ActionUpdater.java:428)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.tryRunReadActionAndCancelBeforeWrite(ActionUpdater.java:424)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$16(ActionUpdater.java:396)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:190)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:591)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:666)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:622)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:590)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:177)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:365)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$17(ActionUpdater.java:395)
	at io.opentelemetry.context.Context.lambda$wrap$1(Context.java:212)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:243)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:216)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:205)
	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)
@arturbosch
Copy link
Member

Duplicate of #271

@arturbosch arturbosch marked this as a duplicate of #271 Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants