зеркало из https://github.com/mono/mail-archives.git
145 строки
5.6 KiB
HTML
145 строки
5.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 75233][Nor] New - constructor incomplete in
|
|
System.Runtime.Serialization.Formatter resulting in
|
|
NullReferenceException when using
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2075233%5D%5BNor%5D%20New%20-%20constructor%20incomplete%20in%0A%09System.Runtime.Serialization.Formatter%20resulting%20in%0A%09NullReferenceException%20when%20using&In-Reply-To=bug-75233%40chernobyl.ximian.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="030287.html">
|
|
<LINK REL="Next" HREF="030289.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 75233][Nor] New - constructor incomplete in
|
|
System.Runtime.Serialization.Formatter resulting in
|
|
NullReferenceException when using</H1>
|
|
<B>bugzilla-daemon at bugzilla.ximian.com</B>
|
|
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2075233%5D%5BNor%5D%20New%20-%20constructor%20incomplete%20in%0A%09System.Runtime.Serialization.Formatter%20resulting%20in%0A%09NullReferenceException%20when%20using&In-Reply-To=bug-75233%40chernobyl.ximian.com"
|
|
TITLE="[Mono-bugs] [Bug 75233][Nor] New - constructor incomplete in
|
|
System.Runtime.Serialization.Formatter resulting in
|
|
NullReferenceException when using">bugzilla-daemon at bugzilla.ximian.com
|
|
</A><BR>
|
|
<I>Sat Jun 11 13:48:40 EDT 2005</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="030287.html">[Mono-bugs] [Bug 75232][Min] New - GameComm.exe causes a SIGSEGV
|
|
</A></li>
|
|
<LI>Next message: <A HREF="030289.html">[Mono-bugs] [Bug 75234][Nor] New - Calendar Component doesn't
|
|
render TitleStyle-Font-Bold="True"
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#30288">[ date ]</a>
|
|
<a href="thread.html#30288">[ thread ]</a>
|
|
<a href="subject.html#30288">[ subject ]</a>
|
|
<a href="author.html#30288">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>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 <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">dlacroix at erasme.org.</A>
|
|
|
|
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=75233">http://bugzilla.ximian.com/show_bug.cgi?id=75233</A>
|
|
|
|
--- shadow/75233 2005-06-11 13:48:40.000000000 -0400
|
|
+++ shadow/75233.tmp.13434 2005-06-11 13:48:40.000000000 -0400
|
|
@@ -0,0 +1,70 @@
|
|
+Bug#: 75233
|
|
+Product: Mono: Class Libraries
|
|
+Version: 1.1
|
|
+OS: All
|
|
+OS Details:
|
|
+Status: NEW
|
|
+Resolution:
|
|
+Severity:
|
|
+Priority: Normal
|
|
+Component: System
|
|
+AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
|
|
+ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">dlacroix at erasme.org</A>
|
|
+QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
|
|
+TargetMilestone: ---
|
|
+URL:
|
|
+Cc:
|
|
+Summary: constructor incomplete in System.Runtime.Serialization.Formatter resulting in NullReferenceException when using
|
|
+
|
|
+Please fill in this template when reporting a bug, unless you know what you
|
|
+are doing.
|
|
+Description of Problem:
|
|
+The constructor of System.Runtime.Serialization.Formatter class is incomplete.
|
|
+
|
|
+It is it's job to initialize the following properties of the abstract class:
|
|
+
|
|
+protected ObjectIDGenerator m_idGenerator;
|
|
+protected Queue m_objectQueue;
|
|
+
|
|
+else, if you use the helper method GetNext and Schedule you will receive an
|
|
+exception because of nul value. Of course, you can initialie them in you
|
|
+Formatter implementation but I don't think it is the place to do that.
|
|
+
|
|
+Steps to reproduce the problem:
|
|
+1. Write a Formatter which inherit from System.Runtime.Serialization.Formatter
|
|
+2. Create new instance of you serializer
|
|
+3. Call the virtual Schedule method in your formatter
|
|
+
|
|
+
|
|
+
|
|
+Actual Results:
|
|
+Unhandled Exception: System.NullReferenceException: Object reference not
|
|
+set to an instance of an object
|
|
+in <0x00038> System.Runtime.Serialization.Formatter:Schedule (System.Object
|
|
+obj)
|
|
+
|
|
+
|
|
+Expected Results:
|
|
+no exception
|
|
+
|
|
+
|
|
+How often does this happen?
|
|
+every time
|
|
+
|
|
+
|
|
+Additional Information:
|
|
+Here is a proposed patch:
|
|
+
|
|
+--- ./mcs/class/corlib/System.Runtime.Serialization/Formatter.cs
|
|
+2005-03-30 23:21:42.000000000 +0200
|
|
++++ ./mcs/class/corlib/System.Runtime.Serialization/Formatter.cs.new
|
|
+2005-06-11 19:37:20.548182208 +0200
|
|
+@@ -43,6 +43,8 @@
|
|
+ {
|
|
+ protected Formatter ()
|
|
+ {
|
|
++ m_objectQueue = new Queue ();
|
|
++ m_idGenerator = new ObjectIDGenerator ();
|
|
+ }
|
|
+
|
|
+ protected ObjectIDGenerator m_idGenerator;
|
|
</PRE>
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="030287.html">[Mono-bugs] [Bug 75232][Min] New - GameComm.exe causes a SIGSEGV
|
|
</A></li>
|
|
<LI>Next message: <A HREF="030289.html">[Mono-bugs] [Bug 75234][Nor] New - Calendar Component doesn't
|
|
render TitleStyle-Font-Bold="True"
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#30288">[ date ]</a>
|
|
<a href="thread.html#30288">[ thread ]</a>
|
|
<a href="subject.html#30288">[ subject ]</a>
|
|
<a href="author.html#30288">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
|
|
mailing list</a><br>
|
|
</body></html>
|