we run all tests and the error occurs randomly for methods, projects...
here is the letest lucky one:
public override void StartService()
{
try
{
XXXTracer.Write("XXXX StartService.");
if (ServiceState == ServiceState.Started)
{
throw new ServiceAlreadyStartedException(Resources.ApplicationInfoAlreadyStarted);
}
ScanApplications();
ServiceState = ServiceState.Started;
}
catch (Exception ex)
{
ServiceState = ServiceState.Malfunction;
throw new Exception(Resources.ApplicationInfoStartingFailed, ex);
}
}
...
XXXTracer just uses TraceSource object and trace info
...
ServiceState is a simple property setter
....
Isolate.NonPublic.WhenCalled(service, "ScanApplications").IgnoreCall();
....
exception:
System.AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at XXX.YYY.StartService()
at XXX.YYY.ZZZ.CCCTests.ApplicationsProperty_ServiceStarted_EmptyApplicationList() in E:Test.cs:line 35
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)
at