winstxnhdw / lc-hax

A powerful, feature-rich and highly performant internal cheat for the co-op indie horror video game, Lethal Company.
87 stars 26 forks source link

[Bug]: Keep Teleport item harmony fail #194

Closed xAstroBoy closed 8 months ago

xAstroBoy commented 8 months ago

What happened?

since the teleporter, every time i inject the new dll, it will crash the game.

Current Commit Hash

unk

Injector

If you selected "Others" above, please specify the injector you are using.

No response

Log output

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: IL Compile Error (unknown location) ---> HarmonyLib.HarmonyException: IL Compile Error (unknown location) ---> HarmonyLib.HarmonyException: IL Compile Error (unknown location) ---> HarmonyLib.InvalidHarmonyPatchArgumentException: (static bool TeleportWithItemsPatch::Postfix(int shipTeleporterId)): Return type of pass through postfix static bool TeleportWithItemsPatch::Postfix(int shipTeleporterId) does not match type of its first parameter at HarmonyLib.Public.Patching.HarmonyManipulator.WritePostfixes (HarmonyLib.Internal.Util.ILEmitter+Label returnLabel) [0x0035a] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_035A at HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () [0x00234] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_0234 --- End of inner exception stack trace --- at HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () [0x00378] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_0378 at HarmonyLib.Public.Patching.HarmonyManipulator.Process (MonoMod.Cil.ILContext ilContext, System.Reflection.MethodBase originalMethod) [0x00042] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_0042 at HarmonyLib.Public.Patching.HarmonyManipulator.Manipulate (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo, MonoMod.Cil.ILContext ctx) [0x00006] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_0006 at HarmonyLib.Public.Patching.HarmonyManipulator.Manipulate (System.Reflection.MethodBase original, MonoMod.Cil.ILContext ctx) [0x00007] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_0007 at HarmonyLib.Public.Patching.ManagedMethodPatcher.Manipulator (MonoMod.Cil.ILContext ctx) [0x00012] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_0012 at MonoMod.Cil.ILContext.Invoke (MonoMod.Cil.ILContext+Manipulator manip) [0x00087] in <6733e342b5b549bba815373898724469>:IL_0087 at MonoMod.RuntimeDetour.ILHook+Context.InvokeManipulator (Mono.Cecil.MethodDefinition def, MonoMod.Cil.ILContext+Manipulator cb) [0x00012] in <4e2760c7517c4ea79c633d67e84b319f>:IL_0012 at (wrapper dynamic-method) MonoMod.RuntimeDetour.ILHook+Context.DMD<MonoMod.RuntimeDetour.ILHook+Context::Refresh>(MonoMod.RuntimeDetour.ILHook/Context) at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<MonoMod.RuntimeDetour.ILHook+Context::Refresh>?1150283630(object) at HarmonyLib.Internal.RuntimeFixes.StackTraceFixes.OnILChainRefresh (System.Object self) [0x00000] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_0000 at MonoMod.RuntimeDetour.ILHook.Apply () [0x00059] in <4e2760c7517c4ea79c633d67e84b319f>:IL_0059 at HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) [0x00047] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_0047 --- End of inner exception stack trace --- at HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) [0x0005f] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_005F at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00033] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_0033 --- End of inner exception stack trace --- at Hax.Loader.LoadHarmonyPatches () [0x00012] in <945f1b9a31c543ea9e42e70bc40926a2>:IL_0012 at Hax.Loader.Load () [0x00025] in <945f1b9a31c543ea9e42e70bc40926a2>:IL_0025 at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&) at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <787acc3c9a4c471ba7d971300105af24>:IL_006A --- End of inner exception stack trace --- at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <787acc3c9a4c471ba7d971300105af24>:IL_0083 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <787acc3c9a4c471ba7d971300105af24>:IL_0000 at UnityExplorer.CacheObject.CacheMethod.TryEvaluate () [0x00055] in <39aaf80822f245689dfd9572c413f74a>:IL_0055

Acknowledgement

winstxnhdw commented 8 months ago

pull latest.

winstxnhdw commented 8 months ago

Duplicate of #193

xAstroBoy commented 8 months ago

@winstxnhdw just got the last version, still same crash.

winstxnhdw commented 8 months ago

I am getting reports that it's already been fixed. Please reclone and make sure you are actually getting latest. Check your commit hash and see if it matches the latest commit.

xAstroBoy commented 8 months ago

yes, i deleted the folder and recloned it, still crashed.

winstxnhdw commented 8 months ago

Hey @GigglingMinister. Can I get a confirmation that it's working on latest?

xAstroBoy commented 8 months ago

it might be not the teleporter patch, is something else.

winstxnhdw commented 8 months ago

well, if i dont know what that something else is, i can't help u

xAstroBoy commented 8 months ago

well, if i dont know what that something else is, i can't help u

it still crashes when i inject it, we can find it over discord? xastroboy

winstxnhdw commented 8 months ago

sorry i don't help troubleshoot over discord. send me your logs again and we can figure something out.

xAstroBoy commented 8 months ago

Nothing happens, no logs, just a crash once injected.

winstxnhdw commented 8 months ago

The program should always dump a log if there's an error. If there's none, then it's your game or computer and you'll have to sort it out on your own.

Try restarting your computer first.

xAstroBoy commented 8 months ago

Yeah i fixed it, bepinex was trying to load it twice, as the symlink dll was in the plugins folder