Windows error 0x00000142, 322

Detailed Error Information


MessageThe target device has insufficient resources to complete the operation.
Declared inwinerror.h

This appears to be a raw Win32 error. More information may be available in error 0x80070142.


This is a Blue Screen of Death stop code. More information is available in the Knowledge Base article Bug Check 0x142: VIDEO_TDR_APPLICATION_BLOCKED.

HRESULT analysis[3]

This is probably not the correct interpretation of this error. The Win32 error above is more likely to indicate the actual problem.

This code indicates success, rather than an error. This may not be the correct interpretation of this code, or possibly the program is handling errors incorrectly.

Reserved (R)false
Reserved (X)false
FacilityCode0 (0x000)
DescriptionThe default facility code.[3][1]
Error Code322 (0x0142)

Possible solutions


WinDbg with dump files when you have a classic ASP app which uses a lot of .Net via interop


You need to find the roots that holds these strings in memory. I have a few examples in my article: but generally what you might need to do is to use !gcroot command - it should traverse object graph to one of the roots that holds this object.

answered on Stack Overflow Jun 19, 2014 by Alex Netkachov

WinDbg with dump files when you have a classic ASP app which uses a lot of .Net via interop


There are two different heap types: native heaps (heaps of the heap manager) and managed heaps (heaps created by the .NET runtime). What you see as the output of !dumpheap is only the managed part. Since your COM objects are also using native memory, this is not included in the output.

To see the native part of the memory, try !address -summary. .NET memory will show up as <unknown> and native memory will be listed as Heap in the usage summary.

Still, !dumpheap can be helpful, e.g. to see the number of RCW objects created by your application. RCWs are not very large, therefore they might not be listed near the end of the output. Try !dumpheap -stat -type Interop to find them (if you`re using the default interop assembly).

If you know how large your COM objects are on native side, you can just multiply the number of object by the memory usage. In my typical environment, I'm using different COM objects with 5 MB to 100 MB in size, so even a few ones can cause OutOfMemoryException.

Knowing the exact size of a COM object is good for the use of GC.AddMemoryPressure which you can then use.

answered on Stack Overflow Jun 19, 2014 by Thomas Weller


Leave a comment

(plain text only)


  1. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0