Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have managed heap corruption. It is not easy to find the root cause of the problem for managed heap corruption, because the problem usually demonstrates itself long after the heap is corrupted. In your case, the <code>StringBuilder</code> is a red herring. Corruption happened sometime before. </p> <p>What I would do is the following:</p> <ol> <li>Check if you have any unsafe C# code. If you have any, double check the logic there.</li> <li>Enable <a href="http://support.microsoft.com/kb/286470" rel="nofollow noreferrer">paged heap</a> for your application. Running it with paged heap will help uncover problems with unmanaged code -- in case unmanaged code is corrupting the managed heap. </li> <li>Run <code>!VerifyHeap</code> in different places. This way you might be able to localize the place in your code where corruption happens. </li> <li>If you have the server type of garbage collection enabled for your application, temporarily change that to workstation garbage collection -- you will get more predictable behavior this way.</li> <li>Read through Tesses' blog post <em><a href="http://blogs.msdn.com/b/tess/archive/2006/02/09/net-crash-managed-heap-corruption-calling-unmanaged-code.aspx" rel="nofollow noreferrer">.NET Crash: Managed Heap Corruption calling unmanaged code</a></em>. It demonstrates some examples of managed heap corruption. </li> </ol> <p>Note that when you will be running your code under WinDbg, you will come across occasional first chance AV. It is safe to ingore that, just type <code>sxd av</code> once you attach WinDbg to the process, and investigate only second chance AVs. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload