PowerShell / PowerShell/PowerShell-Native
Running win32 application from shell "exits silently" but in reality crashes on load
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 68
- フォーク
- 46
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 1
説明
So I ran into an issue where an application unexpectedly would no longer launch when called directly from the shell, i.e. ".\appname.exe"
After troubleshooting for a bit with my trusty old friend Process Monitor, I could see the process opening and closing down again, looking at the Process Exit event, I saw the exit code of -1073741515 (aka. 0xC0000135, aka. STATUS_DLL_NOT_FOUND)
That was a quite easy fix, but it nagged me that I got no indication of the failure, in any other circumstance (running from cmd, double-clicking in explorer, run or even in powershell with Start-Process) a message would pop up stating a DLL was missing, and which one it was.
(I don't know if this issue extends to Linux/MacOS, or even if it can affect those platform)
Steps to reproduce
- First and foremost, a win32(native) application is needed with a linked library that's missing
- PS > .\path\to\executable.exe
Expected behavior
External System Error prompt
Actual behavior
No Output
Environment data
Name Value
---- -----
PSVersion 6.2.3
PSEdition Core
GitCommitId 6.2.3
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、リンクされている DLL が存在しないネイティブ実行可能ファイルで Windows PowerShell コマンドを再現し、次にプロセスの起動がこの失敗をどのように処理するかを調べます。実行可能ファイルを呼び出したときに、何も出力されないのではなく、欠落している DLL を特定する External System Error が報告されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell
- 領域
- cli, operating-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100