knah / VRCMods

A collection of various VRChat mods aimed at improving user experience or fixing issues
GNU General Public License v3.0
245 stars 137 forks source link

[IKTweaks] Crashing on avatar load after latest VRC update #208

Closed wststreet2 closed 2 years ago

wststreet2 commented 2 years ago

Hello, after the latest VRC update my game crashes as soon as my avatar loads if I'm in FBT. It doesn't crash on desktop.

I'll paste the log from MelonLoader:

[14:29:47.509] [UI_Expansion_Kit] Injecting field: current size 32 added size 8 offset 24
[14:29:47.510] [UI_Expansion_Kit] Injecting field: current size 40 added size 4 offset 32
[14:29:47.608] [IKTweaks] [ERROR] System.InvalidOperationException: Sequence contains no matching element

  at System.Linq.Enumerable.Single[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00070] in <fbb5ed17eb6e46c680000f8910ebb50c>:0 

  at IKTweaks.IKTweaksMod.OnApplicationStart () [0x000a3] in <28bf5c79bb0e46a09d267948048daad1>:0 

  at MelonLoader.MelonHandler+<>c.<OnApplicationStart_Mods>b__29_0 (MelonLoader.MelonMod x) [0x0003a] in <fa64fa77f76e4191bc8d410e9b48c956>:0 

  at MelonLoader.MelonHandler.InvokeMelonMethod[T] (System.Collections.Generic.List`1[T]& melons, MelonLoader.MelonHandler+InvokeMelonMethodDelegate`1[T] method, System.Boolean remove_failed) [0x00032] in <fa64fa77f76e4191bc8d410e9b48c956>:0 
[14:29:52.142] [emmVRCLoader] VRChat build is: 1190
[14:29:52.915] [emmVRCLoader] Initialization is successful in 00.7s. Welcome to emmVRC!
[14:29:52.916] [emmVRCLoader] You are running version 3.1.5
[14:29:53.081] [emmVRCLoader] Initialized network config.
[14:29:53.146] [UI_Expansion_Kit] Decorating menus
[14:30:16.102] [ERROR] System.NullReferenceException: Object reference not set to an instance of an object

  at IKTweaks.IKTweaksMod.GetEyeHeight (VRCAvatarManager manager) [0x00000] in <28bf5c79bb0e46a09d267948048daad1>:0 

  at IKTweaks.FullBodyHandling.FbbIkInitPostfix (VRCFbbIkController __instance, UnityEngine.Animator __1, System.Boolean __3) [0x0008c] in <28bf5c79bb0e46a09d267948048daad1>:0 

  at IKTweaks.FullBodyHandling.FbbIkInitReplacement (System.IntPtr thisPtr, System.IntPtr vrcAnimController, System.IntPtr animatorPtr, System.IntPtr playerPtr, System.Byte isLocalPlayer, System.IntPtr nativeMethod) [0x00056] in <28bf5c79bb0e46a09d267948048daad1>:0 
d1lla commented 2 years ago

having the same issue, i wish i had a fix for you but i’m unable to find one myself, i don’t think there’s anything we can do except wait for an update to IK tweaks

wststreet2 commented 2 years ago

I am a C# programmer so I thought I could find and fix the issue but I'm not familiar with how mods work. I think the issue is here, I think that delegate is not resolved and it ends up being null, and will crash later when it's called. https://github.com/knah/VRCMods/blob/38b5145bf71e1275de4cfbc42045e1253fb97c2c/IKTweaks/IKTweaksMod.cs#L55

knah commented 2 years ago

Works on my machine™. Make sure you're using the latest official build of MelonLoader (0.5.4). I'd also suggest joining the VRChat Modding Group discord for support.

Thefatgerbil commented 2 years ago

Was working yesterday when dynamics update first came out, but maybe been a VRC patch since? I have the exact same described above, as well as a friend

Thefatgerbil commented 2 years ago

Fixed (I think?)

Alright, well I just used Melon Assitant to remove all my mods and remove melon loader, then reinstalled everything and it works now, yay? Maybe the assitant wasn't correctly updating melon loader or something.

wststreet2 commented 2 years ago

Works on my machine™. Make sure you're using the latest official build of MelonLoader (0.5.4). I'd also suggest joining the VRChat Modding Group discord for support.

Fixed (I think?)

Alright, well I just used Melon Assitant to remove all my mods and remove melon loader, then reinstalled everything and it works now, yay? Maybe the assitant wasn't correctly updating melon loader or something.

Thanks for the info. I'll double check everything and reinstall melon loader and the mods, I'll come back with an update later today whether it worked or not. Also, thanks for the discord link, I'll definitely have a look.

wststreet2 commented 2 years ago

Works on my machine™. Make sure you're using the latest official build of MelonLoader (0.5.4). I'd also suggest joining the VRChat Modding Group discord for support.

I can confirm the mod is working, it was a me issue, I was indeed not using the latest version of MelonLoader.