VS Code Crashes: Assertion Failed!
System Details
To help diagnose your issue, the following details are helpful:
- OS: Windows 10 1809, Build 17763.503
- VS Code: 1.34
- PowerShell Extension: 1.12.1
- Output from
$PSVersionTable:
VSCode version: 1.34.0 a622c65b2c713c890fcf4fbf07cf34049d5fe758 x64
VSCode extensions:
[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
PSES version:
PowerShell version:
Name Value
PSVersion 5.1.17763.503 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17763.503 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Issue Description
I am experiencing a problem with the PowerShell Extension in VS Code. When I Restart VS Code while keeping a .ps1 file open in Editor the whole VSCode crashes.
Expected Behaviour
It shouldn't crash
Actual Behaviour
- I get an Assertion error

- The VS Code crashes

This happens repeatedly, I can only fix this by disabling the Extension or renaming the ps1 file so it isn't opened.
Attached Logs
All Logs from today logs.zip
@JulianTillmann thanks for reporting this issue, I am trying to reproduce--when you are restarting VSCode, how are you doing this?
@JulianTillmann, if you uninstall the PowerShell extension from VSCode, does this problem still occur?
This looks like it might be https://github.com/microsoft/vscode/issues/35117.
Can you try out VSCode Insiders to see if this still occurs?
@SydneyhSmith VS-Code is closed because of the crashing and I simply click on the VSC Icon. The "Reopen"-Button has the same behaviour
@rjmholt uninstalling or disabeling the PowerShell Extension lets me start VSCode normally. But I want to use the Extension, so that is not an Option
I don't know if #35117 is the same issue, I don't use any zooming. Simply having a ps1-file still open when last closing VSCode generates this Problem ~80% of the time. I also have 4 colleagues who have the same issues.
It sounds like this is a problem in VSCode that's being triggered because of a UI functionality that the PowerShell extension causes use of.
The error message you post looks like a deep error in VSCode's own node-driven terminal failing a native code assertion when it calls into a Windows OS API (I believe VSCode has been moving toward supporting modern terminal APIs in recent Windows versions). Essentially, something the PowerShell extension does not touch or code for directly, but which is more likely to occur because the extension is installed.
In which case, the fix can't come from us.
My suspicion is that this has already been addressed upstream in VSCode but is not yet available in stable builds. Please try your normal workflow using the latest VSCode Insiders install and let us know if the problem persists.
@JulianTillmann @NAVFreak just want to follow up here -- I believe VSCode 1.35 has been released. If you update VSCode, does that fix this bug?
Going to close this as resolved by VSCode 1.35 but will re-open if this is still an issue--Thanks!
Vs code Daily builds doesn't have this problem
Den tor 13 juni 2019 22:17 skrev Sydney Smith [email protected]:
Closed #1988 https://github.com/PowerShell/vscode-powershell/issues/1988 .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PowerShell/vscode-powershell/issues/1988?email_source=notifications&email_token=AIKZT4CJ6INOHX3VNF5MQXLP2KTNVA5CNFSM4HPZDJU2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOR7ASBVA#event-2411798740, or mute the thread https://github.com/notifications/unsubscribe-auth/AIKZT4ET5Z4IGM2OP6W7QFLP2KTNVANCNFSM4HPZDJUQ .