Skip to content

Rust Panic on Windows (unwrap Failure in language_server_command) #23

@Scott-Nx

Description

@Scott-Nx

Summary

The PowerShell extension crashes on Windows due to a Rust panic caused by an unwrapped Result in the language_server_command function of the WASM module.

Crash Log

Language server powershell-es:

error while executing at wasm backtrace:
    0: 0x1306b - powershell.wasm!__rust_start_panic
    1: 0x11df4 - powershell.wasm!rust_panic
    2: 0x11dc7 - powershell.wasm!std::panicking::rust_panic_with_hook::h79071f5fb265d1d9
    3: 0x10d06 - powershell.wasm!std::panicking::begin_panic_handler::{{closure}}::h410c57f452410813
    4: 0x10c72 - powershell.wasm!std::sys::backtrace::__rust_end_short_backtrace::h514500abf2a2d0ca
    5: 0x1175b - powershell.wasm!rust_begin_unwind
    6: 0x18b3e - powershell.wasm!core::panicking::panic_fmt::he306018bf71f8e67
    7: 0x1a928 - powershell.wasm!core::result::unwrap_failed::h270adb30136b6536
    8: 0x3c08 - powershell.wasm!<powershell::PowerShellExtension as zed_extension_api::Extension>::language_server_command::h4b0c674e8101772d
    9: 0x4238 - powershell.wasm!zed_extension_api::wit::_export_language_server_command_cabi::h2a48dddd550bbbb8
   10: 0x85ce - powershell.wasm!language-server-command
   11: 0x1ce82 - powershell.wasm!language-server-command.command_export: wasm trap: wasm `unreachable` instruction executed

Steps to Reproduce (on Windows)

  • Install the PowerShell extension.
  • Open a .ps1 file or perform any action that triggers language server support.
  • Observe crash and log output.

Environment

Item Version / Info
OS Windows 11 25H2 Build 26200.6725
Zed IDE Version Zed Nightly 0.209.0 abe1fd5e16c9a9c3db84648f56336c7f25df3ddb
PowerShell Extension v0.3.0
Architecture x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions