XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

3.0 CTP Crash on XML Import

Last post 09-08-2008 4:16 PM by Deej. 3 replies.
  • 09-06-2008 2:15 PM

    3.0 CTP Crash on XML Import

    Hi All,

    I've been trying to implement an XML-based map importer doobrey. However, when I think I've got it working, building my project causes Visual Studio to crash!

    Any ideas?

     

    <?xml version="1.0" encoding="utf-8" ?> 
    <XnaContent> 
      <Asset Type="System.Collections.Generic.List[Prototype1.Tile]">  
        <Item> 
          <BaseName>FlatGrass</BaseName> 
          <Position>0 0</Position> 
        </Item> 
      </Asset> 
    </XnaContent> 

     

        public class TileContentReader : ContentTypeReader<Tile>  
        {  
            protected override Tile Read(ContentReader input, Tile existingInstance)  
            {  
                String baseName = input.ReadString();  
                Vector2 position = input.ReadVector2();  
                Tile tile = new Tile(position, baseName);  
                tile.loadContent(input.ContentManager);  
                return tile;  
            }  
        } 

     

        [ContentTypeWriter]  
        public class TileContentTypeWriter : ContentTypeWriter<TWrite>  
        {  
            protected override void Write(ContentWriter output, Tile value)  
            {  
                output.Write(value.getBaseName());  
                output.Write(value.getPosition());  
            }  
     
            public override string GetRuntimeReader(TargetPlatform targetPlatform)  
            {  
                return typeof(TileContentReader).AssemblyQualifiedName;  
            }  
        } 

    Problem signature:

     

    Problem Event Name: APPCRASH

    Application Name: vcsexpress.exe

    Application Version: 9.0.21022.8

    Application Timestamp: 4731613f

    Fault Module Name: unknown

    Fault Module Version: 0.0.0.0

    Fault Module Timestamp: 00000000

    Exception Code: c00000fd

    Exception Offset: 0c5c90c9

    OS Version: 6.0.6001.2.1.0.768.3

    Locale ID: 2057

     

    Additional information about the problem:

     

    LCID: 1033

     

    Read our privacy statement:

    http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409

     

     

     

    binarytweed.com
    New games that're a bit like old games, but better.
  • 09-06-2008 2:32 PM In reply to

    Re: 3.0 CTP Crash on XML Import

    Microsoft XNA Game Studio 3.0
    Build 3.0.10426.0
    binarytweed.com
    New games that're a bit like old games, but better.
  • 09-07-2008 12:24 PM In reply to

    Re: 3.0 CTP Crash on XML Import

    Hmm... It looks like Visual Studio is falling over when 'building' the XML file. All the other projects in my solution build fine, and there's no problem with the build process generating XNBs for my grpics resources - it's just the XML file.

    I'm guessing there's either a bug in my version of VS or XNA 3.0 CTP, or there's some kind of error croping up because of something I've done in my project. Has anyone else experienced something similar? This is driving me crazy!

    binarytweed.com
    New games that're a bit like old games, but better.
  • 09-08-2008 4:16 PM In reply to

    Re: 3.0 CTP Crash on XML Import

    'ello all,

    After a weekend of repeatedly headbutting the nearest concrete wall, I discovered the root cause was an infinite loop in my setter.

    I'm not familiar with this abbreviated 'convenience' feature of C#, so totally spacked it up. I hereby declare the mechanism a work of Satan, and declare that it had absolutely nothing to do with my own ineptitude *cough*.

    public String testBaseName  
            {  
                get { return testBaseName; }  
                set { testBaseName = value; }  
            } 

     

    In my defence, the Visual Studio error message could've been a lot more helpful.

    Now all I have to do is figure out why it's now insisting my ContentTypeWriter implementation doesn't exist...

    binarytweed.com
    New games that're a bit like old games, but better.
Page 1 of 1 (4 items) Previous Next