{"action":"created","issue":{"url":"https://api.github.com/repos/OpenCover/opencover/issues/329","labels_url":"https://api.github.com/repos/OpenCover/opencover/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/OpenCover/opencover/issues/329/comments","events_url":"https://api.github.com/repos/OpenCover/opencover/issues/329/events","html_url":"https://github.com/OpenCover/opencover/issues/329","id":97453000,"number":329,"title":"Random access violations with VS2015 compiler and OpenCover 4.6.166 / 4.5.3723","user":{"login":"Sam13","id":2196081,"avatar_url":"https://avatars.githubusercontent.com/u/2196081?v=3","gravatar_id":"","url":"https://api.github.com/users/Sam13","html_url":"https://github.com/Sam13","followers_url":"https://api.github.com/users/Sam13/followers","following_url":"https://api.github.com/users/Sam13/following{/other_user}","gists_url":"https://api.github.com/users/Sam13/gists{/gist_id}","starred_url":"https://api.github.com/users/Sam13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sam13/subscriptions","organizations_url":"https://api.github.com/users/Sam13/orgs","repos_url":"https://api.github.com/users/Sam13/repos","events_url":"https://api.github.com/users/Sam13/events{/privacy}","received_events_url":"https://api.github.com/users/Sam13/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenCover/opencover/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/OpenCover/opencover/labels/high","name":"high","color":"444444"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":50,"created_at":"2015-07-27T12:33:43Z","updated_at":"2015-12-03T13:07:14Z","closed_at":null,"body":"I upgraded recently from VS2010 .NET 4.0 / OpenCover 4.5.3522 to\r\nVS2015 .NET 4.0 (uses .NET 4.5 compiler to generate .NET 4.0) / OpenCover 4.5.3723 / 4.6.166\r\n\r\nWhen running my unit tests compiled with VS2010 and OpenCover 4.5.3522 they work fine.\r\nWhen running my unit tests compiled with VS2015 without OpenCover they work fine.\r\n\r\nWhen running with OC 4.6.166 or 4.5.3723 they crash randomly.\r\nI cannot use a version < 4.5.3723 because of #319 .\r\n\r\nMostly there is an _AccessVioloationException_\r\n```\r\nUnhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.\r\nat System.CannotUnloadAppDomainException.VisitedCritical(Int32 )\r\nat System.CannotUnloadAppDomainException.SafeVisited(Int32 )\r\n(anonymized)\r\n```\r\nor sometimes an _ArgumentOutOfRangeException_:\r\n```\r\nUnhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.\r\n[asyncexec] Parameter name: startIndex\r\n[asyncexec]    at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)\r\n[asyncexec]    at System.BitConverter.ToUInt32(Byte[] value, Int32 startIndex)\r\n[asyncexec]    at OpenCover.Framework.Persistance.BasePersistance.SaveVisitData(Byte[] data) in c:\\projects\\opencover\\main\\OpenCover.Framework\\Persistance\\BasePersistance.cs:line 494\r\n[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\r\n[asyncexec]    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n[asyncexec]    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n[asyncexec]    at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()\r\n[asyncexec]    at System.Threading.ThreadPoolWorkQueue.Dispatch()\r\n```"},"comment":{"url":"https://api.github.com/repos/OpenCover/opencover/issues/comments/161632290","html_url":"https://github.com/OpenCover/opencover/issues/329#issuecomment-161632290","issue_url":"https://api.github.com/repos/OpenCover/opencover/issues/329","id":161632290,"user":{"login":"MaceWindu","id":1099238,"avatar_url":"https://avatars.githubusercontent.com/u/1099238?v=3","gravatar_id":"","url":"https://api.github.com/users/MaceWindu","html_url":"https://github.com/MaceWindu","followers_url":"https://api.github.com/users/MaceWindu/followers","following_url":"https://api.github.com/users/MaceWindu/following{/other_user}","gists_url":"https://api.github.com/users/MaceWindu/gists{/gist_id}","starred_url":"https://api.github.com/users/MaceWindu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaceWindu/subscriptions","organizations_url":"https://api.github.com/users/MaceWindu/orgs","repos_url":"https://api.github.com/users/MaceWindu/repos","events_url":"https://api.github.com/users/MaceWindu/events{/privacy}","received_events_url":"https://api.github.com/users/MaceWindu/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T13:07:14Z","updated_at":"2015-12-03T13:07:14Z","body":"I'm revoking my comment :-). I cannot reproduce it anymore and from current code I don't see any way for such error. Maybe I didn't really upgraded to ver 210 at that time."}}