Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Win32Exception: Invalid data #26

Open
goldfire opened this issue Dec 30, 2021 · 2 comments
Open

Win32Exception: Invalid data #26

goldfire opened this issue Dec 30, 2021 · 2 comments

Comments

@goldfire
Copy link

goldfire commented Dec 30, 2021

I'm trying this out on my Mac (M1 MacBook Pro) and am getting the following error, which seems to be preventing any of the functionality from working. Not really sure where to start debugging this though. I'm using Unity 2021.2.7f1.

Win32Exception: Invalid data
MonoMod.RuntimeDetour.Platforms.DetourNativeLibcPlatform.SetMemPerms (System.IntPtr start, System.UInt64 len, MonoMod.RuntimeDetour.Platforms.DetourNativeLibcPlatform+MmapProts prot) (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
MonoMod.RuntimeDetour.Platforms.DetourNativeLibcPlatform.MakeWritable (System.IntPtr src, System.UInt32 size) (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
MonoMod.RuntimeDetour.DetourHelper.MakeWritable (MonoMod.RuntimeDetour.IDetourNativePlatform plat, MonoMod.RuntimeDetour.NativeDetourData detour) (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform._HookSelftest (System.Reflection.MethodInfo from, System.Reflection.MethodInfo to) (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform..ctor () (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
MonoMod.RuntimeDetour.Platforms.DetourRuntimeMonoPlatform..ctor () (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
MonoMod.RuntimeDetour.DetourHelper.get_Runtime () (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
MonoMod.RuntimeDetour.DetourHelper.Pin[T] (T method) (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
HarmonyLib.PatchProcessor.Patch () (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) (at <6a6ad8af2f3f4540b557caf0a3956e48>:0)
AV.Inspector.PatchBase.ApplyPatches (AV.Inspector.PatchBase+Apply applyType) (at Library/PackageCache/com.av.smart-inspector@0.8.0-pre.1/Patches/Provider/PatchBase.cs:100)
AV.Inspector.Patcher.ApplyPatches (AV.Inspector.PatchBase+Apply apply) (at Library/PackageCache/com.av.smart-inspector@0.8.0-pre.1/Patches/Provider/Patcher.cs:79)
AV.Inspector.Patcher.ApplyPatches () (at Library/PackageCache/com.av.smart-inspector@0.8.0-pre.1/Patches/Provider/Patcher.cs:35)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <bd21fd595d394493a51e7c79b5fef9e0>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
@AlexeyTaranov
Copy link

Harmony (Internal library) dont support Apple ARM =(
pardeike/Harmony#424

Need remove support ARM Apple for this package=(

@neon-age
Copy link
Owner

I will (soon?) try to rewrite Smart Inspector to remove Harmony dependency, as it's internal initialization + Mono Cecil slows down the Editor during recompilation/domain reload for about 1~2 seconds

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants