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

Internal error in VS Code #1081

Closed
kaeluka opened this issue Jan 18, 2022 · 5 comments · Fixed by #1158
Closed

Internal error in VS Code #1081

kaeluka opened this issue Jan 18, 2022 · 5 comments · Fixed by #1158
Labels
bug Something isn't working good first issue Good for newcomers VSCode

Comments

@kaeluka
Copy link

kaeluka commented Jan 18, 2022

Describe the bug
I got an "Internal error. (codeQL.codeLensQuickEval)" error dialog in vscode.

Version
CodeQL extension version: 1.5.9
CodeQL CLI version: 2.7.2
Platform: darwin x64

Vs code:
Version: 1.63.2
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-15T09:37:28.172Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 20.4.0

To reproduce
The way to reproduce it for me is:

  • open TaintedPathCustomizations.qll, line 452 (in the blocks predicate).
  • Remove .getBaseString().
  • Quick evaluate the predicate.

Expected behavior
A graceful error.

Additional context
When this modification is present in the code base, unrelated queries will also fail. This might make it quite hard to find the root cause of the problem in some instances.

But this is not blocking me at all, I just thought that someone might find it valuable to be made aware.

This part of the output seems relevant:

SEVERE: Internal error: com.semmle.util.exception.CatastrophicError: Ambiguous super dispatch: method Node.asExpr() can be reached through extends and instanceof supertypes.
java.util.concurrent.CompletionException: com.semmle.util.exception.CatastrophicError: Ambiguous super dispatch: method Node.asExpr() can be reached through extends and instanceof supertypes.

image

@kaeluka kaeluka added the bug Something isn't working label Jan 18, 2022
@aeisenberg aeisenberg added the good first issue Good for newcomers label Jan 18, 2022
@aeisenberg
Copy link
Contributor

Thank you for logging this error. I think we need some better error handling around invalid quick queries. At the very least, better error messages would be helpful.

@kaeluka
Copy link
Author

kaeluka commented Jan 19, 2022

Cool, glad if it can be helpful :)

@aeisenberg
Copy link
Contributor

I have a fix for this. There's no easy way to get a better error message out of this since the error is coming from inside the compiler. Instead, the best we can do is wrap the error message to make it slightly more understandable and open up the query server logs (instead of the extension logs) since these logs will usually contain more information for malformed queries.

@Drun1baby
Copy link

so how can I solve this issue ……

@aeisenberg
Copy link
Contributor

@Drun1baby, please open a new issue for your problem. Include any relevant messages from the CodeQL Extension output view and the Query Server output view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers VSCode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants