Stack overflow exception

Stack overflow exception

Old forum URL: forums.lhotka.net/forums/t/5132.aspx


sasi posted on Tuesday, July 22, 2008

Stack overflow exception in mscorlib.dll. I have migrated from CSLA 1.52 to CSLA 2.1.4.0. I know its because of some circular reference or recursive calling.

public class CscSearchParam:Csla.BusinessBase<CscSearchParam> this is my business object and

public class CscSearchParamList : Csla.BusinessListBase<CscSearchParamList, CscSearchParam> is my list.

I am trying to bind this list to Infragistics(v6.1) ultrawingrid and i am getting stack overflow exception.

My first guess is the below method in CscSearchParam which might be causing recursive calling. Buy why will this method be called while binding data to a grid.? 

public override bool Equals(object obj)

{

if (obj is CscSearchParam)

{

return this.Equals(obj as CscSearchParam);

}

else

{

return false;

}

}

/// <summary>

/// This method returns true if the two input objects are equal.

/// </summary>

public new static bool Equals(object objA, object objB)

{

if (objA is CscSearchParam && objB is CscSearchParam)

{

return (objA as CscSearchParam).Equals(objB as CscSearchParam);

}

else

{

return false;

}

}

Please help me if any one has idea what method might be causing circular reference or repetitive recursion while binding data to grid.

Thanks in Advance.

Sasidhar

 

 

sasi replied on Thursday, July 24, 2008

Thanks everyone for visiting my post.

I found the circular reference Cake [^], just needed to add  attribute - [NotUndoable] to the CscSearchParamList variable declaration in CscSearchParam class.

Copyright (c) Marimer LLC