Skip to content

VS Code Hangs When Opening Specific PowerShell File #56430

Closed

Description

@Mibz

Issue Type: Bug

I am experiencing a problem with VS Code hanging when opening a specific PowerShell file. I think the problem is with the Powershell Language Basics extension, not the Powershell extension, which is why I'm posting here.

When opening the specific script VS Code will hang and eventually I'll receive a prompt saying "The window is no longer responding" and I'm given the option to Reopen, Keep Waiting, or Close.

Reopening the window results in the same behaviour.
Keep Waiting results the same behaviour, though I only clicked it 5-6 times before giving up.
Closing the window works correctly.

If I disable the PowerShell extension and Powershell Language Basics extension, the file loads properly.
If I then re-enable the PowerShell extension and reload, VS Code hangs again.
If I disable the PowerShell extension but leave the Powershell Language Basics extension enabled, the file fails to load.

I can open any other PowerShell file with both extensions enabled, it's just the one file that causes problems. It's 29 KB and ~700 lines. I've tried on two different machines running the same version of Windows, VS Code, and the extensions with no difference in behaviour.

No logs are created in the .vscode\extensions\ms-vscode.powershell-1.8.2\logs folder when this error occurs.

VS Code version: Code 1.26.0 (4e93618, 2018-08-13T16:29:31.933Z)
This was also attempted on 1.27.0-insider with the same results
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 x 4200)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.96GB (22.16GB free)
Process Argv removed by reporter
Screen Reader no
VM 0%
Extensions (2)
Extension Author (truncated) Version
PowerShell ms- 1.8.2
vscode-autohotkey sle 0.2.2

Activity

  1. vscodebot commented on Aug 15, 2018

    @vscodebot

    (Experimental duplicate detection)
    Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

  2. sandy081 commented on Aug 15, 2018

    @sandy081
    Member

    Could be duplicate of #56368. Issue has the file with which code crashes

  3. added
    freeze-slow-crash-leak
    on Aug 15, 2018
  4. Mibz commented on Aug 15, 2018

    @Mibz
    Author

    Can confirm my behaviour seems identical. I pasted the file from that issue into VS Code without a problem, but once I saved it as .ps1 VS Code hung as it does with my script.

    EDIT: I should note that my file is in source control but the fault occurs without using the Source Control window, and without making any changes to the file.

  5. added
    candidate
    on Aug 15, 2018
  6. aeschli commented on Aug 15, 2018

    @aeschli
    Contributor

    I reverted the grammar to PowerShell/EditorSyntax@6f54386
    where this this file does no longer crash.

  7. added a commit that references this issue on Aug 15, 2018
    f125fe6
  8. removed
    candidate
    on Aug 17, 2018
  9. locked and limited conversation to collaborators on Sep 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

freeze-slow-crash-leakverified

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions