[Mono-list] System.DivideByZeroException in HashTable?
Robert Jordan
robertj at gmx.net
Tue Jul 26 04:42:33 EDT 2011
On 26.07.2011 05:01, Ben Pryor wrote:
> I sometimes get this exception (mono 2.8) - running fully bundled (exe +
> deps). It happens very rarely. 64 bit suse system.
>
> How is this exception possible?
It's `impossible' from a managed standpoint.
Looking at the stacktrace, the invoked ctor is actually
HashTable(int capacity), which in turn is calling
HashTable(int capacity, float loadFactor) with a loadFactor
of 1.0f. The HashTable.loadFactor field is a float, so
this.loadFactor = 0.75f*loadFactor;
double tableSize = capacity / this.loadFactor;
can't fail.
It looks like a JIT issue. Try with Mono 2.10.
Robert
>
> Stack Trace:
> at System.Collections.Hashtable..ctor (Int32 capacity, Single
> loadFactor, IHashCodeProvider hcp, IComparer comparer) [0x00000] in
> <filename unknown>:0
> at System.Collections.Hashtable..ctor (Int32 capacity, Single
> loadFactor) [0x00000] in<filename unknown>:0
> at System.Collections.Hashtable..ctor (Int32 capacity) [0x00000] in
> <filename unknown>:0
> at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider
> obj, System.Type attributeType, Boolean inherit) [0x00000] in<filename
> unknown>:0
> at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider
> obj, Boolean inherit) [0x00000] in<filename unknown>:0
> at System.Reflection.MonoField.GetCustomAttributes (Boolean inherit)
> [0x00000] in<filename unknown>:0
>
More information about the Mono-list
mailing list