This repository was archived by the owner on Nov 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 245
This repository was archived by the owner on Nov 15, 2021. It is now read-only.
Random access violations with VS2015 compiler and OpenCover 4.6.166 / 4.5.3723 #329
Copy link
Copy link
Closed
Labels
Milestone
Description
I upgraded recently from VS2010 .NET 4.0 / OpenCover 4.5.3522 to
VS2015 .NET 4.0 (uses .NET 4.5 compiler to generate .NET 4.0) / OpenCover 4.5.3723 / 4.6.166
When running my unit tests compiled with VS2010 and OpenCover 4.5.3522 they work fine.
When running my unit tests compiled with VS2015 without OpenCover they work fine.
When running with OC 4.6.166 or 4.5.3723 they crash randomly.
I cannot use a version < 4.5.3723 because of #319 .
Mostly there is an AccessVioloationException
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.CannotUnloadAppDomainException.VisitedCritical(Int32 )
at System.CannotUnloadAppDomainException.SafeVisited(Int32 )
(anonymized)
or sometimes an ArgumentOutOfRangeException:
Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
[asyncexec] Parameter name: startIndex
[asyncexec] at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
[asyncexec] at System.BitConverter.ToUInt32(Byte[] value, Int32 startIndex)
[asyncexec] at OpenCover.Framework.Persistance.BasePersistance.SaveVisitData(Byte[] data) in c:\projects\opencover\main\OpenCover.Framework\Persistance\BasePersistance.cs:line 494
[asyncexec] at OpenCover.Framework.Manager.ProfilerManager.<>c__DisplayClass7.<SaveVisitData>b__6(Object state) in c:\projects\opencover\main\OpenCover.Framework\Manager\ProfilerManager.cs:line 157
[asyncexec] at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[asyncexec] at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[asyncexec] at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
[asyncexec] at System.Threading.ThreadPoolWorkQueue.Dispatch()
Reactions are currently unavailable