locked
OutOfMemoryException RRS feed

  • Question

  • Hi,

    I have a Windows (WPF) app that reads xml data (forward cursor read with the xmlreader - so that part is efficient).  

    Task Manager shows my app is using 1.3GB and 2.8GB in all.
    My machinge is an XP Version 2002 SP2, Intel Core2 Duo CPU E6550@2.33GHz, with 4GB RAM.

    My app isnt releasing memory ... it's tje issue i am debugging... but i noticed that suddenly i ran into a limit.

    I XmlReader throws an OutOfMemoryException at exactly at 1.3GB memory usage for the app and 2.8GB usage for all processes....

    i am actually som distance from the 4GB RAMinstalled on the machine ... 

    (a) Why is the limit there and not elewhere?
    (b) Are there settings somewhere that influence this limit.
    (c) I am also spawning from the XML read on a seperate thread - i might need to consider how i spawn this thread to influence its memory usage .... this is expecially the info i am fishing for with this post...

    The exception is below.

    Thanks,
    Paul


    [System.OutOfMemoryException] = {System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
      
      at System.String.CtorCharArrayStartLength(Char[] value, Int32 startIndex, Int32 length)
       at System.Xml.XmlTextReaderImpl.NodeData.get_StringValue()
       at System.Xml.XmlTextReaderImpl.get_Value()
       at System.Xml.XsdValidatingReader.GetStringValue()
       at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String lName, String ns, XmlValueGetter attributeValueGetter, String attributeStringValue, XmlSchemaInfo schemaInfo)
       at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String localName, String namespaceUri, XmlValueGetter attributeValue, XmlSchemaInfo schemaInfo)
       at System.Xml.XsdValidatingReader.ValidateAttributes()
       at System.Xml.XsdValidatingReader.ProcessElementEvent()
       at System.Xml.XsdValidatingReader.ProcessReaderEvent()
       at System.Xml.XsdValidatingReader.Read()
       at Cat.logimport.CDFLogImporter.LoadLog(Object param) in V:\PCF_Schwartzberg_CAT_Development\PCF_CAT\Source\Cat.net\Common_Analysis_Tool\logimport\CDFLogImporter.cs:line 680
    Thanks, Paul
    Tuesday, March 3, 2009 8:55 PM

Answers