[Mono-bugs] [Bug 55499][Nor] New - MS.NET and Mono serialization of Booleans incompatible
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 12 Mar 2004 07:00:48 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by shortcircuitfky@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=55499
--- shadow/55499 2004-03-12 07:00:48.000000000 -0500
+++ shadow/55499.tmp.16941 2004-03-12 07:00:48.000000000 -0500
@@ -0,0 +1,64 @@
+Bug#: 55499
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: shortcircuitfky@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: MS.NET and Mono serialization of Booleans incompatible
+
+Description of Problem:
+
+When I went to test Mono (0.30 under Windows), I found that it didn't work.
+ It was just a very simple UI control test. So I downloaded the latest
+class libraries from the website, and rebuilt them. No luck. Trudging
+through the error messages, I found this on the top of the error stack:
+
+Unhandled Exception: System.Runtime.Serialization.SerializationException:
+Field "m_value" not found in class System.Boolean
+in <0x00517>
+System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadTypeMetadata
+(System.IO.BinaryReader,bool)
+
+Well, I had the class library source, so I went-a-hunting.
+
+Eventually, after getting an idea from the binary serialization format
+docs, I figured out the problem was the name of an internal variable in
+System.Boolean: it was `value' where MS.NET used `m_value'. So I fixed it
+up and... error disappeared! Of course, it was replaced with another one,
+but oh well; one step at a time.
+
+I've made a patch for the offending file, as well as a test case to see
+this for yourself. I'll attach them... once I work out HOW (it's my first
+bug...)
+
+Steps to reproduce the problem:
+1. Serialize a boolean using the MS .NET runtime
+2. Attempt to deserialize it with Mono
+3. Urk
+
+Actual Results:
+
+Rather unpleasant error messages (see above)
+
+Expected Results:
+
+No error messages (oh, and a deserialized boolean, of course).
+
+How often does this happen?
+
+Every time with the latest (in so far as I know) version of corlib
+
+Additional Information:
+
+Can be fixed by changing the name of the internal variable `value' in
+corlib/System/Boolean.cs to `m_value'