PowerShell / PowerShell/PowerShell-Native
Running win32 application from shell "exits silently" but in reality crashes on load
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 68
- Forks
- 46
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Windows PowerShell command with a native executable whose linked DLL is missing, then inspect how the process launch handles the failure. Done means invoking the executable reports an External System Error identifying the missing DLL instead of producing no output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100