[Mono-bugs] [Bug 58189][Wis] New - CultureInfo.GetCultures(CultureTypes.InstalledWin32Cultures) throws NullRef and hangs

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 7 May 2004 06:36:40 -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 jaak@zd.com.pl.

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

--- shadow/58189	2004-05-07 06:36:40.000000000 -0400
+++ shadow/58189.tmp.27440	2004-05-07 06:36:40.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 58189
+Product: Mono: Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jaak@zd.com.pl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: CultureInfo.GetCultures(CultureTypes.InstalledWin32Cultures) throws NullRef and hangs
+
+This code:
+
+-----------
+using System;
+using System.Globalization;
+
+public class A
+{
+    public static void Main()
+    {
+        foreach (CultureInfo ci in
+CultureInfo.GetCultures(CultureTypes.InstalledWin32Cultures))
+        {
+            Console.WriteLine(ci);
+        }
+    }
+}
+------------
+Outputs:
+
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required.
+
+and hangs infinitely (have to use Ctrl-C to quit). I've noticed a TODO in
+code, but this should at least return an empty array, and not crash the
+whole runtime.
+
+OS: Fedora Core 1