PackageManager not running on PowerShell 5 - windows

When running powershell 5 (default)
PS> get-package
Error states:
"Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
We can see event ID 1000 and event ID 1026.
1000:
Faulting application name: powershell.exe , version: 10.0.17763.1
Faulting module name: KERNELBASE.dll, version 10.0.177763.3532
Exception code: 0xc0000005
Faulting application path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Source: Application Error
1026:
Application: powershell.exe
Framework version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Access.Violation.Exception ... ...
Source: .NET Runtime and then automatically closes powershell.
Powershell 7 and ISE can run get-package without any problem.
Any insights?
Thanks,
get-package
install-module
not working suddenly 2 weeks ago.

Related

(Windows) Program fails to run on particular machine

When trying to run my executable program on a Windows Server 2008 R2 (x64), it fails immediately and Windows says "Program (x64) has stopped working".
The same executable works on many other machines.
Even on other machines with the same OS.
The program comes with its own Dlls in the folder.
Even if it would require other Dlls that arent present i think the system would say so?
Here is the output from Windows Event Viewer:
Faulting application name: dscp.exe, version: 19.0.0.398, time stamp: 0x5d8b42ef
Faulting module name: VERSION.dll_unloaded, version: 0.0.0.0, time stamp: 0x4a5be082
Exception code: 0xc0000005
Fault offset: 0x000007fefbcc15b4
Faulting process id: 0x1db4
Faulting application start time: 0x01d5744a0d493693
Faulting application path: C:\TEMP\DebugW\dscp.exe
Faulting module path: VERSION.dll
Report Id: 50adb64b-e03d-11e9-a7b2-000c29b302dd
I have looked up VERSION.dll and it seems to be a Windows system Dll.
I dont' know how to debug this issue.

Service fine as local system, but has faulting module as network service?

I'm a little stumped as to why this windows service is not running when using the Network Service account (but does so on other machines using the same code), getting me these two subsequent errors in event viewer:
Application: MyApplication.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 06F3C67E
Stack:
and
Faulting application name: MyApplication.exe, Version: 1.0.0.0, time stamp: 0x87654321
Faulting module name: ReferencedComLib.dll, Version: 1.0.0.0, time stamp: 0x12345678
Exception code: 0xc0000005
Fault offset: 0x0000c67e
Faulting process ID: 0x148c
Faulting application start time: 0x01d4df2e591220f2
Faulting application path: C:\Program Files (x86)\MyApplication\MyApplication.exe
Faulting module path: C:\Windows\SYSTEM32\ReferencedComLib.dll
Report ID: 9d8df956-4b21-11e9-80c8-00155dc82141
Faulting package full name:
Faulting package-relative application ID:
This seems to indicate that the service is looking for ReferencedComLib.dll under C:\Windows\SYSTEM32...
But ReferencedComLib.dll is actually located under C:\Windows\SysWOW64 - it's a COM-library from third party (and their installer correctly installs it into SysWOW64)
Running under Local System however this error does not even show up and the service runs without problems - and this problem is currently only reproducable on one stage, on all others it is running fine with Network Service.
How could changing the service account running the service result in a faulting module?
Simon Mourier was right, the problem was internal to the third party dlls I am using and it was trying to access a directory that was under C:\Users....
Reinstalling under a different path that Network Service could access fixed the problem.

Remote application through Powershell - Sudden OutOfMemoryException

I have an SSIS package that runs an executable by using Powershell. This worked fine for more than a year, but all of the sudden I get this strange error. I've isolated the command:
& '\\iguana01\VMMa\Process e-Invoice\ProcesseInvoice.exe' #('/countfiles','46')
If I run this command on my own PC there is no problem
But if I run this same command on the server (2012) then I get this strange error
This error dissapears when I run it on the 2012 server from a local folder
The event viewer doesn't give me that much more information, .NET Runtime 1026 error
Application: ProcesseInvoice.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
Stack:
at ProcesseInvoice.Program.Main(System.String[])
And an application error (1000)
Faulting application name: ProcesseInvoice.exe, version: 2.2.4.0, time stamp: 0x5857fbf7
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e211319
Exception code: 0xe0434352
Fault offset: 0x0000b9bc
Faulting process id: 0x4488
Faulting application start time: 0x01d34be3a1f4ea5d
Faulting application path: \\iguana01\VMMa\Process e-Invoice\ProcesseInvoice.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: dfaca8c6-b7d6-11e7-b19f-005056b765a3
Don't know what the problem is and in which direction I have to look.
Pretty stupid, seemed that the processinvoicing*32.exe was still running under processes on the server. The logging in Powershell and eventviewer where not that clear.

Hello World console application crashes in ConEmu

When executing a newly built "Hello World" console application in CMD or PowerShell inside ConEmu (frames and tabulates everything), the application will fail with "MyApp has stopped working" after printing "Hello World".
Execution in a regular CMD/PowerShell works fine.
Setup:
Windows 7 Enterprise
Visual Studio 2015
ConEmu 150816
.Net 4.5.2
Problem details/signature:
Problem Event Name: APPCRASH
Application Name: PerforceSSOClient.exe
Application Version: 1.0.0.0
Application Timestamp: 55e5acb4
Fault Module Name: nvd3d9wrap.dll
Fault Module Version: 9.18.13.3182
Fault Module Timestamp: 5280d7e2
Exception Code: c00000fd
Exception Offset: 0000583d
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1030
Additional Information 1: c859
Additional Information 2: c859befd7e6cd7469e4e4ec59e24adda
Additional Information 3: fd58
Additional Information 4: fd581380868e58459acc52bac65d582b
The crash is caused by the nVIDIA driver dll nvd3d9wrap.dll. You use the driver version 331.82. Try to use the latest driver 355.82:
32Bit: http://www.nvidia.com/download/driverResults.aspx/90493/en-us
64Bit: http://www.nvidia.com/download/driverResults.aspx/90494/en-us

periodic crashes in cl.exe, kernelbase.dll

I frequently have the following crash from cl.exe. This happens both when compiling and running other a help command on cl. This is happening on Windows Server 2008, but I think this happens sometimes on Windows XP also. This is occurring very frequently within Jenkins when when running waf configure.
I haven't been able to find anything online to fix this problem, although there are mentions of kernelbase.dll crashing in other programs.
Does anyone have any thoughts on how to avoid this problem?
Thanks
Log Name: Application
Source: Application Error
Date: 1/24/2012 4:25:51 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer:
Description:
Faulting application name: cl.exe, version: 15.0.30729.1, time stamp: 0x488ef6ea
Faulting module name: KERNELBASE.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdbdf
Exception code: 0x0eedfade
Fault offset: 0x0000b727
Faulting process id: 0xd74
Faulting application start time: 0x01ccdae720a1cbbd
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: 5e9f206e-46da-11e1-a28d-bc305bd1c68c
Event Xml:
1000
2
100
0x80000000000000
55240
Application
cl.exe
15.0.30729.1
488ef6ea
KERNELBASE.dll
6.1.7600.16385
4a5bdbdf
0eedfade
0000b727
d74
01ccdae720a1cbbd
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe
C:\Windows\syswow64\KERNELBASE.dll
5e9f206e-46da-11e1-a28d-bc305bd1c68c
Check:
http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/05764562-0133-4e6d-a613-bfe1ec2f0c1d/.
This seems to be an issue with updated dlls. I would also suggest compiling your program outside of Jenkins just to be sure that it is not an issue with Jenkins (either paths, or anything else).

Resources