[Mono-bugs] [Bug 459948] New: Dictionary crash after fast insertions

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Dec 17 15:45:36 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=459948


           Summary: Dictionary crash after fast insertions
           Product: Mono: Class Libraries
           Version: 2.0.x
          Platform: 64bit
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: arno at arnorehn.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Description of Problem:
My app crashes after I have inserted ca. 9000-10000 entries into a
System.Collections.Generic.Dictionary<IntPtr, WeakReference>. In between there
are also some removals.

Steps to reproduce the problem:
I wasn't able to produce a test case.. Up to now I can only reproduce it with
this app.


Actual Results:
UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception 
has been thrown by the target of an invocation. ---> 
System.IndexOutOfRangeException: Array index is out of range.                   
  at 
System.Collections.Generic.Dictionary`2[System.IntPtr,System.WeakReference].set_Item 
(IntPtr key, System.WeakReference value) [0x00116] in /var/tmp/portage/dev-
lang/mono-2.0.1/work/mono-2.0.1/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:180 
  at Qyoto.SmokeMarshallers.MapPointer (IntPtr ptr, IntPtr instancePtr, 
Boolean createGlobalReference) [0x00016] in 
/home/pumphaus/dev/KDE/kdebindings/csharp/qyoto/src/SmokeMarshallers.cs:361     
  at (wrapper native-to-managed) Qyoto.SmokeMarshallers:MapPointer 
(intptr,intptr,bool)                                      
  at (wrapper managed-to-native) Qyoto.SmokeInvocation:CallSmokeMethod 
(intptr,int,intptr,intptr,int)                        
  at Qyoto.SmokeInvocation.Invoke (System.String mungedName, System.String 
signature, System.Type returnType, System.Object[] args) [0x003d1] in 
/home/pumphaus/dev/KDE/kdebindings/csharp/qyoto/src/SmokeInvocation.cs:610      
  at Qyoto.QRectF..ctor (Double left, Double top, Double width, Double height) 
[0x0000d] in /home/pumphaus/dev/KDE/kdebindings/csharp/qyoto/core/QRectF.cs:30  
  at 
Synapse.QtClient.AvatarGrid`1+GraphicsRosterItem`1[Synapse.UI.AccountItemPair,Synapse.UI.AccountItemPair].BoundingRect 
() [0x00000]                                                                    
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke 
(object,object[],System.Exception&)             
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags 
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, 
System.Globalization.CultureInfo culture) [0x00057] in /var/tmp/portage/dev-
lang/mono-2.0.1/work/mono-2.0.1/mcs/class/corlib/System.Reflection/MonoMethod.cs:157 
  --- End of inner exception stack trace ---                                    
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags 
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, 
System.Globalization.CultureInfo culture) [0x00071] in /var/tmp/portage/dev-
lang/mono-2.0.1/work/mono-2.0.1/mcs/class/corlib/System.Reflection/MonoMethod.cs:167 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] 
parameters) [0x00000] in /var/tmp/portage/dev-
lang/mono-2.0.1/work/mono-2.0.1/mcs/class/corlib/System.Reflection/MethodBase.cs:110 
  at Qyoto.SmokeInvocation.InvokeMethod (IntPtr instanceHandle, IntPtr 
methodHandle, IntPtr stack) [0x00416] in 
/home/pumphaus/dev/KDE/kdebindings/csharp/qyoto/src/SmokeInvocation.cs:216      
  at (wrapper native-to-managed) Qyoto.SmokeInvocation:InvokeMethod 
(intptr,intptr,intptr)                                   
  at (wrapper managed-to-native) Qyoto.SmokeInvocation:CallSmokeMethod 
(intptr,int,intptr,intptr,int)                        
  at Qyoto.SmokeInvocation.Invoke (System.String mungedName, System.String 
signature, System.Type returnType, System.Object[] args) [0x00399] in 
/home/pumphaus/dev/KDE/kdebindings/csharp/qyoto/src/SmokeInvocation.cs:603      
  at Qyoto.QApplication.Exec () [0x00000] in 
/home/pumphaus/dev/KDE/kdebindings/csharp/qyoto/gui/QApplication.cs:278         
  at Synapse.QtClient.Client..ctor (System.String[] args) [0x00000]             
  at Synapse.QtClient.Client.Main (System.String[] args) [0x00000]

Expected Results:
No crash.

How often does this happen? 
Always after some thousands of insertions. It's not fixed to a specific number,
though. It's always between 8000 and 10000.

Additional Information:
A Hashtable works well and doesn't crash.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list