Skip to content

"The terminal process terminated with exit code: 139." when first invoking pwsh. #5144

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

Closed
6 tasks done
RokeJulianLockhart opened this issue Feb 22, 2025 · 1 comment
Closed
6 tasks done
Labels
Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed!

Comments

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Feb 22, 2025

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

When I first create a PowerShell file, the terminal automatically invokes pwsh. This causes an error dialogue to appear:

Image

It contains the undermentioned, verbatim:

The terminal process "/home/RokeJulianLockhart/.dotnet/tools/pwsh '-NoProfile', '-EncodedCommand', 'SQBtAHAAbwByAHQALQBNAG8AZAB1AGwAZQAgACcALwBoAG8AbQBlAC8AUgBvAGsAZQBKAHUAbABpAGEAbgBMAG8AYwBrAGgAYQByAHQALwAuAHYAcwBjAG8AZABlAC8AZQB4AHQAZQBuAHMAaQBvAG4AcwAvAG0AcwAtAHYAcwBjAG8AZABlAC4AcABvAHcAZQByAHMAaABlAGwAbAAtADIAMAAyADUALgAxAC4AMAAvAG0AbwBkAHUAbABlAHMALwBQAG8AdwBlAHIAUwBoAGUAbABsAEUAZABpAHQAbwByAFMAZQByAHYAaQBjAGUAcwAvAFAAbwB3AGUAcgBTAGgAZQBsAGwARQBkAGkAdABvAHIAUwBlAHIAdgBpAGMAZQBzAC4AcABzAGQAMQAnADsAIABTAHQAYQByAHQALQBFAGQAaQB0AG8AcgBTAGUAcgB2AGkAYwBlAHMAIAAtAEgAbwBzAHQATgBhAG0AZQAgACcAVgBpA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bwBuAGYAaQBnAC8AQwBvAGQAZQAvAGwAbwBnAHMALwAyADAAMgA1ADAAMgAyADEAVAAxADgAMQA3ADMAMAAvAHcAaQBuAGQAbwB3ADEALwBlAHgAdABoAG8AcwB0AC8AbQBzAC0AdgBzAGMAbwBkAGUALgBwAG8AdwBlAHIAcwBoAGUAbABsACcAIAAtAFMAZQBzAHMAaQBvAG4ARABlAHQAYQBpAGwAcwBQAGEAdABoACAAJwAvAGgAbwBtAGUALwBSAG8AawBlAEoAdQBsAGkAYQBuAEwAbwBjAGsAaABhAHIAdAAvAC4AYwBvAG4AZgBpAGcALwBDAG8AZABlAC8AVQBzAGUAcgAvAGcAbABvAGIAYQBsAFMAdABvAHIAYQBnAGUALwBtAHMALQB2AHMAYwBvAGQAZQAuAHAAbwB3AGUAcgBzAGgAZQBsAGwALwBzAGUAcwBzAGkAbwBuAHMALwBQAFMARQBTAC0AVgBTAEMAbwBkAGUALQAxADkAOAA2ADkANgAtADMAMQA5ADcAMQAyAC4AagBzAG8AbgAnACAALQBGAGUAYQB0AHUAcgBlAEYAbABhAGcAcwAgAEAAKAApACAA'" terminated with exit code: 139.

