5

enter image description here Today in the morning I was testing my code suddenly I got this error. I don't know what to do here because it was working file till yesterday night.

I check Stackoverflow website for solution, but the solutions are based on the original code and it's local.

I hope someone can tell me what is the problem here?? Is there any solution for this problem??

4

2 回答 2

3

Your data is probably not valid XML anymore possibly due to a circular reference. Either drill down and check if subsets have the problem. Or try a few tools to se if they can more quickly pinpoint the problem. With tools I mean apps like xmlspy (or even an online check like http://www.w3schools.com/dom/dom_validate.asp)

于 2012-07-08T08:57:40.067 回答
0

in my C# Windows form application code the circular reference (not in XML file) which thrown the "System.StackOverFlowException" looked like this, The approach I took was breaking step by step as per @zmbq's comment:

class A
{
//Class A code

class B
{
    //Class B code
}
}

class C
{
    A a = new A();
    B b = new B();
    C c = new C(); /*CALLING THE SAME CONSTRUCTOR IN CIRCULAR FASHION*/
}

I removed the constructor call to class C (which was actually necessary), now it works fine!!

于 2013-11-26T17:11:03.003 回答