dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bug] CultureInfo constructor crashes


From: Bruno Haible
Subject: [Pnet-developers] [bug] CultureInfo constructor crashes
Date: Thu, 18 Dec 2003 15:38:04 +0100
User-agent: KMail/1.5

Using pnet-0.6.0.

Here are two crashes of CultureInfo constructors:

1) When trying to create a CultureInfo equal to the default locale:
==================== hello.cs =======================
using System;
using System.Globalization;
class Hello {
  static void Main() {
    new CultureInfo("de-DE");
  }
}
=====================================================

$ cscc hello.cs -o hello.exe
$ LANG=fr_FR ilrun hello.exe
; ok, no error
$ LANG=de_DE ilrun hello.exe
Uncaught exception: System.ArgumentException: Es gibt bereits einen Eintrag mit 
dem angegebenen Schluessel
        at System.Collections.Hashtable.Add(Object, Object) in 
./System/Collections/Hashtable.cs
        at I18N.Common.Manager.Instantiate(String)
        at I18N.Common.Manager.GetCulture(String, Boolean)
        at System.Reflection.ClrMethod.Invoke(Object, BindingFlags, Binder, 
Object[], CultureInfo)
        at System.Reflection.ClrType.InvokeMember(String, BindingFlags, Binder, 
Object, Object[], ParameterModifier[], CultureInfo, String[]) in 
./System/Reflection/ClrType.cs
        at System.Text.Encoding.InvokeI18N(String, Object[]) in 
./System/Text/Encoding.cs
        at System.Globalization.CultureInfo.GetCultureHandler(String, Boolean) 
in ./System/Globalization/CultureInfo.cs
        at System.Globalization.CultureInfo..ctor(String, Boolean) in 
./System/Globalization/CultureInfo.cs
        at System.Globalization.CultureInfo..ctor(String)
        at Hello.Main()


2) When trying to create a neutral CultureInfo:
==================== hello.cs =======================
using System;
using System.Globalization;
class Hello {
  static void Main() {
    new CultureInfo("");
  }
}
=====================================================

$ cscc hello.cs -o hello.exe
$ ilrun hello.exe
Uncaught exception: System.NullReferenceException: The value 'null' was found 
where an instance of an object was required
        at System.Globalization.CultureInfo..ctor(String, Boolean) in 
./System/Globalization/CultureInfo.cs
        at System.Globalization.CultureInfo..ctor(String)
        at Hello.Main()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]