locked
is this a bug for POS for .NET? RRS feed

  • Question

  • Is this a bug of POS for .NET library?

    When starting our program which refer Microsoft.PointOfService, claim device, then this event logs keep increasing in windows event viewer.

    Event 1. Recreating statistics Xml file.

     

    Event 2. An Xml exception occurred while attempting to load the statistics xml file.

     

    System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 16, position 50.

       at System.Xml.XmlTextReaderImpl.Throw(Exception e)

       at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)

       at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)

       at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)

       at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)

       at System.Xml.XmlTextReaderImpl.ParseNumericCharRef(Boolean expand, BufferBuilder internalSubsetBuilder, EntityType& entityType)

       at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)

       at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)

       at System.Xml.XmlTextReaderImpl.ParseAttributes()

       at System.Xml.XmlTextReaderImpl.ParseElement()

       at System.Xml.XmlTextReaderImpl.ParseElementContent()

       at System.Xml.XmlTextReaderImpl.Read()

       at System.Xml.XsdValidatingReader.Read()

       at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)

       at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)

       at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)

       at System.Xml.XmlDocument.Load(XmlReader reader)

       at Microsoft.PointOfService.BaseServiceObjects.DeviceStatistics.LoadAndValidateStatisticsXml(FileStream xmlStream)

     

    Thursday, November 19, 2009 4:10 AM

Answers

  • It sounds like that xml file is corrupt, or has had some bad data written to it. Hard to know whether it was Pos .Net that wrote the data, or one of the service objects.

    The file in question is probably in "C:\ProgramData\Microsoft\Point Of Service\Statistics".

    Try replacing it's contents with something like the following and hopefully it will fix the fault;

    <Devices>
      <Device Name="Microsoft Scanner Simulator" HwPath="109215842381310417321360156679104188197147">
        <Statistic Name="DeviceCategory" Value="Scanner" />
        <Statistic Name="CommunicationErrorCount" Value="0" />
        <Statistic Name="MechanicalRevision" Value="1.0" />
        <Statistic Name="ManufactureDate" Value="2004-05-23" />
        <Statistic Name="UnifiedPOSVersion" Value="1.12" />
        <Statistic Name="ModelName" Value="Scanner Simulator" />
        <Statistic Name="Interface" Value="Other" />
        <Statistic Name="SerialNumber" Value="Unknown" />
        <Statistic Name="FirmwareRevision" Value="Unknown" />
        <Statistic Name="HoursPoweredCount" Value="0" />
        <Statistic Name="InstallationDate" Value="2009-06-10" />
        <Statistic Name="GoodScanCount" Value="17" />
        <Statistic Name="ManufacturerName" Value="Microsoft Corporation" />
      </Device>
    </Devices>

    Are you able to cause this problem to happen at will ? If so, you should report the sequence of actions you take to corrupt the file, then someone from the Pos .Net team can determine if it is a bug in Pos .Net or not.
    Friday, November 20, 2009 2:22 AM
    Answerer

All replies

  • It sounds like that xml file is corrupt, or has had some bad data written to it. Hard to know whether it was Pos .Net that wrote the data, or one of the service objects.

    The file in question is probably in "C:\ProgramData\Microsoft\Point Of Service\Statistics".

    Try replacing it's contents with something like the following and hopefully it will fix the fault;

    <Devices>
      <Device Name="Microsoft Scanner Simulator" HwPath="109215842381310417321360156679104188197147">
        <Statistic Name="DeviceCategory" Value="Scanner" />
        <Statistic Name="CommunicationErrorCount" Value="0" />
        <Statistic Name="MechanicalRevision" Value="1.0" />
        <Statistic Name="ManufactureDate" Value="2004-05-23" />
        <Statistic Name="UnifiedPOSVersion" Value="1.12" />
        <Statistic Name="ModelName" Value="Scanner Simulator" />
        <Statistic Name="Interface" Value="Other" />
        <Statistic Name="SerialNumber" Value="Unknown" />
        <Statistic Name="FirmwareRevision" Value="Unknown" />
        <Statistic Name="HoursPoweredCount" Value="0" />
        <Statistic Name="InstallationDate" Value="2009-06-10" />
        <Statistic Name="GoodScanCount" Value="17" />
        <Statistic Name="ManufacturerName" Value="Microsoft Corporation" />
      </Device>
    </Devices>

    Are you able to cause this problem to happen at will ? If so, you should report the sequence of actions you take to corrupt the file, then someone from the Pos .Net team can determine if it is a bug in Pos .Net or not.
    Friday, November 20, 2009 2:22 AM
    Answerer
  • Hi,

    Can you provide some follow up to this post ?

    Thanks.
    Sunday, December 6, 2009 10:23 AM
    Answerer