Share via


Heap Operation Performed On An Invalid Heap Handle

Application Verifier stop message

Heap violation detected. Heap operation performed on an invalid heap handle: <handle ID> was expected.

Probable cause

The heap structures are tagged with a specific value. If the heap handle used in the call to a heap interface does not have this specific value, then this stop will be generated. This bug can happen if the internal heap structure got corrupted or an invalid heap handle was used.

Information displayed by Application Verifier in Tool Window

Heap Handle – Heap handle for the heap owning the block

Block address – Address of the heap block

Size - Block size

Description - Heap operation performed on an invalid heap handle: <handle ID> was expected

Trace description – Saved Stack Frames for the HeapAlloc/malloc/new operation

Additional information

Check the current call stack to see where the invalid heap handle is used.

See Also

Concepts

Heap Verifier