Skip to content

Panic: no value set for FileSourceRootQuery(FileId(0)) #9168

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

Closed
lnicola opened this issue Jun 7, 2021 · 7 comments
Closed

Panic: no value set for FileSourceRootQuery(FileId(0)) #9168

lnicola opened this issue Jun 7, 2021 · 7 comments
Labels
Broken Window Bugs / technical debt to be addressed immediately S-actionable Someone could pick this issue up and work on it right now

Comments

@lnicola
Copy link
Member

lnicola commented Jun 7, 2021

Panic context:
> 
version: 6e30aeeb2 2021-06-07 dev
request: textDocument/codeLens CodeLensParams {
    text_document: TextDocumentIdentifier {
        uri: Url {
            scheme: "file",
            cannot_be_a_base: false,
            username: "",
            password: None,
            host: None,
            port: None,
            path: "/home/me/Projects/rust-analyzer/crates/ide_completion/src/completions/attribute/lint.rs",
            query: None,
            fragment: None,
        },
    },
    work_done_progress_params: WorkDoneProgressParams {
        work_done_token: None,
    },
    partial_result_params: PartialResultParams {
        partial_result_token: None,
    },
}

thread '<unnamed>' panicked at 'no value set for FileSourceRootQuery(FileId(0))', /home/grayshade/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/salsa-0.17.0-pre.1/src/input.rs:106:32
Panic context:
> 
version: 6e30aeeb2 2021-06-07 dev
request: textDocument/hover HoverParams {
    text_document_position_params: TextDocumentPositionParams {
        text_document: TextDocumentIdentifier {
            uri: Url {
                scheme: "file",
                cannot_be_a_base: false,
                username: "",
                password: None,
                host: None,
                port: None,
                path: "/home/me/Projects/rust-analyzer/crates/ide_completion/src/completions/attribute/lint.rs",
                query: None,
                fragment: None,
            },
        },
        position: Position {
            line: 45,
            character: 5,
        },
    },
    work_done_progress_params: WorkDoneProgressParams {
        work_done_token: None,
    },
}

Can't reproduce, but spotted after removing a line from a file while RA was loading.

Also, we seem to duplicate the request info.

@lnicola lnicola added the S-actionable Someone could pick this issue up and work on it right now label Jun 7, 2021
@lnicola
Copy link
Member Author

lnicola commented Jul 9, 2021

@lnicola lnicola added the Broken Window Bugs / technical debt to be addressed immediately label Jul 12, 2021
@matklad
Copy link
Member

matklad commented Jul 12, 2021

@lnicola
Copy link
Member Author

lnicola commented Jul 13, 2021

Triage: still happens after #9582.

@matklad
Copy link
Member

matklad commented Aug 2, 2021

@lnicola could you get a stacktrace here?

@matklad
Copy link
Member

matklad commented Aug 2, 2021

Ah, got backtrace after clearing the database. That one I think is expected -- looking at the memory usage brings the database into inconsistent state. I wasn't able to reproduce this problem during project load though.

@lnicola
Copy link
Member Author

lnicola commented Aug 2, 2021

I wasn't able to reproduce this problem during project load though.

Yeah, I couldn't either. Do you want to close this?

@matklad
Copy link
Member

matklad commented Aug 2, 2021

Yeah, let's close this until it re-surfacces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Broken Window Bugs / technical debt to be addressed immediately S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

No branches or pull requests

2 participants