java.lang.AssertionError: A stub in a non-stub file

Hi,

I have a rails 3.2.13 with ruby 2.0 project that I am working on.

Since the update to ruby 2.0 Rubymine is acting weird (no code completion, slow syntaxt higlight, go to definition does not work)

I've took a look into the console and there are a bunch of errors there:

[  40588]  ERROR - currency.PrioritizedFutureTask - JetBrains RubyMine 5.4.3.2.1  Build #RM-129.861 [  40596]  ERROR - currency.PrioritizedFutureTask - JDK: 1.7.0_25 [  40596]  ERROR - currency.PrioritizedFutureTask - VM: Java HotSpot(TM) 64-Bit Server VM [  40597]  ERROR - currency.PrioritizedFutureTask - Vendor: Oracle Corporation [  40597]  ERROR - currency.PrioritizedFutureTask - OS: Linux [  40597]  ERROR - currency.PrioritizedFutureTask - Last Action: GotoDeclaration [  40597]  ERROR - currency.PrioritizedFutureTask - Original exception:   java.lang.AssertionError: A stub in a non-stub file 'file:///home/calin/.rvm/gems/ruby-2.0.0-p247@some_gemset/gems/nokogiri-1.6.0/ext/nokogiri/tmp/x86_64-linux-gnu/ports/libxslt/1.1.26/libxslt-1.1.26/tests/docbook/dtd/3.1.7/dbgenent.ent'; isValid()=true; IndexStamp=0; Type: DTD_FILE; Psi roots: [XmlFile:dbgenent.ent];  StubUpdatingIndex.canHaveStub(vFile)=false content:<<< <!-- ====================================================================== --> <!-- DocBk XML Additional General Entities V3.1.7      Part of the DocBk XML V3.1.7 DTD      http://nwalsh.com/docbook/x... >>>; stubs=[PsiFileStubImpl, RClassStub:ApplicationController, RConstantStubImpl, RConstantStubImpl]      at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:663)      at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:43)      at com.intellij.psi.stubs.StubIndexImpl$2.perform(StubIndexImpl.java:240)      at com.intellij.psi.stubs.StubIndexImpl$2.perform(StubIndexImpl.java:232)      at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)      at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:232)      at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:205)      at org.jetbrains.plugins.ruby.ruby.lang.psi.indexes.RubyClassModuleNameIndex$1.compute(RubyClassModuleNameIndex.java:31)      at org.jetbrains.plugins.ruby.ruby.lang.psi.indexes.RubyClassModuleNameIndex$1.compute(RubyClassModuleNameIndex.java:29)      at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:950)      at org.jetbrains.plugins.ruby.ruby.lang.psi.indexes.RubyClassModuleNameIndex.find(RubyClassModuleNameIndex.java:29)      at org.jetbrains.plugins.ruby.ruby.codeInsight.RubyFQNUtil$1.compute(RubyFQNUtil.java:84)      at org.jetbrains.plugins.ruby.ruby.codeInsight.RubyFQNUtil$1.compute(RubyFQNUtil.java:76)      at org.jetbrains.plugins.ruby.rails.codeInsight.cache.FQNCache.get(FQNCache.java:29)      at org.jetbrains.plugins.ruby.ruby.codeInsight.RubyFQNUtil.findContainersByFQN(RubyFQNUtil.java:76)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.SymbolUtil.findSymbol(SymbolUtil.java:289)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.SymbolUtil.findSymbol(SymbolUtil.java:238)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.SymbolUtil.findSymbol(SymbolUtil.java:226)      at org.jetbrains.plugins.ruby.ruby.lang.psi.impl.controlStructures.classes.RClassBase.a(RClassBase.java:84)      at org.jetbrains.plugins.ruby.ruby.lang.psi.impl.controlStructures.classes.RClassBase.resolveSuperClassSymbol(RClassBase.java:69)      at org.jetbrains.plugins.ruby.ruby.lang.psi.impl.controlStructures.classes.RClassBase.resolveSuperClass(RClassBase.java:93)      at org.jetbrains.plugins.ruby.rails.codeInsight.symbols.v2.ViewSymbol.a(ViewSymbol.java:146)      at org.jetbrains.plugins.ruby.rails.codeInsight.symbols.v2.ViewSymbol.a(ViewSymbol.java:102)      at org.jetbrains.plugins.ruby.rails.codeInsight.symbols.v2.ViewSymbol.processChildrenInner(ViewSymbol.java:60)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.v2.TopLevelSymbol$1.processChildren(TopLevelSymbol.java:46)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.ChildrenImpl.getSymbolByNameAndTypes(ChildrenImpl.java:56)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.ChildrenImpl.getSymbolByNameAndType(ChildrenImpl.java:76)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.util.SymbolScopeUtil.processSymbolScopeRec(SymbolScopeUtil.java:180)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.util.TopLevelSymbolScopeUtil.a(TopLevelSymbolScopeUtil.java:86)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.util.TopLevelSymbolScopeUtil.processTopLevelSymbolWithCaching(TopLevelSymbolScopeUtil.java:59)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.util.SymbolScopeUtil.b(SymbolScopeUtil.java:131)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.util.SymbolScopeUtil.a(SymbolScopeUtil.java:67)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.util.SymbolScopeUtil.access$000(SymbolScopeUtil.java:36)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.util.SymbolScopeUtil$1.compute(SymbolScopeUtil.java:56)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.util.SymbolScopeUtil$1.compute(SymbolScopeUtil.java:52)      at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:110)      at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.util.SymbolScopeUtil.processSymbolChildren(SymbolScopeUtil.java:52)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.SymbolUtil.findSymbolInHierarchy(SymbolUtil.java:531)      at org.jetbrains.plugins.ruby.ruby.codeInsight.types.impl.RSymbolTypeImpl.getMemberForName(RSymbolTypeImpl.java:57)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.SymbolUtil.findSymbol(SymbolUtil.java:333)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.SymbolUtil.findSymbol(SymbolUtil.java:238)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.SymbolUtil.findSymbol(SymbolUtil.java:210)      at org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.SymbolUtil.findSymbolInContext(SymbolUtil.java:436)      at org.jetbrains.plugins.ruby.ruby.codeInsight.references.RPsiPolyVariantReferenceBase.resolveToSymbol(RPsiPolyVariantReferenceBase.java:152)      at org.jetbrains.plugins.ruby.ruby.codeInsight.references.RPsiPolyVariantReferenceBase.resolveToSymbol(RPsiPolyVariantReferenceBase.java:140)      at org.jetbrains.plugins.ruby.ruby.codeInsight.references.RIdentifierReference.resolveToSymbol(RIdentifierReference.java:36)      at org.jetbrains.plugins.ruby.ruby.codeInsight.references.RPsiPolyVariantReferenceBase.multiResolveInner(RPsiPolyVariantReferenceBase.java:86)      at org.jetbrains.plugins.ruby.ruby.codeInsight.references.RPsiPolyVariantReferenceBase$MyResolver.resolve(RPsiPolyVariantReferenceBase.java:178)      at org.jetbrains.plugins.ruby.ruby.codeInsight.references.RPsiPolyVariantReferenceBase$MyResolver.resolve(RPsiPolyVariantReferenceBase.java:173)      at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:104)      at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:132)      at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:124)      at org.jetbrains.plugins.ruby.ruby.codeInsight.references.RPsiPolyVariantReferenceBase.multiResolve(RPsiPolyVariantReferenceBase.java:75)      at org.jetbrains.plugins.ruby.ruby.codeInsight.resolve.ResolveUtil.resolveToSymbolWithCaching(ResolveUtil.java:158)      at org.jetbrains.plugins.ruby.ruby.codeInsight.paramDefs.matcher.ParamDefMatcher.match(ParamDefMatcher.java:81)      at org.jetbrains.plugins.ruby.ruby.codeInsight.paramDefs.matcher.ParamDefMatcher.match(ParamDefMatcher.java:41)      at org.jetbrains.plugins.ruby.ruby.codeInsight.paramDefs.matcher.ParamDefMatcher.createParamDefReference(ParamDefMatcher.java:107)      at org.jetbrains.plugins.ruby.ruby.lang.psi.impl.basicTypes.stringLiterals.RStringLiteralBase.getReference(RStringLiteralBase.java:86)      at com.intellij.psi.impl.SharedPsiElementImplUtil.getReferences(SharedPsiElementImplUtil.java:82)      at com.intellij.psi.impl.PsiElementBase.getReferences(PsiElementBase.java:83)      at com.intellij.psi.impl.SharedPsiElementImplUtil.a(SharedPsiElementImplUtil.java:67)      at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:49)      at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.findReferenceAt(MultiplePsiFilesPerDocumentFileViewProvider.java:171)      at com.intellij.psi.impl.source.PsiFileImpl.findReferenceAt(PsiFileImpl.java:567)      at com.intellij.codeInsight.TargetElementUtilBase.findReference(TargetElementUtilBase.java:114)      at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:302)      at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:201)      at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:97)      at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:62)      at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:357)      at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1182)      at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:348)      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:226)      at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:345)      at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:321)      at com.intellij.concurrency.JobLauncherImpl$3.call(JobLauncherImpl.java:145)      at com.intellij.concurrency.JobLauncherImpl$3.call(JobLauncherImpl.java:142)      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)      at java.util.concurrent.FutureTask.run(FutureTask.java:166)      at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)      at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)      at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)      at java.lang.Thread.run(Thread.java:724)


Do you think this is causing the weid behaviours?

Regards,

2 comments

I'd suggest to try to invalidate RM's caches (File|Invalidate caches).

Hope this helps, Oleg.

0

@Oleg

Thank you!

This did the trick!

0

Please sign in to leave a comment.