Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KK - Extended Save Format exception on 2023(latest) Steam Version KK+AfterParty #175

Open
dreampiggy opened this issue Feb 18, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@dreampiggy
Copy link

dreampiggy commented Feb 18, 2023

Describe the bug
Game: KK(https://steamdb.info/app/1073440/)
With the After Party DLC
Updated in 2023/2/18 (previous tested works in 2022/12)

To Reproduce
Steps to reproduce the behavior:

  1. Download BepisPlugins and extract all to game directory
  2. Run the game and check BepInEx's LogOutput.log
  3. Found exception in log:
[Message:   BepInEx] BepInEx 5.4.21.0 - Koikatsu Party (6/5/2019 11:00:00 PM)
....
....
[Info   :   BepInEx] Loading [Extended Save 19.1]
[Error  :  HarmonyX] Failed to patch static bool SaveData::<Load>m__4(SaveData+Heroine item): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[HarmonyLib.CodeInstruction].CheckIndex (Int32 index) [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[HarmonyLib.CodeInstruction].InsertRange (Int32 index, IEnumerable`1 collection) [0x00000] in <filename unknown>:0 
  at HarmonyLib.CodeMatcher.Insert (HarmonyLib.CodeInstruction[] instructions) [0x00000] in <filename unknown>:0 
  at HarmonyLib.CodeMatcher.InsertAndAdvance (HarmonyLib.CodeInstruction[] instructions) [0x00000] in <filename unknown>:0 
  at ExtensibleSaveFormat.ExtendedSave+Hooks.SaveDataLoadTranspiler (IEnumerable`1 instructions) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at HarmonyLib.Internal.Patching.ILManipulator.ApplyTranspilers (System.Reflection.Emit.ILGenerator il, System.Reflection.MethodBase original, System.Func`2 getLocal, System.Func`1 defineLabel) [0x00000] in <filename unknown>:0 
  at HarmonyLib.Internal.Patching.ILManipulator.WriteTo (Mono.Cecil.Cil.MethodBody body, System.Reflection.MethodBase original) [0x00000] in <filename unknown>:0 
  at HarmonyLib.Public.Patching.HarmonyManipulator.WriteTranspilers () [0x00000] in <filename unknown>:0 
  at HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () [0x00000] in <filename unknown>:0 

Expected behavior
There should be no exception at all.

@dreampiggy dreampiggy added the bug Something isn't working label Feb 18, 2023
@dreampiggy
Copy link
Author

I guess the game update break current patch for function static bool SaveData::<Load>m__4(SaveData+Heroine item)

@ManlyMarco
Copy link
Collaborator

It's strongly suggested to not update the game on steam (there are other non-critical issues as well). You can downgrade it with KK HF Patch. I'll keep the issue open in case someone does want to fix it while maintaining backwards compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants