{"action":"created","issue":{"url":"https://api.github.com/repos/ArxOne/MrAdvice/issues/73","repository_url":"https://api.github.com/repos/ArxOne/MrAdvice","labels_url":"https://api.github.com/repos/ArxOne/MrAdvice/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/ArxOne/MrAdvice/issues/73/comments","events_url":"https://api.github.com/repos/ArxOne/MrAdvice/issues/73/events","html_url":"https://github.com/ArxOne/MrAdvice/issues/73","id":183477031,"number":73,"title":"Generic method in generic class issue","user":{"login":"AlexanderButs","id":2115350,"avatar_url":"https://avatars.githubusercontent.com/u/2115350?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderButs","html_url":"https://github.com/AlexanderButs","followers_url":"https://api.github.com/users/AlexanderButs/followers","following_url":"https://api.github.com/users/AlexanderButs/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderButs/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderButs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderButs/subscriptions","organizations_url":"https://api.github.com/users/AlexanderButs/orgs","repos_url":"https://api.github.com/users/AlexanderButs/repos","events_url":"https://api.github.com/users/AlexanderButs/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderButs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ArxOne/MrAdvice/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"picrap","id":251429,"avatar_url":"https://avatars.githubusercontent.com/u/251429?v=3","gravatar_id":"","url":"https://api.github.com/users/picrap","html_url":"https://github.com/picrap","followers_url":"https://api.github.com/users/picrap/followers","following_url":"https://api.github.com/users/picrap/following{/other_user}","gists_url":"https://api.github.com/users/picrap/gists{/gist_id}","starred_url":"https://api.github.com/users/picrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/picrap/subscriptions","organizations_url":"https://api.github.com/users/picrap/orgs","repos_url":"https://api.github.com/users/picrap/repos","events_url":"https://api.github.com/users/picrap/events{/privacy}","received_events_url":"https://api.github.com/users/picrap/received_events","type":"User","site_admin":false},"assignees":[{"login":"picrap","id":251429,"avatar_url":"https://avatars.githubusercontent.com/u/251429?v=3","gravatar_id":"","url":"https://api.github.com/users/picrap","html_url":"https://github.com/picrap","followers_url":"https://api.github.com/users/picrap/followers","following_url":"https://api.github.com/users/picrap/following{/other_user}","gists_url":"https://api.github.com/users/picrap/gists{/gist_id}","starred_url":"https://api.github.com/users/picrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/picrap/subscriptions","organizations_url":"https://api.github.com/users/picrap/orgs","repos_url":"https://api.github.com/users/picrap/repos","events_url":"https://api.github.com/users/picrap/events{/privacy}","received_events_url":"https://api.github.com/users/picrap/received_events","type":"User","site_admin":false}],"milestone":null,"comments":54,"created_at":"2016-10-17T17:25:36Z","updated_at":"2016-10-25T10:09:04Z","closed_at":null,"body":"Use MrAdvice with dnlib (MrAdvice nuget package).\r\nHave some issue with generic method on mono only. Can't it reproduce on windows and can't create synthetic test for this issue on linux unfortunately. Got exception only on live project.\r\nHave async generic method in generic class like:\r\nclass Class < T1 > { async Task < IEnumerable < T2 > > Method < T2 > () }\r\n\r\nWhen call this method with second parameter type got exception:\r\n\r\n```\r\nError: [2016-10-17T19:36:29.858+03] 2 399 - System.AggregateException: One or more errors occurred ---> System.InvalidCastException: Cannot cast from source type to destination type.\r\n  at (wrapper castclass) object:__castclass_with_cache (object,intptr,intptr)\r\n  at ArxOne.MrAdvice.Threading.TaskCompletionSourceImplementation`1[System.Collections.Generic.IEnumerable`1[System.String]].SetResult (System.Object result) [0x00000] in <filename unknown>:0 \r\n  at ArxOne.MrAdvice.Invocation.ContinueTask (System.Threading.Tasks.Task adviceTask, ArxOne.MrAdvice.Threading.TaskCompletionSource adviceTaskSource, ArxOne.MrAdvice.Advice.AdviceValues adviceValues) [0x00000] in <filename unknown>:0 \r\n  at ArxOne.MrAdvice.Invocation+<>c__DisplayClass1_0.<ProceedAdvice>b__1 (System.Threading.Tasks.Task t) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.TaskActionInvoker+ActionTaskInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0 \r\n  --- End of inner exception stack trace ---\r\n --> (Inner exception 0) System.InvalidCastException: Cannot cast from source type to destination type.\r\n  at (wrapper castclass) object:__castclass_with_cache (object,intptr,intptr)\r\n  at ArxOne.MrAdvice.Threading.TaskCompletionSourceImplementation`1[System.Collections.Generic.IEnumerable`1[System.String]].SetResult (System.Object result) [0x00000] in <filename unknown>:0 \r\n  at ArxOne.MrAdvice.Invocation.ContinueTask (System.Threading.Tasks.Task adviceTask, ArxOne.MrAdvice.Threading.TaskCompletionSource adviceTaskSource, ArxOne.MrAdvice.Advice.AdviceValues adviceValues) [0x00000] in <filename unknown>:0 \r\n  at ArxOne.MrAdvice.Invocation+<>c__DisplayClass1_0.<ProceedAdvice>b__1 (System.Threading.Tasks.Task t) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.TaskActionInvoker+ActionTaskInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0 \r\n```\r\n\r\nI have two specific methods and crashes only second one (think JIT is in business). I.e first call Method<string> is ok, and then Method<DateTime> crashes. Then restart the application and call Method<DateTime> first, and then Method<string> crashes. So it depends which method I invoke first."},"comment":{"url":"https://api.github.com/repos/ArxOne/MrAdvice/issues/comments/255993773","html_url":"https://github.com/ArxOne/MrAdvice/issues/73#issuecomment-255993773","issue_url":"https://api.github.com/repos/ArxOne/MrAdvice/issues/73","id":255993773,"user":{"login":"AlexanderButs","id":2115350,"avatar_url":"https://avatars.githubusercontent.com/u/2115350?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderButs","html_url":"https://github.com/AlexanderButs","followers_url":"https://api.github.com/users/AlexanderButs/followers","following_url":"https://api.github.com/users/AlexanderButs/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderButs/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderButs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderButs/subscriptions","organizations_url":"https://api.github.com/users/AlexanderButs/orgs","repos_url":"https://api.github.com/users/AlexanderButs/repos","events_url":"https://api.github.com/users/AlexanderButs/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderButs/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T10:09:04Z","updated_at":"2016-10-25T10:09:04Z","body":"Cool. So create new issue with creating aspect on each generic method invocation. This issue is fixed."}}
{"actor":{"display_login":"AlexanderButs"}}