title: AccessViolationException after upgrade to .Net 4.0
body: <p>I upgrade a wpf desktop application from .net 3.5 to .net 4.0.(Changed the target framework to 4.0). After the upgrade it shows some unexpected behaviours. </p>
  
  <p>There is a tab control in the application. when i click a particular tab only either one of the following behaviours occurs.<br>
  1. Application crashed<br>
  2. AccessViolationException "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."<br>
  3. Application closed<br>
  4. Sometimes working fine.  </p>
  
  <p>Other than this tab control issue, application closed unexpectedly. (when closing a tab or scroll a window). Sometiems Fatalexecutionengine exception also thrown.</p>
  
  <p>Everything worked fine before converted to .Net 4.0.</p>
  
  <p>I don't have any clue what's happening there. Please help to resolve this.</p>