[Mono-bugs] [Bug 660424] New: Problems Deserializing DateTime From MS.NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Dec 18 12:29:35 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=660424

https://bugzilla.novell.com/show_bug.cgi?id=660424#c0


           Summary: Problems Deserializing DateTime From MS.NET
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.8.x
          Platform: x86-64
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: WCF
        AssignedTo: atsushi at ximian.com
        ReportedBy: fourmont at gmx.de
         QAContact: mono-bugs at lists.ximian.com
                CC: fourmont at gmx.de
          Found By: DeveloperNet
           Blocker: ---


Created an attachment (id=405512)
 --> (http://bugzilla.novell.com/attachment.cgi?id=405512)
Test for DateTime serialization bug

Deserializing a DateTime with Kind=DateTimeKind.UTC or DateTimeKind.Local
serialized by MS.NET fails in Mono: Mono seems to interpret the serialized
int64 as ticks and thus gets confused by the two bits used for DateTimeKind if
these are !=0 (DateTimeKind.Unseciefied)

See attached test program

Dump:

Unhandled Exception: System.ArgumentOutOfRangeException: Value
5245968917228359778 is outside the valid range [0,3155378975999999999].
Parameter name: ticks
  at System.DateTime.InvalidTickValue (Int64 ticks) [0x00000] in <filename
unknown>:0 
  at System.DateTime..ctor (Int64 ticks) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlBinaryDictionaryReader.ReadTextOrValue (Byte ident,
System.Xml.NodeInfo node, Boolean canSkip) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlBinaryDictionaryReader.Read () [0x00000] in <filename
unknown>:0 
  at System.Xml.XmlReader.ReadStartElement () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDictionaryReader.ReadElementContentAsString () [0x00000] in
<filename unknown>:0 
  at System.Runtime.Serialization.XmlFormatterDeserializer.DeserializeCore
(System.Type type, System.Xml.XmlReader reader) [0x00000] in <filename
unknown>:0 
  at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Type type, System.Xml.XmlReader reader) [0x00000] in <filename
unknown>:0 
  at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Xml.XmlReader reader, System.Type type,
System.Runtime.Serialization.KnownTypeCollection knownTypes,
IDataContractSurrogate surrogate, System.String name, System.String ns, Boolean
verifyObjectName) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.DataContractSerializer.ReadObject
(System.Xml.XmlDictionaryReader reader, Boolean verifyObjectName) [0x00000] in
<filename unknown>:0 
  at System.Runtime.Serialization.XmlObjectSerializer.ReadObject
(System.Xml.XmlDictionaryReader reader) [0x00000] in <filename unknown>:0 
  at
System.ServiceModel.Dispatcher.DataContractMessagesFormatter.MessageToParts
(System.ServiceModel.Description.MessageDescription md,
System.ServiceModel.Channels.Message message) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Dispatcher.BaseMessagesFormatter.DeserializeReply
(System.ServiceModel.Channels.Message message, System.Object[] parameters)
[0x00000] in <filename unknown>:0 
  at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeReply
(System.ServiceModel.Channels.Message message, System.Object[] parameters)
[0x00000] in <filename unknown>:0 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request
(System.ServiceModel.Description.OperationDescription od, System.Object[]
parameters) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess
(System.Reflection.MethodBase method, System.String operationName,
System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process
(System.Reflection.MethodBase method, System.String operationName,
System.Object[] parameters) [0x00000] in <filename unknown>:0

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list