SharePoint 2010 – Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
After running the latest batch of Windows Updates on a Win2K8 R2 / SharePoint 2010 Enterprise farm, I received the following correlation error when trying to access the SharePoint portal after the post-Windows update reboot:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at Microsoft.SharePoint.Portal.WebControls.LocStringIdLookupTable
Ran an IIS Recycle all the relevant SharePoint app pools and the problem seems to resolve itself. Go figure.
This error seems often paired with Windows Updates. Generally it points to heap corruption – some data on the heap may hold incorrect pointers. There is either a problem in the .NET framework or some other unmanaged code components are responsible for this. You should be sure to install the latest .NET framework patches and SharePoint patches. If there are any 3rd party components installed, double check if some ship with unmanaged code dlls as these might be responsible for the heap corruption.