BepInEx / Il2CppInterop

A tool interoperate between CoreCLR and Il2Cpp at runtime
GNU Lesser General Public License v3.0
211 stars 67 forks source link

System.InvalidOperationException: Sequence contains more than one element #183

Open Alexejhero opened 1 month ago

Alexejhero commented 1 month ago

Uno (by Ubisoft) Unity 2022.2.21f1 (4907324dc95b) BepInEx 6.0.0-be.725

[Error  :   BepInEx] System.InvalidOperationException: Sequence contains more than one element
at System.Linq.ThrowHelper.ThrowMoreThanOneElementException()
at System.Linq.Enumerable.TryGetSingle[TSource] (IEnumerable`1 source, Boolean& found)
at System.Linq.Enumerable.Single[TSource] (IEnumerable`1 source)
at Il2CppInterop.Runtime.Injection.Hooks.GenericMethod_GetMethod_Hook.FindTargetMethod() in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/Hooks/GenericMethod_GetMethod_Hook.cs:line 67
at Il2CppInterop.Runtime.Injection.Hook`1.ApplyHook() in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/Hook.cs:line 30
at Il2CppInterop.Runtime.Injection.InjectorHelpers.Setup() in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/InjectorHelpers.cs:line 75
at Il2CppInterop.Runtime.Injection.ClassInjector.RegisterTypeInIl2Cpp(Type type, RegisterTypeOptions options) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/ClassInjector.cs:line 196
at Il2CppInterop.Runtime.DelegateSupport.ConvertDelegate[TIl2Cpp] (Delegate delegate) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/DelegateSupport.cs:line 244
at UnityEngine.Application.LogCallback.op_Implicit(Action`3 )
at BepInEx.Unity.IL2CPP.Logging.IL2CPPUnityLogSource..ctor() in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/Logging/IL2CPPUnityLogSource.cs:line 11
at BepInEx.Unity.IL2CPP.IL2CPPChainloader.OnInvokeMethod(IntPtr method, IntPtr obj, IntPtr parameters, IntPtr exc) in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/IL2CPPChainloader.cs:line 88

Possibly related to #111 and #119

Alexejhero commented 1 month ago

I forgot to mention. There are two function pointers in the sequence. Trying to use either of them causes the game to hard crash.

Alexejhero commented 2 weeks ago

image

Ubisoft drm

ds5678 commented 2 weeks ago

So this can be closed?