vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

VS Code Crashes: Assertion Failed!

Open JulianTillmann opened this issue 7 years ago • 8 comments

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

  1. I get an Assertion error image
  2. The VS Code crashes image

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 avatar May 27 '19 06:05 JulianTillmann

@JulianTillmann thanks for reporting this issue, I am trying to reproduce--when you are restarting VSCode, how are you doing this?

SydneyhSmith avatar May 28 '19 16:05 SydneyhSmith

@JulianTillmann, if you uninstall the PowerShell extension from VSCode, does this problem still occur?

rjmholt avatar May 28 '19 17:05 rjmholt

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?

rjmholt avatar May 28 '19 21:05 rjmholt

@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.

JulianTillmann avatar May 29 '19 05:05 JulianTillmann

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.

rjmholt avatar May 29 '19 05:05 rjmholt

@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?

rjmholt avatar Jun 07 '19 18:06 rjmholt

Going to close this as resolved by VSCode 1.35 but will re-open if this is still an issue--Thanks!

SydneyhSmith avatar Jun 13 '19 20:06 SydneyhSmith