[Mono-bugs] [Bug 74953][Maj] Changed - [GMCS] List<byte>.AddRange throws NullReferenceException

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun May 15 01:45:14 EDT 2005


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 bmaurer at users.sf.net.

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

--- shadow/74953	2005-05-15 00:47:48.000000000 -0400
+++ shadow/74953.tmp.27304	2005-05-15 01:45:14.000000000 -0400
@@ -1,23 +1,23 @@
 Bug#: 74953
-Product: Mono: Class Libraries
+Product: Mono: Compilers
 Version: 1.1
-OS: 
+OS: unknown
 OS Details: Ubuntu Linux 5.05 (Hoary)
 Status: NEW   
 Resolution: 
 Severity: Unknown
 Priority: Major
-Component: CORLIB
+Component: C#
 AssignedTo: martin at ximian.com                            
 ReportedBy: emrysk at gmail.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: List<byte>.AddRange throws NullReferenceException
+Summary: [GMCS] List<byte>.AddRange throws NullReferenceException
 
 I'm using Mono 1.1.7 built from source on Ubuntu (Hoary).
 
 The following is a working example.  It throws a NullReferenceException
 from AddRange.
 
@@ -48,6 +48,30 @@
 
 Unhandled Exception: System.NullReferenceException: A null value was found
 where an object instance was required.
 in <0x00022> System.Collections.Generic.List`1<System.Byte>:AddRange
 (IEnumerable`1 )
 in <0x0006d> Program:Main ()
+
+------- Additional Comments From bmaurer at users.sf.net  2005-05-15 01:45 -------
+More direct test case:
+
+using System;
+using System.Collections.Generic;
+
+class X {
+	static void Main ()
+	{
+		X <byte>.Y (new byte []{ 100, 100 });
+	}
+	
+	
+}
+
+class X <T> {
+	public static void Y (IEnumerable <T> x)
+	{
+		foreach (T t in x) {
+			Console.WriteLine (t);
+		}
+	}
+}


More information about the mono-bugs mailing list