locked
Recursive sample data source causing stack overflow RRS feed

  • Question

  •  Hi everyone,

    I've used Blend 4 RC to create a sample datasource which has a recursive schema. I have a small sample of XML which I used to generate the datasource. Everything looks fine at design time, however, when I run the project in Blend or in VS 2010, I get a stack overflow when the data is being loaded (System.Windows.Application.LoadComponent(this, resourceUri);)

    Even though the schema allows recursive elements, my sample data file is tiny so i'm not exactly sure where it's getting tripped up.

    To start with, has anyone found this happen previously?

    thanks,

    Andrew

    Thursday, July 22, 2010 6:07 AM

All replies

  • Hi,

    would you be able to paste a copy of your recursive function? If you're getting a stack overflow, it's probably not breaking out of the recursion and is looping indefinitely.


    Thursday, July 22, 2010 11:59 AM
  • Hi, i'm afraid I don't have any recursive code as such. All i have done is import some XML into Blend to create a Sample Datasource. Everything then works fine until I actually run the project using the sample datasource ( in Blend OR in VS 2010 ). At which point, I get the StackOverflowException when it's trying to load the XAML representation of my data. I'll see if i can reproduce using a simple and madeup piece of XML.

    thanks,

    Andrew 

    Friday, July 23, 2010 3:21 AM
  • Ok, i've created a small snippet of XML which contains a recursive element. If I add this as a sample data source in Blend, the project won't run any more without the stack overflow. Can someone try and repeat?

    The recursive element here is the <Pr>. 

    <TC>
      <I>
        <IInf>
          <Ttl>TEST</Ttl>
        </IInf>
        <IBdy>
          <Pr id="1">
            <PrN>
              <Txt>TEST</Txt>
            </PrN>
            <PrV>
              <Txt>TEST</Txt>
              <Pr id="1_2">
                <PrN>
                  <Txt>TEST</Txt>
                </PrN>
                <PrV>
                  <Txt>TEST</Txt>
                </PrV>
              </Pr>
            </PrV>
          </Pr>
        </IBdy>
    </I>
    </TC> 

    thanks,

    Andrew

     

    Friday, July 23, 2010 3:56 AM
  • I take it nobody had chance to try the above XML as a sample datasource in Blend? If someone could repeat this behaviour it would be much appreciated.

    thanks 
    Andrew

    Monday, August 9, 2010 10:11 AM