[Mono-bugs] [Bug 51303][Wis] New - NullReferenceException on Dns.GetHostByName(string)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 23 Nov 2003 08:10:39 -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 neeeeeep@bigpond.com.

http://bugzilla.ximian.com/show_bug.cgi?id=51303

--- shadow/51303	2003-11-23 08:10:39.000000000 -0500
+++ shadow/51303.tmp.32678	2003-11-23 08:10:39.000000000 -0500
@@ -0,0 +1,72 @@
+Bug#: 51303
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: neeeeeep@bigpond.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: NullReferenceException on Dns.GetHostByName(string)
+
+Description of Problem:
+
+NullReferenceException on call to Dns.GetHostByName(string). Looks like its
+ooccuring in the unmanaged space...
+
+Steps to reproduce the problem:
+1. 
+
+using System.Net;
+using System;
+
+public class TestIt
+{
+   public static void Main()
+   {
+     
+Console.WriteLine(Dns.GetHostByName("localhost").AddressList[0].ToString());
+   }
+}
+
+2. 
+
+Compile.
+
+3. 
+
+Run.
+
+Actual Results:
+
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required
+in (unmanaged) /usr/local/lib/libmono.so.0(mono_class_from_name+0xa4)
+[0x400c6d14]
+in (unmanaged) /usr/local/lib/libmono.so.0 [0x400a56e2]
+in (unmanaged) /usr/local/lib/libmono.so.0 [0x400a707c]
+in (unmanaged) /usr/local/lib/libmono.so.0 [0x400a75cb]
+in <0x00066> System.Net.Dns:GetHostByName (string)
+in <0x00010> .TestIt:Main ()
+
+
+Expected Results:
+
+.NET 1.1:
+
+127.0.0.1
+
+How often does this happen? 
+
+Everytime
+
+Additional Information:
+
+Occured with mono source snapshot from 20/Nov/03.