{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vstest/issues/1437","repository_url":"https://api.github.com/repos/Microsoft/vstest","labels_url":"https://api.github.com/repos/Microsoft/vstest/issues/1437/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vstest/issues/1437/comments","events_url":"https://api.github.com/repos/Microsoft/vstest/issues/1437/events","html_url":"https://github.com/Microsoft/vstest/issues/1437","id":298508311,"number":1437,"title":"vstest.console.exe crashes at socket layer","user":{"login":"acesiddhu","id":1168823,"avatar_url":"https://avatars2.githubusercontent.com/u/1168823?v=4","gravatar_id":"","url":"https://api.github.com/users/acesiddhu","html_url":"https://github.com/acesiddhu","followers_url":"https://api.github.com/users/acesiddhu/followers","following_url":"https://api.github.com/users/acesiddhu/following{/other_user}","gists_url":"https://api.github.com/users/acesiddhu/gists{/gist_id}","starred_url":"https://api.github.com/users/acesiddhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acesiddhu/subscriptions","organizations_url":"https://api.github.com/users/acesiddhu/orgs","repos_url":"https://api.github.com/users/acesiddhu/repos","events_url":"https://api.github.com/users/acesiddhu/events{/privacy}","received_events_url":"https://api.github.com/users/acesiddhu/received_events","type":"User","site_admin":false},"labels":[{"id":404205520,"url":"https://api.github.com/repos/Microsoft/vstest/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-20T08:31:35Z","updated_at":"2018-03-12T12:24:10Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Description\r\nDon't have a consistent repro. we saw this on a production environment.\r\n#[error]RunMessage : The active test run was aborted. Reason: Unhandled Exception: System.InvalidOperationException: LocalDataStoreSlot storage has been freed.\r\n2018-02-12T09:25:52.8391446Z    at System.LocalDataStore.GetData(LocalDataStoreSlot slot)\r\n2018-02-12T09:25:52.8391757Z    at System.Windows.Interop.ComponentDispatcher.get_CurrentThreadData()\r\n2018-02-12T09:25:52.8392050Z    at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n2018-02-12T09:25:52.8392355Z    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n2018-02-12T09:25:52.8392667Z    at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)\r\n2018-02-12T09:25:52.8392946Z    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)\r\n2018-02-12T09:25:52.8393307Z    at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)\r\n2018-02-12T09:25:52.8393702Z    at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)\r\n2018-02-12T09:25:52.8394014Z    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)\r\n2018-02-12T09:25:52.8394182Z \r\n2018-02-12T09:25:52.8895094Z    at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)\r\n2018-02-12T09:25:52.8896224Z    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)\r\n2018-02-12T09:25:52.8897276Z    --- End of inner exception stack trace ---\r\n2018-02-12T09:25:52.8898118Z    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)\r\n2018-02-12T09:25:52.8898810Z    at System.IO.Stream.ReadByte()\r\n2018-02-12T09:25:52.8899112Z    at System.IO.BinaryReader.ReadByte()\r\n2018-02-12T09:25:52.8899731Z    at System.IO.BinaryReader.Read7BitEncodedInt()\r\n2018-02-12T09:25:52.8900284Z    at System.IO.BinaryReader.ReadString()\r\n2018-02-12T09:25:52.8900569Z    at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable()\r\n2018-02-12T09:25:52.8900943Z    at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action`1 errorHandler, CancellationToken cancellationToken)>\r\n> For a defect reproducable from the vstest command line, describe the issue you've observed."},"comment":{"url":"https://api.github.com/repos/Microsoft/vstest/issues/comments/372291957","html_url":"https://github.com/Microsoft/vstest/issues/1437#issuecomment-372291957","issue_url":"https://api.github.com/repos/Microsoft/vstest/issues/1437","id":372291957,"user":{"login":"OsirisTerje","id":203432,"avatar_url":"https://avatars0.githubusercontent.com/u/203432?v=4","gravatar_id":"","url":"https://api.github.com/users/OsirisTerje","html_url":"https://github.com/OsirisTerje","followers_url":"https://api.github.com/users/OsirisTerje/followers","following_url":"https://api.github.com/users/OsirisTerje/following{/other_user}","gists_url":"https://api.github.com/users/OsirisTerje/gists{/gist_id}","starred_url":"https://api.github.com/users/OsirisTerje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OsirisTerje/subscriptions","organizations_url":"https://api.github.com/users/OsirisTerje/orgs","repos_url":"https://api.github.com/users/OsirisTerje/repos","events_url":"https://api.github.com/users/OsirisTerje/events{/privacy}","received_events_url":"https://api.github.com/users/OsirisTerje/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T12:24:10Z","updated_at":"2018-03-12T12:24:10Z","author_association":"NONE","body":"@acesiddhu It seems to a failure caused by using WPFControls, and not handling them correctly.  \r\nThe fix to this was like shown below:\r\n![image](https://user-images.githubusercontent.com/203432/37283407-266225cc-25f8-11e8-814b-2f7a6f92e689.png)\r\nThe test is running as STA  (using  the attribute  [Apartment(ApartmentState.STA)]) , but it seems that it is not properly STA for some reason, or....  \r\nAnyway, the fix above seems to do it, and the failure is not related to VSTest, so I am pretty sure this issue can be closed.\r\nFor reference also see links:\r\nhttps://stackoverflow.com/questions/26528329/nunit-test-process-fails-frequently-with-wpf-controls\r\nhttps://social.msdn.microsoft.com/Forums/ja-JP/bb990ddb-ecde-4161-8915-e66e913e3a3b/invalidoperationexception-localdatastoreslot-storage-has-been-freed?forum=exceldev\r\n"}}
{"actor":{"display_login":"OsirisTerje"}}