goldshtn / msos

Command-line environment a-la WinDbg for executing SOS commands without having SOS available.
Other
96 stars 21 forks source link

msos.exe --help throws null reference exception #63

Open madhub opened 7 years ago

madhub commented 7 years ago

Hi I downloaded the latest x64 release version of msos and try to use, it throws null reference exception. here is the output of command. Running on Windows 10

msos.exe --help

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at msos.CommandExecutionContext.WriteErrorLine(String value) in C:\projects\msos\msos\CommandExecutionContext.cs:line 185 at msos.Program.RunWrapper() in C:\projects\msos\msos\Program.cs:line 334 at msos.Program.Main() in C:\projects\msos\msos\Program.cs:line 347

Madhu

goldshtn commented 7 years ago

Thanks for the report. Indeed, the binaries on AppVeyor seems to be broken. Did you also try the Release-NoCostura artifacts? In any case, building locally seems to produce a valid binary on my machine. I will investigate.

goldshtn commented 7 years ago

Right, so the Release binaries on AppVeyor don't have the referenced managed assemblies (such as CmdLine) embedded. This NRE occurs very early because the CmdLine assembly can't be loaded. This doesn't happen in a local build of the Release configuration (I get an msos.exe that does have the managed assemblies embedded). The workaround is as I wrote above, and the issue on AppVeyor needs to be investigated and fixed.