PowerShell Version

    1. #!/usr/bin/env pwsh
      #Requires -PSEdition Core
      #Requires -Version 7.4.6
      $PSVersionTable | Format-Table -AutoSize
    2. Name                      Value
      ----                      -----
      PSVersion                 7.4.6
      PSEdition                 Core
      GitCommitId               7.4.6
      OS                        Fedora Linux 41 (KDE Plasma)
      Platform                  Unix
      PSCompatibleVersions      {1.0, 2.0, 3.0, 4.0…}
      PSRemotingProtocolVersion 2.3
      SerializationVersion      1.1.0.1
      WSManStackVersion         3.0
    1. #!/usr/bin/env pwsh
      #Requires -PSEdition Core
      #Requires -Version 7.4.6
      $Host | Format-List
    2. Name             : ConsoleHost
      Version          : 7.4.6
      InstanceId       : c4cdccc4-5447-4afe-b019-d9af0d234f75
      UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
      CurrentCulture   : en-GB
      CurrentUICulture : en-GB
      PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
      DebuggerEnabled  : True
      IsRunspacePushed : False
      Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Visual Studio Code Version

    1. #!/usr/bin/env sh
      code --version
    2. 1.97.2
      e54c774e0add60467559eb0d1e229c6452cf8447
      x64
      
    1. #!/usr/bin/env sh
      rpm -qa code
    2. code-1.97.2-1739406869.el8.x86_64
      
    1. #!/usr/bin/env sh
      dnf --refresh info code-1.97.2-1739406869.el8.x86_64
    2. Updating and loading repositories:
       Copr repo for spotify-qt owned by kraxarn                                                                                        100% |  10.8 KiB/s |   1.5 KiB |  00m00s
       RPM Fusion for Fedora 41 - Free tainted                                                                                          100% |  18.1 KiB/s |   8.2 KiB |  00m00s
       Fedora 41 - x86_64 - Updates                                                                                                     100% |  47.4 KiB/s |  23.3 KiB |  00m00s
       Fedora 41 openh264 (From Cisco) - x86_64                                                                                         100% |   2.8 KiB/s | 989.0   B |  00m00s
       google-chrome-canary                                                                                                             100% |  13.5 KiB/s |   1.3 KiB |  00m00s
       warpdotdev                                                                                                                       100% |  10.1 KiB/s |   1.5 KiB |  00m00s
       Fedora 41 - x86_64                                                                                                               100% |  57.2 KiB/s |  26.8 KiB |  00m00s
       RPM Fusion for Fedora 41 - Nonfree - Updates                                                                                     100% |  61.8 KiB/s |   9.4 KiB |  00m00s
       RPM Fusion for Fedora 41 - Nonfree tainted                                                                                       100% |  24.2 KiB/s |   8.8 KiB |  00m00s
       ProtonVPN Fedora Beta repository                                                                                                 100% |  20.9 KiB/s |   3.7 KiB |  00m00s
       RPM Fusion for Fedora 41 - Free - Updates                                                                                        100% |  60.6 KiB/s |   8.8 KiB |  00m00s
       Copr repo for Koi owned by birkch                                                                                                100% |   5.4 KiB/s |   1.5 KiB |  00m00s
       RPM Fusion for Fedora 41 - Free                                                                                                  100% |  23.5 KiB/s |   8.9 KiB |  00m00s
       RPM Fusion for Fedora 41 - Nonfree                                                                                               100% |  24.0 KiB/s |   9.5 KiB |  00m00s
       Visual Studio Code                                                                                                               100% |  20.1 KiB/s |   1.5 KiB |  00m00s
      Repositories loaded.
      Installed packages
      Name            : code
      Epoch           : 0
      Version         : 1.97.2
      Release         : 1739406869.el8
      Architecture    : x86_64
      Installed size  : 416.2 MiB
      Source          : code-1.97.2-1739406869.el8.src.rpm
      From repository : @stored_transaction
      URL             : https://code.visualstudio.com/

Extension Version

  1. #!/usr/bin/env sh
    code --list-extensions --show-versions | Select-String powershell
  2. ms-vscode.powershell@2025.1.0

Steps to Reproduce

#!/usr/bin/env sh
code TextFile.PS1

Visuals

Image

Logs

They're not where they should be:

  1. #!/usr/bin/env pwsh
    #Requires -PSEdition Core
    #Requires -Version 7.4.6
    Get-ChildItem -LiteralPath "$HOME/.config/Code/User/globalStorage/ms-vscode.powershell/" | Format-Table -AutoSize
  2.     Directory: /home/RokeJulianLockhart/.config/Code/User/globalStorage/ms-vscode.powershell
    
    UnixMode                 User Group                 LastWriteTime Size Name
    --------                 ---- -----                 ------------- ---- ----
    drwxr-xr-x RokeJulianLockhart RokeJulianLockhart 13/02/2025 17:54 1588 sessions
@RokeJulianLockhart RokeJulianLockhart added Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels Feb 22, 2025
@RokeJulianLockhart
Copy link
Author

#5144 (comment)

Updating to 7.5.0 via dotnet tool update -g --all appears to have remediated this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed!
Projects
None yet
Development

No branches or pull requests

1 participant