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

IDE Fatal error when i scrolling main.rs #677

Closed
LooMaclin opened this issue Sep 21, 2016 · 3 comments
Closed

IDE Fatal error when i scrolling main.rs #677

LooMaclin opened this issue Sep 21, 2016 · 3 comments

Comments

@LooMaclin
Copy link

IDE Fatal error when i scrolling main.rs with stacktrace:

PSI and index do not match
Please report the problem to JetBrains with the file attached
 file=FILE, file.class=class org.rust.lang.core.psi.impl.RustFile, file.lang=Language: Rust, modStamp=16
 tree consistent
 stub debugInfo=created in calcStubTree; with backReference
 document before=null
latestIndexedStub=null
 viewProvider=SingleRootFileViewProvider{myVirtualFile=file:///home/loomaclin/IdeaProjects/grid_rs/src/main.rs, content=VirtualFileContent{size=834}}
 viewProvider stamp: 813; file stamp: 813; file modCount: 1474487292787; file length: 834
 doc saved: true; doc stamp: 813; doc size: 834; committed: true
in many projects: false
indexing info: indexed at 1474487292787 with size 6469
java.lang.Throwable
    at com.intellij.psi.impl.DebugUtil.currentStackTrace(DebugUtil.java:501)
    at com.intellij.psi.stubs.StubProcessingHelper.stubTreeAndIndexDoNotMatch(StubProcessingHelper.java:38)
    at com.intellij.psi.stubs.StubProcessingHelperBase.inconsistencyDetected(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.intellij.psi.stubs.StubIndexImpl$2.process(StubIndexImpl.java:324)
    at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.perform(StubIndexImpl.java:675)
    at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.perform(StubIndexImpl.java:663)
    at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:81)
    at com.intellij.psi.stubs.StubIndexImpl.doProcessStubs(StubIndexImpl.java:350)
    at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:316)
    at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:305)
    at org.rust.lang.core.resolve.indexes.RustImplIndex.findInherentImplsForInternal(RustImplIndex.kt:81)
    at org.rust.lang.core.resolve.indexes.RustImplIndex.findImplsFor(RustImplIndex.kt:46)
    at org.rust.lang.core.resolve.indexes.RustImplIndex.findMethodsFor(RustImplIndex.kt:41)
    at org.rust.lang.core.resolve.indexes.RustImplIndex.findStaticMethodsFor(RustImplIndex.kt:37)
    at org.rust.lang.core.resolve.RustScopeVisitor.staticMethods(RustResolveEngine.kt:467)
    at org.rust.lang.core.resolve.RustScopeVisitor.access$staticMethods(RustResolveEngine.kt:300)
    at org.rust.lang.core.resolve.RustScopeVisitor$visitStructItem$1.invoke(RustResolveEngine.kt:352)
    at org.rust.lang.core.resolve.RustScopeVisitor$visitStructItem$1.invoke(RustResolveEngine.kt:300)
    at org.rust.lang.core.psi.visitors.RustComputingVisitor.set(RustComputingVisitor.kt:36)
    at org.rust.lang.core.resolve.RustScopeVisitor.visitStructItem(RustResolveEngine.kt:351)
    at org.rust.lang.core.psi.impl.RustStructItemElementImpl.accept(RustStructItemElementImpl.java:27)
    at org.rust.lang.core.psi.impl.RustStructItemElementImpl.accept(RustStructItemElementImpl.java:31)
    at org.rust.lang.core.psi.visitors.RustComputingVisitor.compute(RustComputingVisitor.kt:27)
    at org.rust.lang.core.resolve.RustResolveEngineKt$declarations$$inlined$Sequence$1.iterator(Sequences.kt:591)
    at org.rust.lang.core.resolve.RustResolveEngineKt.resolveInside(RustResolveEngine.kt:248)
    at org.rust.lang.core.resolve.RustResolveEngineKt.access$resolveInside(RustResolveEngine.kt:1)
    at org.rust.lang.core.resolve.RustResolveEngine$resolve$1.compute(RustResolveEngine.kt:94)
    at org.rust.lang.core.resolve.RustResolveEngine$resolve$1.compute(RustResolveEngine.kt:36)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
    at org.rust.ide.utils.PlatformUtilsKt.recursionGuard(PlatformUtils.kt:14)
    at org.rust.ide.utils.PlatformUtilsKt.recursionGuard$default(PlatformUtils.kt:13)
    at org.rust.lang.core.resolve.RustResolveEngine.resolve(RustResolveEngine.kt:94)
    at org.rust.lang.core.resolve.ref.RustPathReferenceImpl.resolveVerbose(RustPathReferenceImpl.kt:18)
    at org.rust.lang.core.resolve.ref.RustReferenceBase$resolve$1.invoke(RustReferenceBase.kt:30)
    at org.rust.lang.core.resolve.ref.RustReferenceBase$resolve$1.invoke(RustReferenceBase.kt:15)
    at org.rust.lang.core.resolve.ref.RustReferenceBase$cache$1.resolve(RustReferenceBase.kt:55)
    at org.rust.lang.core.resolve.ref.RustReferenceBase$cache$1.resolve(RustReferenceBase.kt:15)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:144)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:213)
    at org.rust.lang.core.resolve.ref.RustReferenceBase.cache(RustReferenceBase.kt:53)
    at org.rust.lang.core.resolve.ref.RustReferenceBase.resolve(RustReferenceBase.kt:29)
    at org.rust.ide.annotator.RustHighlightingAnnotator.annotate(RustHighlightingAnnotator.kt:33)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:139)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:334)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$2(GeneralHighlightingPass.java:269)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:293)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$3(GeneralHighlightingPass.java:296)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:296)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:268)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:207)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$0(PassExecutorService.java:434)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1026)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:427)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:426)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:154)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

stubTree.txt:

PsiFileStubImpl
  RustExternCrateItemElementStub
  RustExternCrateItemElementStub
  RustExternCrateItemElementStub
  RustExternCrateItemElementStub
  RustExternCrateItemElementStub
  RustExternCrateItemElementStub
  RustModDeclElementItemStub
  RustModDeclElementItemStub
  RustModDeclElementItemStub
  RustUseItemElementStub
  RustUseItemElementStub
  RustUseItemElementStub
  RustUseItemElementStub
  RustFnItemElementStub

stubTreeFromIndex.txt:

null

main.rs_file.txt :

#![feature(custom_derive, plugin)]
#![plugin(serde_macros)]
#[macro_use]
extern crate clap;
extern crate iron;
#[macro_use]
extern crate router;
extern crate hyper;
extern crate serde;
extern crate serde_json;

mod master;
mod slave;
mod sessions;

use clap::App;
use master::Master;
use slave::Slave;
use sessions::Sessions;

fn main() {
    let yaml = load_yaml!("cli.yml");
    let matches = App::from(yaml).get_matches();
    let port = matches.value_of("port");
    match matches.subcommand_name() {
        Some(command) => match command {
            "master" => Master::run(port.unwrap_or("9514")),
            "slave" => Slave::run(port.unwrap_or("9513"), matches.value_of("address").unwrap()),
            _ => println!("Unknown command. Try --help."),
        },
        None => println!("No subcommand selected."),
    }
}
@mkaput
Copy link
Member

mkaput commented Sep 21, 2016

Try invalidating your cache

@matklad
Copy link
Member

matklad commented Sep 22, 2016

Yes, sometimes I forget to bump stub version when I change stubbed PSI, Ctrl+Shift+A invalidate caches should fix it.

@matklad matklad closed this as completed Sep 22, 2016
@LooMaclin
Copy link
Author

Thx, i'll try it next time when an error occurs

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

3 participants