-
Notifications
You must be signed in to change notification settings - Fork 501
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
Preview extension crashes on mouse hover over a code block highlighted as a problem Pester #2135
Comments
@Glober777 from the logs it looks like you have a line with 1.7976931348623157E+308 characters and this is causing the crash...do you have any context on this? Is this behavior/crash happening with all your scripts or just a particular one? |
Hey @SydneyhSmith, here's a sample project that repro the issue: Just open it up in VSCode, and execute the default test Task for the project (so that the failed test would show up in the Problems list). Just in case, I've also sent another set of logs collected from the repro project over an email. |
@Glober777 thanks for providing more information, we are still having trouble reproducing this...do you have any settings enabled related to PowerShell in VsCode? |
@SydneyhSmith, the only PowerShell related settings that I have are: {
"powershell.developer.editorServicesLogLevel": "Diagnostic",
"powershell.developer.featureFlags": [ "PSReadLine" ],
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",
"workbench.colorTheme": "PowerShell ISE"
} Looks like the range for the codeAction follows the line with the 'It' statement, and the character number for the ending doesn't seem to depend on the test name. Additionally, I've tested it out with the non-preview version of the extension and I'm experiencing the same issue. I wonder if I could get these extensions broken somehow. Uninstalling and re-installing doesn't help. |
Thanks so much for all the information..you are right in that the codeAction seems to be what is causing the crash. The codeAction is coming from vscode so that is one reason we are having trouble tracking this issue down, since you seem to be able to consistently repro this to get more information on the code action could you please provide a GIF or screenshot of the above behavior? |
This issue is being closed as inactive, if this issue is still occurring it will be re-opened |
@SydneyhSmith, sorry for the delay, but I didn't have a chance to record it earlier. Here's the GIF: |
Can this be re-opened or shall I raise a new issue? |
@Glober777 thanks for the GIF--that is super helpful...one thing we noticed is that the "red squiggly" line (which seems to be triggering the crash) does not seem to be coming from the PowerShell extension...are you able to reproduce this error with only the PowerShell extension enabled? Thanks! |
I can repro this. It is another instance of the JSON serializer choking on a character position on the order of E+308. If I'm reading this right, this value is coming from VSCode as
|
@rkeithhill agreed that this is likely what is happening... still wondering though how you were able to repro this (was it using the same steps as provided)? and if you have any ideas as to where the red squiggly is coming from? |
I opened up the examples folder, added a new file named
Then run the tests via the Run Tests code lens. When the error squiggle appears, hover over it. |
I've got the file and managed to run the tests, but don't get a red squiggle. Is there some configuration or extension you've got enabling it @rkeithhill? |
I no longer get the squiggle after updating to VSCode 1.38.0. Which is a problem because we should be highlighting the line of code where the Pester test fails. :-( OK, if you create this file in the root of the examples folder, you can then run the |
This shouldn't happen anymore. VS Code changed the new default max value to be in the range of Int32 |
Issue Description
I am observing a crash of the Preview extension every time I hover over a block of code (inside a Pester test script) that is highlighted as a Problem (due to a test failure during the past run). As soon as I hover over, I can see a brief appearance of a little tool-tip showing the name of the failed test and a tiny message saying
No quick fixes available
and once it disappears, I receive a notification about termination of the PowerShell session.Attached Logs
Diagnostics logs will be uploaded over an email.
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
The text was updated successfully, but these errors were encountered: