G
Gary Davis
Once a day or so, I receive an error on a fairly active website that
calls this StrMixed.cs method constructor. 99% of the time there is no
exception:
System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. --->
System.InvalidOperationException: Hashtable insert failed. Load factor
too high.
at System.Collections.Hashtable.Insert(Object key, Object nvalue,
Boolean add)
at System.Collections.Hashtable.set_Item(Object key, Object value)
at AEC.StrMixed..ctor() in C:\Documents and
Settings\...\AEC\StrMixed.cs:line 97
A search on Google for "Load factor too high" and Hashtable did not
provide any insight.
The Hashtable created is fairly small and the trap occurs below:
public StrMixed()
{
Exceptions = new Hashtable();
Exceptions["3Do"] = "3DO";
Exceptions["A"] = "a";
Exceptions["Ac"] = "AC";
Exceptions["Ac-3"] = "AC-3";
Exceptions["Ac/Dc"] = "AC/DC";
Exceptions["Am/Fm"] = "AM/FM";
Exceptions["And"] = "and";
Exceptions["D.a.T"] = "D.A.T.";
Exceptions["De"] = "de";
Exceptions["Dr"] = "Dr";
Exceptions["Emi"] = "EMI";
Exceptions["En"] = "en";
Exceptions["For"] = "for";
Exceptions["Ft"] = "Ft";
Exceptions["Ii"] = "II";
Exceptions["Iii"] = "III";
Exceptions["Imax"] = "IMAX";
Exceptions["In"] = "in";
Exceptions["La"] = "la";
Exceptions["Los"] = "los";
Exceptions["Mac-Pc"] = "Mac-PC";
Exceptions["Macabre"] = "Macabre";
Exceptions["Macarena"] = "Macarena";
Exceptions["Macedonia"] = "Macedonia"; <-- Traps here
Exceptions["Macedonian"] = "Macedonian";
Exceptions["Mackie"] = "Mackie";
:
:
Since I know in advance the number of default entries added, should I
specify a load factor of some sort? This seems like a framework bug to
me.
Thanks
Gary Davis
calls this StrMixed.cs method constructor. 99% of the time there is no
exception:
System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. --->
System.InvalidOperationException: Hashtable insert failed. Load factor
too high.
at System.Collections.Hashtable.Insert(Object key, Object nvalue,
Boolean add)
at System.Collections.Hashtable.set_Item(Object key, Object value)
at AEC.StrMixed..ctor() in C:\Documents and
Settings\...\AEC\StrMixed.cs:line 97
A search on Google for "Load factor too high" and Hashtable did not
provide any insight.
The Hashtable created is fairly small and the trap occurs below:
public StrMixed()
{
Exceptions = new Hashtable();
Exceptions["3Do"] = "3DO";
Exceptions["A"] = "a";
Exceptions["Ac"] = "AC";
Exceptions["Ac-3"] = "AC-3";
Exceptions["Ac/Dc"] = "AC/DC";
Exceptions["Am/Fm"] = "AM/FM";
Exceptions["And"] = "and";
Exceptions["D.a.T"] = "D.A.T.";
Exceptions["De"] = "de";
Exceptions["Dr"] = "Dr";
Exceptions["Emi"] = "EMI";
Exceptions["En"] = "en";
Exceptions["For"] = "for";
Exceptions["Ft"] = "Ft";
Exceptions["Ii"] = "II";
Exceptions["Iii"] = "III";
Exceptions["Imax"] = "IMAX";
Exceptions["In"] = "in";
Exceptions["La"] = "la";
Exceptions["Los"] = "los";
Exceptions["Mac-Pc"] = "Mac-PC";
Exceptions["Macabre"] = "Macabre";
Exceptions["Macarena"] = "Macarena";
Exceptions["Macedonia"] = "Macedonia"; <-- Traps here
Exceptions["Macedonian"] = "Macedonian";
Exceptions["Mackie"] = "Mackie";
:
:
Since I know in advance the number of default entries added, should I
specify a load factor of some sort? This seems like a framework bug to
me.
Thanks
Gary Davis