{"action":"closed","issue":{"url":"https://api.github.com/repos/nunit/nunit-vs-adapter/issues/88","repository_url":"https://api.github.com/repos/nunit/nunit-vs-adapter","labels_url":"https://api.github.com/repos/nunit/nunit-vs-adapter/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit-vs-adapter/issues/88/comments","events_url":"https://api.github.com/repos/nunit/nunit-vs-adapter/issues/88/events","html_url":"https://github.com/nunit/nunit-vs-adapter/issues/88","id":118147991,"number":88,"title":"Exception in object Finalizer crashes TE.ProcessHost.Managed.exe cancelling test runs","user":{"login":"LordJZ","id":32092,"avatar_url":"https://avatars.githubusercontent.com/u/32092?v=3","gravatar_id":"","url":"https://api.github.com/users/LordJZ","html_url":"https://github.com/LordJZ","followers_url":"https://api.github.com/users/LordJZ/followers","following_url":"https://api.github.com/users/LordJZ/following{/other_user}","gists_url":"https://api.github.com/users/LordJZ/gists{/gist_id}","starred_url":"https://api.github.com/users/LordJZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LordJZ/subscriptions","organizations_url":"https://api.github.com/users/LordJZ/orgs","repos_url":"https://api.github.com/users/LordJZ/repos","events_url":"https://api.github.com/users/LordJZ/events{/privacy}","received_events_url":"https://api.github.com/users/LordJZ/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nunit/nunit-vs-adapter/labels/is:bug","name":"is:bug","color":"fc2929"},{"url":"https://api.github.com/repos/nunit/nunit-vs-adapter/labels/vs-followup","name":"vs-followup","color":"c7def8"}],"state":"closed","locked":false,"assignee":{"login":"OsirisTerje","id":203432,"avatar_url":"https://avatars.githubusercontent.com/u/203432?v=3","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},"milestone":null,"comments":6,"created_at":"2015-11-20T23:22:17Z","updated_at":"2016-05-12T18:27:44Z","closed_at":"2016-05-12T18:27:44Z","body":"Visual Studio 2015. This is also reproduced on NUnit v3 adapter.\r\n\r\nConsider this piece of code:\r\n```C#\r\n[TestFixture] public class UnitTest1\r\n{\r\n    class WTF {\r\n        ~WTF() { throw new Exception(); }\r\n    }\r\n\r\n    WTF wtf;\r\n\r\n    [TestFixtureSetUp] public void SU() {\r\n        wtf = new WTF();\r\n    }\r\n\r\n    [Test] public void Test() {\r\n        Assert.AreEqual(2, 2);\r\n    }\r\n\r\n    [TestFixtureTearDown] public void TD() {\r\n        wtf = null;\r\n        GC.Collect();\r\n        GC.WaitForPendingFinalizers();\r\n    }\r\n}\r\n```\r\n(Full solution [attached](https://github.com/nunit/nunit-vs-adapter/files/40641/NUnitAdapterCrash.xlsx) - treat .xlsx as .zip archive)\r\n\r\nWhen running all tests, this test spec succeeds when run in:\r\n* NUnit-Console.exe\r\n* NUnit.exe\r\n* R# Test Runner\r\n\r\nBut test does not run when run in VS Test Explorer using NUnit VS Adapter. The process TE.ProcessHost.Managed.exe crashes because of an exception in object finalizer on GC Finalizer Thread.\r\n\r\nNot sure if anything can be done here, though, if it's a VS bug.\r\n\r\n"}}