Jul 23, 2013

Error while executing web part: System.StackOverflowException: Operation caused a stack overflow

Once again SharePoint and Designer has given me the oportunity to search the Interwebs for other peoples hard earned knowledge.

I had one of our Designer savy user come down after breaking a data list view.

The error was:

Error while executing web part: System.StackOverflowException: Operation caused a stack overflow.
at Microsoft.Xslt.NativeMethod.CheckForSufficientStack()
at dvt_groupfield(XmlQueryRuntime )
at <xsl:template name="dvt_1.body">(XmlQueryRuntime , IList`1 , Double , Double )
at <xsl:template name="dvt_1">(XmlQueryRuntime , XPathNavigator )
at Root(XmlQueryRuntime )
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.ExecuteTransform(XslCompiledTransform xslCompiledTransform, XsltArgumentList xmlArguments, Boolean bDeferExecuteTransform)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)


It turns out that the query took longer than one (1) second to complete.

I found the solution to setting the timeout to a higher value:

Check Current Setting

$farm = Get-SPFarm $farm.XsltTransformTimeOut

The default setting is 1 second. The PowerShell code below changes it to 5 seconds which should be sufficient.

Change Setting to 5 Seconds
$farm = Get-SPFarm $farm.XsltTransformTimeOut = 5 $farm.Update()


Jul 19, 2013

Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.


I am not sure if all of you have run into the following error in the last couple of weeks:





Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.  
at System.Xml.Xsl.XslCompiledTransform.Load(MethodInfo executeMethod, Byte[] queryData, Type[] earlyBoundTypes)  
at Microsoft.Xslt.STransform.GetCompiledTransform()   
at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()  
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)



It turns out is it caused by a Microsoft Service Update. (KB2844286 for Server 2008 R2 and KB2844287 for Server 2008)

RESOLUTION: You will need to uninstall the update from your WFE and APP servers.

Control Panel > Unistall a program > View installed updates (on left) > Uninstall the KB (Under the Microsoft Windows section)

Here are the bulletins about the patch:

KB2844286
KB2844287

There a few MS forum posts about this:

“Unable to display this Web Part” error message after patch KB2844286

Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.

I am not the only one that has a write up on this:

ISSUE: KB2844286 Security Update on SharePoint 2010


NOTE: One point to add. I was not able to get my web parts working again without rebooting my farm. Yes, SharePoint hates me and would not just allow an IISRESET.