[Mono-bugs] [Bug 72850][Nor] New - null ref exception only when using a bundle
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 22 Feb 2005 10:45:59 -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 james@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=72850
--- shadow/72850 2005-02-22 10:45:59.000000000 -0500
+++ shadow/72850.tmp.16397 2005-02-22 10:45:59.000000000 -0500
@@ -0,0 +1,60 @@
+Bug#: 72850
+Product: Mono: Tools
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: tools
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: james@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: null ref exception only when using a bundle
+
+The following bit of code will run fine as a regular assembly, but in a
+bundle it gives a null ref exception.
+
+using System;
+using System.IO;
+using System.Net.Sockets;
+using Mono.Posix;
+
+
+public class Foo {
+
+
+ public static void Main (string[] args) {
+ try {
+ UnixEndPoint ep = new UnixEndPoint
+("/tmp/foobar.socket");
+ Socket server = new Socket (ep.AddressFamily,
+SocketType.Stream, 0);
+ server.Bind (ep);
+
+
+ Console.WriteLine ("Local End Point: " +
+server.LocalEndPoint);
+
+
+ server.Close ();
+ } finally {
+ File.Delete ("/tmp/foobar.socket");
+ }
+ }
+}
+
+
+And the exception it gives when run in a bundle is:
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in (unmanaged) 0x4012a9e6
+in <0x00004> (wrapper managed-to-native)
+System.Net.Sockets.Socket:LocalEndPoint_internal (intptr,int&)
+in <0x00034> System.Net.Sockets.Socket:get_LocalEndPoint ()
+in <0x00074> Foo:Main (string[])