{"action":"opened","issue":{"url":"https://api.github.com/repos/AngelDE98/MonoMod/issues/1","labels_url":"https://api.github.com/repos/AngelDE98/MonoMod/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/AngelDE98/MonoMod/issues/1/comments","events_url":"https://api.github.com/repos/AngelDE98/MonoMod/issues/1/events","html_url":"https://github.com/AngelDE98/MonoMod/issues/1","id":96794201,"number":1,"title":"Patching generic methods causes issues when importing them.","user":{"login":"AngelDE98","id":1200380,"avatar_url":"https://avatars.githubusercontent.com/u/1200380?v=3","gravatar_id":"","url":"https://api.github.com/users/AngelDE98","html_url":"https://github.com/AngelDE98","followers_url":"https://api.github.com/users/AngelDE98/followers","following_url":"https://api.github.com/users/AngelDE98/following{/other_user}","gists_url":"https://api.github.com/users/AngelDE98/gists{/gist_id}","starred_url":"https://api.github.com/users/AngelDE98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngelDE98/subscriptions","organizations_url":"https://api.github.com/users/AngelDE98/orgs","repos_url":"https://api.github.com/users/AngelDE98/repos","events_url":"https://api.github.com/users/AngelDE98/events{/privacy}","received_events_url":"https://api.github.com/users/AngelDE98/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-23T11:44:11Z","updated_at":"2015-07-23T11:44:11Z","closed_at":null,"body":"It seems to think that the generic parameter is the parent type.\r\n\r\nSIDENOTE: Using Mono.Cecil 0.9.5.0 because MonoDevelop refuses to find anything more up-to-date (although I've installed the NuGet plugin).\r\n\r\n```\r\nT: FezEngine.Tools.ServiceHelper\r\nM: Microsoft.Xna.Framework.Game FezEngine.Tools.ServiceHelper::get_Game()\r\nM: System.Void FezEngine.Tools.ServiceHelper::set_Game(Microsoft.Xna.Framework.Game)\r\nM: System.Void FezEngine.Tools.ServiceHelper::InjectServices(System.Object)\r\nM: System.Void FezEngine.Tools.ServiceHelper::orig_InitializeServices()\r\norig_InitializeServices is an orig_ method; ignoring...\r\nM: System.Void FezEngine.Tools.ServiceHelper::InitializeServices()\r\nPatching InitializeServices ...\r\nChecking for already existing methods...\r\nMethod existing; creating copy...\r\nAdded copy of original method to System.Void FezEngine.Tools.ServiceHelper::orig_InitializeServices()\r\nStoring method to main module...\r\nM: T FezEngine.Tools.ServiceHelper::orig_Get()\r\norig_Get is an orig_ method; ignoring...\r\nM: T FezEngine.Tools.ServiceHelper::Get()\r\nPatching Get ...\r\nChecking for already existing methods...\r\nMethod existing; creating copy...\r\nAdded copy of original method to T FezEngine.Tools.ServiceHelper::orig_Get()\r\n\r\nUnhandled Exception:\r\nSystem.NullReferenceException: Object reference not set to an instance of an object\r\n  at Mono.Cecil.ImportGenericContext.MethodParameter (System.String method, Int32 position) [0x00000] in <filename unknown>:0 \r\n  at Mono.Cecil.MetadataImporter.ImportTypeSpecification (Mono.Cecil.TypeReference type, ImportGenericContext context) [0x00000] in <filename unknown>:0 \r\n  at Mono.Cecil.MetadataImporter.ImportType (Mono.Cecil.TypeReference type, ImportGenericContext context) [0x00000] in <filename unknown>:0 \r\n  at Mono.Cecil.ModuleDefinition.Import (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.FindType (Mono.Cecil.TypeReference type, Boolean fallbackToImport) [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.FindType (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.PatchMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.PatchModule (Mono.Cecil.ModuleDefinition mod) [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.Patch () [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.Main (System.String[] args) [0x00000] in <filename unknown>:0 \r\n[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object\r\n  at Mono.Cecil.ImportGenericContext.MethodParameter (System.String method, Int32 position) [0x00000] in <filename unknown>:0 \r\n  at Mono.Cecil.MetadataImporter.ImportTypeSpecification (Mono.Cecil.TypeReference type, ImportGenericContext context) [0x00000] in <filename unknown>:0 \r\n  at Mono.Cecil.MetadataImporter.ImportType (Mono.Cecil.TypeReference type, ImportGenericContext context) [0x00000] in <filename unknown>:0 \r\n  at Mono.Cecil.ModuleDefinition.Import (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.FindType (Mono.Cecil.TypeReference type, Boolean fallbackToImport) [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.FindType (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.PatchMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.PatchModule (Mono.Cecil.ModuleDefinition mod) [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.Patch () [0x00000] in <filename unknown>:0 \r\n  at MonoMod.MonoMod.Main (System.String[] args) [0x00000] in <filename unknown>:0 \r\n```"}}