Access Violation error on Sharepoint 2010 OOB components

If you are facing Access Violation error with newly upgraded Sharepoint 2010 server on common components like randomly calender view,document lists, etc. at undeterministic times.You may interested with this article.

Here is a sample error in ULS log:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.    at Microsoft.SharePoint.WebControls.SPCalendarTabs.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.W…       a45ffc85-760b-4b92-8dc9-6d6a8d3e16f9

and Event log:
Event code :3005
Exception type: AccessViolationException
Exception message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Cause:
This problem occurs because the values of the GC pointers are incorrect.

Solution:
There is a hotfix published by Microsoft for .net framework.
FIX: An access violation occurs when you pass structs as parameters through remoting or reflection in 64-bit applications in the .NET Framework 3.5 SP1 or the .NET Framework 2.0 SP2
http://support.microsoft.com/kb/974168/en-us

Before patching the hotfix please check your installed .net frameworks.
You must have .NET Framework 3.5 SP1 or .NET Framework 2.0 SP2 installed to apply this hotfix.

Check this article for determine  which versions and service pack levels of the Microsoft .NET Framework are installed
http://msdn.microsoft.com/en-us/kb/kbarticle.aspx?id=318785
You don’t have to restart the computer after you apply the hotfix if no relative .NET Framework instance is in use.
Apply this hotfix to your sharepoint wfe,app servers one by one. After patched you should better to execute an iisreset.

End of article.

Advertisements