Indexing fails on project import

Issue #83 resolved
Brett Harrop
created an issue

When importing a Pascal project/starting IntelliJ IDEA with a Pascal project open, I get the following error.

Plugin

Version: 1.951

Environment

IntelliJ IDEA 2018.2.5 (Ultimate Edition)
Build #IU-182.4892.20, built on October 16, 2018
JRE: 1.8.0_152-release-1248-b19 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.12.6

Stacktrace

com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
    at com.intellij.openapi.project.IndexNotReadyException.create(IndexNotReadyException.java:77)
    at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:774)
    at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:723)
    at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:706)
    at com.intellij.psi.stubs.StubIndexImpl.doProcessStubs(StubIndexImpl.java:336)
    at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:312)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:145)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:134)
    at com.siberika.idea.pascal.lang.references.ResolveUtil.findUnitsWithStub(ResolveUtil.java:84)
    at com.siberika.idea.pascal.lang.psi.impl.PascalModuleImpl.addUnits(PascalModuleImpl.java:224)
    at com.siberika.idea.pascal.lang.psi.impl.PascalModuleImpl.getPublicUnits(PascalModuleImpl.java:211)
    at com.siberika.idea.pascal.lang.references.PasReferenceUtil.addFirstNamespaces(PasReferenceUtil.java:627)
    at com.siberika.idea.pascal.lang.references.PasReferenceUtil.resolve(PasReferenceUtil.java:395)
    at com.siberika.idea.pascal.lang.references.PasReferenceUtil.resolveTypeScope(PasReferenceUtil.java:322)
    at com.siberika.idea.pascal.lang.psi.impl.PasStubStructTypeImpl.addDefaultScopes(PasStubStructTypeImpl.java:391)
    at com.siberika.idea.pascal.lang.psi.impl.PasStubStructTypeImpl.calcParentScopes(PasStubStructTypeImpl.java:349)
    at com.siberika.idea.pascal.lang.psi.impl.PasStubStructTypeImpl.getParentScope(PasStubStructTypeImpl.java:320)
    at com.siberika.idea.pascal.ide.actions.GotoSuper.retrieveParentInterfaces(GotoSuper.java:89)
    at com.siberika.idea.pascal.lang.psi.impl.PascalNamedStubElement.isLocal(PascalNamedStubElement.java:140)
    at com.siberika.idea.pascal.lang.stub.PasExportedRoutineStubElementType.createStub(PasExportedRoutineStubElementType.java:50)
    at com.siberika.idea.pascal.lang.stub.PasExportedRoutineStubElementType.createStub(PasExportedRoutineStubElementType.java:26)
    at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.createStub(DefaultStubBuilder.java:113)
    at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.visitNode(DefaultStubBuilder.java:88)
    at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.buildStubTree(DefaultStubBuilder.java:83)
    at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTreeFor(DefaultStubBuilder.java:58)
    at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTree(DefaultStubBuilder.java:39)
    at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:84)
    at com.intellij.psi.stubs.StubUpdatingIndex$3.lambda$map$0(StubUpdatingIndex.java:232)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:925)
    at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:214)
    at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:197)
    at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:273)
    at com.intellij.util.indexing.VfsAwareMapReduceIndex.calculateUpdateData(VfsAwareMapReduceIndex.java:97)
    at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:213)
    at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1668)
    at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$25(FileBasedIndexImpl.java:1596)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:519)
    at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1555)
    at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1543)
    at com.intellij.util.indexing.UnindexedFilesUpdater.lambda$indexFiles$0(UnindexedFilesUpdater.java:110)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$0(CacheUpdateRunner.java:230)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1161)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$1(CacheUpdateRunner.java:246)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.run(CacheUpdateRunner.java:243)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Comments (9)

  1. Andrei Moraru

    I'm having an issue and I think that is the same kind.

    It occurs when I'm opening a big Delphi 7 project (it's a mixed technology between Delphi and Flash/ActionScript) and more precisely when I'm opening the project view and selecting a folder containing .pas files.

    com/intellij/psi/ClassFileViewProvider java.lang.NoClassDefFoundError: com/intellij/psi/ClassFileViewProvider at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.lang.ClassLoader.defineClass(ClassLoader.java:642) at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:278) at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:274) at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:243) at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:142) at com.intellij.ide.plugins.cl.PluginClassLoader.a(PluginClassLoader.java:74) at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:61) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at com.siberika.idea.pascal.lang.compiled.PPUViewProviderFactory.createFileViewProvider(PPUViewProviderFactory.java:18) at com.intellij.psi.impl.file.impl.FileManagerImpl.createFileViewProvider(FileManagerImpl.java:245) at com.intellij.psi.impl.file.impl.FileManagerImpl.findViewProvider(FileManagerImpl.java:200) at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:345) at com.intellij.psi.impl.PsiManagerImpl.findFile(PsiManagerImpl.java:183) at com.intellij.packageDependencies.ui.FileNode.a(FileNode.java:130) at com.intellij.packageDependencies.ui.FileNode.getPsiElement(FileNode.java:85) at com.intellij.ide.scopeView.ScopeTreeViewPanel$MyTreeCellRenderer.customizeCellRenderer(ScopeTreeViewPanel.java:499) at com.intellij.ui.ColoredTreeCellRenderer.getTreeCellRendererComponent(ColoredTreeCellRenderer.java:106) at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2807) at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:492) at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1360) at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1496) at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1288) at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(VariableHeightLayoutCache.java:984) at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(VariableHeightLayoutCache.java:182) at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(BasicTreeUI.java:1696) at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(BasicTreeUI.java:3805) at javax.swing.JTree.fireTreeExpanded(JTree.java:2764) at javax.swing.JTree.setExpandedState(JTree.java:3629) at javax.swing.JTree.expandPath(JTree.java:2212) at com.intellij.ide.util.treeView.TreeState$JTreeFacade.expand(TreeState.java:383) at com.intellij.ide.util.treeView.TreeState.expandImpl(TreeState.java:335) at com.intellij.ide.util.treeView.TreeState.access$600(TreeState.java:64) at com.intellij.ide.util.treeView.TreeState$3.perform(TreeState.java:349) at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36) at com.intellij.openapi.util.ActionCallback$ExecutedExecutionCallback.doWhenExecuted(ActionCallback.java:177) at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:111) at com.intellij.ide.util.treeView.TreeState.expandImpl(TreeState.java:335) at com.intellij.ide.util.treeView.TreeState.access$600(TreeState.java:64) at com.intellij.ide.util.treeView.TreeState$3.perform(TreeState.java:349) at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36) at com.intellij.openapi.util.ActionCallback$ExecutedExecutionCallback.doWhenExecuted(ActionCallback.java:177) at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:111) at com.intellij.ide.util.treeView.TreeState.expandImpl(TreeState.java:335) at com.intellij.ide.util.treeView.TreeState.access$600(TreeState.java:64) at com.intellij.ide.util.treeView.TreeState$3.perform(TreeState.java:349) at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36) at com.intellij.openapi.util.ActionCallback$ExecutedExecutionCallback.doWhenExecuted(ActionCallback.java:177) at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:111) at com.intellij.ide.util.treeView.TreeState.expandImpl(TreeState.java:335) at com.intellij.ide.util.treeView.TreeState.access$600(TreeState.java:64) at com.intellij.ide.util.treeView.TreeState$3.perform(TreeState.java:349) at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36) at com.intellij.openapi.util.ActionCallback$ExecutedExecutionCallback.doWhenExecuted(ActionCallback.java:177) at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:111) at com.intellij.ide.util.treeView.TreeState.expandImpl(TreeState.java:335) at com.intellij.ide.util.treeView.TreeState.applyExpandedTo(TreeState.java:278) at com.intellij.ide.util.treeView.TreeState.access$200(TreeState.java:64) at com.intellij.ide.util.treeView.TreeState$1.lambda$perform$0(TreeState.java:255) at com.intellij.ide.util.treeView.TreeState$JTreeFacade.batch(TreeState.java:397) at com.intellij.ide.util.treeView.TreeState$1.perform(TreeState.java:255) at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36) at com.intellij.openapi.util.ExecutionCallback.setExecuted(ExecutionCallback.java:58) at com.intellij.openapi.util.ActionCallback.setDone(ActionCallback.java:72) at com.intellij.ide.scopeView.ScopeTreeViewPanel.c(ScopeTreeViewPanel.java:327) at com.intellij.packageDependencies.ui.FileTreeModelBuilder$1.onSuccess(FileTreeModelBuilder.java:173) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494) at com.intellij.openapi.progress.impl.CoreProgressManager.access$000(CoreProgressManager.java:35) at com.intellij.openapi.progress.impl.CoreProgressManager$4.a(CoreProgressManager.java:413) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:447) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:431) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:415) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:732) at com.intellij.ide.IdeEventQueue.n(IdeEventQueue.java:779) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:720) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: java.lang.ClassNotFoundException: com.intellij.psi.ClassFileViewProvider PluginClassLoader[com.siberika.idea.pascal, 1.951] com.intellij.ide.plugins.cl.PluginClassLoader@6e8e2759 at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 91 more

    java.lang.NoClassDefFoundError: com/siberika/idea/pascal/lang/compiled/PPUViewProvider at com.siberika.idea.pascal.lang.compiled.PPUViewProviderFactory.createFileViewProvider(PPUViewProviderFactory.java:18) at com.intellij.psi.impl.file.impl.FileManagerImpl.createFileViewProvider(FileManagerImpl.java:245) at com.intellij.psi.impl.file.impl.FileManagerImpl.findViewProvider(FileManagerImpl.java:200) at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:345) at com.intellij.psi.impl.PsiManagerImpl.findFile(PsiManagerImpl.java:183) at com.intellij.packageDependencies.ui.FileNode.a(FileNode.java:130) at com.intellij.packageDependencies.ui.FileNode.getPsiElement(FileNode.java:85) at com.intellij.ide.scopeView.ScopeTreeViewPanel$MyTreeCellRenderer.customizeCellRenderer(ScopeTreeViewPanel.java:499) at com.intellij.ui.ColoredTreeCellRenderer.getTreeCellRendererComponent(ColoredTreeCellRenderer.java:106) at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2807) at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:492) at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1360) at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.getXOrigin(VariableHeightLayoutCache.java:1143) at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.getNodeBounds(VariableHeightLayoutCache.java:1130) at javax.swing.tree.VariableHeightLayoutCache.getBounds(VariableHeightLayoutCache.java:220) at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:529) at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1192) at com.intellij.util.ui.tree.WideSelectionTreeUI.paint(WideSelectionTreeUI.java:377) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161) at javax.swing.JComponent.paintComponent(JComponent.java:780) at com.intellij.ui.treeStructure.Tree.paintComponent(Tree.java:346) at javax.swing.JComponent.paint(JComponent.java:1057) at com.intellij.ui.treeStructure.Tree.paint(Tree.java:260) at javax.swing.JComponent.paintChildren(JComponent.java:890) at javax.swing.JComponent.paint(JComponent.java:1066) at javax.swing.JViewport.paint(JViewport.java:737) at com.intellij.ui.components.JBViewport.paint(JBViewport.java:234) at javax.swing.JComponent.paintChildren(JComponent.java:890) at javax.swing.JComponent.paint(JComponent.java:1066) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5211) at javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1604) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1516) at javax.swing.RepaintManager.paint(RepaintManager.java:1283) at javax.swing.JComponent._paintImmediately(JComponent.java:5159) at javax.swing.JComponent.paintImmediately(JComponent.java:4970) at javax.swing.RepaintManager$4.run(RepaintManager.java:842) at javax.swing.RepaintManager$4.run(RepaintManager.java:825) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:825) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:800) at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:749) at javax.swing.RepaintManager.access$1200(RepaintManager.java:71) at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1851) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:732) at com.intellij.ide.IdeEventQueue.n(IdeEventQueue.java:779) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:720) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

  2. Geo B repo owner

    Brett Harrop, there is an issue with index building. Will release a fixed version soon. For now you can install the updated version from site.

    Andrei Moraru, your problem is different. Please create new issue with details on version of JetBrains product you are using. Seems it's not IDEA.

  3. Brett Harrop reporter

    It did help. The only thing I saw was an issue indexing a dcu file, but since that's a compiled file, it doesn't seem to cause any issues. I don't know if it should be indexing those files anyway. But everything seems to be working in terms of intellisense at this point.

    Thanks!

  4. Log in to comment