[Mono-bugs] [Bug 63852][Wis] New - activator.createinstance bug
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 24 Aug 2004 14:11:13 -0400 (EDT)
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 meddochat@zonnet.nl.
http://bugzilla.ximian.com/show_bug.cgi?id=63852
--- shadow/63852 2004-08-24 14:11:13.000000000 -0400
+++ shadow/63852.tmp.5912 2004-08-24 14:11:13.000000000 -0400
@@ -0,0 +1,59 @@
+Bug#: 63852
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: meddochat@zonnet.nl
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: activator.createinstance bug
+
+Description of Problem:
+ Activator.CreateInstance returns NullReferenceException when using a
+ Args array with null items.
+
+Steps to reproduce the problem:
+1. Build the following source using "mcs test.cs" (rename it if you want,
+but then you should also modify the source!):
+--- begin source snippet ---
+using System;
+
+namespace Test
+{
+ class ConsoleDrv
+ {
+ public ConsoleDrv(object Temp)
+ {
+ }
+ static void Main()
+ {
+ Activator.CreateInstance(Type.GetType
+("Test.ConsoleDrv, Test"), new object[] {null});
+ }
+ }
+}
+--- end source snippet ---
+2. Run it :-)
+
+Actual Results:
+ NullReferenceException at Activator.CreateInstance(Type, object[],
+ object[]) at
+ for (int i = 0; i < length; ++i) {
+ atypes [i] = args [i].GetType (); // this line throws exception
+ }
+
+Expected Results:
+app writes nothing to console
+
+How often does this happen?
+always
+
+Additional Information: