Hi,
I have a test that tests some part of my code, the test raises 100 threads that add creates and add new objects we use.
The test intermittently crashes on one of the background threads.
I have raised the number of threads to 1000 and now it happens more frequently (at least 1 crash in 1-5 runs).
The call stack indicates that it throws a KeyNotFoundException in typemock code.
The code in which it seems to crash is registering a delegate on an event but they are not mocked...
The call stack shows:
Got exception. Thread=AddSuccessedMultiThreads Worker Thread 435, ex=System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at gv.a(Object A_0, String A_1, Object[] A_2)
at TypeMock.MockManager.a(String A_0, String A_1, Object A_2, Object A_3, Boolean A_4, Boolean A_5, Object[] A_6)
at TypeMock.InternalMockManager.getReturn(Object that, String typeName, String methodName, Object methodParameters, Boolean isInjected, Boolean isInterceptedType, Object p1)
at Indigo.Infra.ManagedData.ManagedDataInfra.ManagedData.add_PropertyChanged(PropertyChangedEventHandler value)
... internal code
Can you please check to see what the crashing code is doing? perhaps it will help me understand if this is something i'm doing wrong or a bug?
Thanks,
Moshe.