Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#2096 closed defect (done)

Persistence has issues with certain characters

Reported by: abeham Owned by: gkronber
Priority: medium Milestone: HeuristicLab 3.3.11
Component: Persistence Version: 3.3.8
Keywords: Cc:

Description (last modified by abeham)

The persistence serialized the string

<PRIMITIVE typeId="5" name="description" id="1346827"><![CDATA[RUNDPUFFER 25X20 2]]></PRIMITIVE>

The string contained the hexadecimal character 0x15 (NAK - NegativeAcknowledge) between "RUNDPUFFER" and "25X20". It was serialized fine, but the parser threw an exception upon deserialization.

HeuristicLab.Persistence.Core.PersistenceException occurred
  HResult=-2146233088
  Message=Unexpected exception during deserialization
  Source=HeuristicLab.Persistence-3.3
  StackTrace:
       at HeuristicLab.Persistence.Default.Xml.XmlParser.Deserialize(Stream stream)
       at HeuristicLab.EnterpriseOptimization.Common.MemoryMappedDataProvider.CheckoutAll() in c:\...\MemoryMappedDataProvider.cs:line 96
  InnerException: System.Xml.XmlException
       HResult=-2146232000
       Message=' ', hexadecimal value 0x15, is an invalid character. Line 13468830, position 81.
       Source=System.Xml
       LineNumber=13468830
       LinePosition=81
       SourceUri=""
       StackTrace:
            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(Char[] data, Int32 length, Int32 invCharPos)
            at System.Xml.XmlTextReaderImpl.ParseCDataOrComment(XmlNodeType type, Int32& outStartPos, Int32& outEndPos)
            at System.Xml.XmlTextReaderImpl.ParseCDataOrComment(XmlNodeType type)
            at System.Xml.XmlTextReaderImpl.ParseCData()
            at System.Xml.XmlTextReaderImpl.ParseElementContent()
            at System.Xml.XmlTextReaderImpl.Read()
            at System.Xml.XmlTextReader.Read()
            at System.Xml.XmlSubtreeReader.Read()
            at System.Xml.XmlReader.WriteNode(XmlWriter xtw, Boolean defattr)
            at System.Xml.XmlReader.ReadInnerXml()
            at HeuristicLab.Persistence.Default.Xml.XmlParser.<ParsePrimitive>d__4.MoveNext()
            at HeuristicLab.Persistence.Default.Xml.XmlParser.<GetEnumerator>d__1.MoveNext()
            at HeuristicLab.Persistence.Default.Xml.XmlParser.<ParseComposite>d__e.MoveNext()
            at HeuristicLab.Persistence.Default.Xml.XmlParser.<GetEnumerator>d__1.MoveNext()
            at HeuristicLab.Persistence.Default.Xml.XmlParser.<ParseComposite>d__e.MoveNext()
            at HeuristicLab.Persistence.Default.Xml.XmlParser.<GetEnumerator>d__1.MoveNext()
            at HeuristicLab.Persistence.Default.Xml.XmlParser.<ParseComposite>d__e.MoveNext()
            at HeuristicLab.Persistence.Default.Xml.XmlParser.<GetEnumerator>d__1.MoveNext()
            at HeuristicLab.Persistence.Core.Deserializer.Deserialize(IEnumerable`1 tokens)
            at HeuristicLab.Persistence.Default.Xml.XmlParser.Deserialize(Stream stream)
       InnerException: 

Change History (9)

comment:1 Changed 4 years ago by abeham

  • Description modified (diff)

comment:2 Changed 3 years ago by epitzer

  • Owner changed from epitzer to mkommend
  • Status changed from new to assigned

r10895 introduce base 64 sections to deal with special characters within CDATA

comment:3 Changed 3 years ago by epitzer

  • Owner changed from mkommend to abeham
  • Status changed from assigned to reviewing

comment:4 Changed 3 years ago by epitzer

r10960 add treatment of special characters also to Char2XmlSerializer

comment:5 Changed 3 years ago by epitzer

  • Owner changed from abeham to gkronber

comment:6 Changed 3 years ago by ascheibe

  • Milestone changed from HeuristicLab 3.3.x Backlog to HeuristicLab 3.3.11

comment:7 Changed 3 years ago by gkronber

  • Status changed from reviewing to readytorelease

comment:8 Changed 3 years ago by gkronber

  • Resolution set to done
  • Status changed from readytorelease to closed

r11273: merged r10960 from trunk to stable

comment:9 Changed 3 years ago by mkommend

Forgot to merge the following revision into stable:

r11377: Merged r10895 into stable.

Note: See TracTickets for help on using tickets.