Skip to content

System.AccessViolationException on Unity: 2021.3.45f2 BepInEx build: 6.0.0-be.738Β #239

@mx2048

Description

@mx2048

Unity: 2021.3.45f2, metadata v31
BepInEx build: 6.0.0-be.738
Repro: vanilla install, no plugins, crash in Il2CppInterop.Runtime.Injection.Hooks.Class_GetFieldDefaultValue_Hook.Hook
Video game: Vagrus, version 1.2.50.1024B

ErrorLog.log:

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Il2CppInterop.Runtime.Injection.Hooks.Class_GetFieldDefaultValue_Hook.Hook(Il2CppInterop.Runtime.Runtime.Il2CppFieldInfo*, Il2CppInterop.Runtime.Runtime.Il2CppTypeStruct* ByRef)

LogOutput.log:

[Message: Preloader] BepInEx 6.0.0-be.738 - Vagrus (10/25/2025 2:29:48 AM)
[Message: Preloader] Built from commit af0cba71fb69324aa4dfd651422bfa020309ce15
[Info : BepInEx] System platform: Windows 10 64-bit
[Info : BepInEx] Process bitness: 64-bit (x64)
[Info : BepInEx] Running under Unity 2021.3.45f2
[Info : BepInEx] Runtime version: 6.0.7
[Info : BepInEx] Runtime information: .NET 6.0.7
[Message:InteropManager] Downloading unity base libraries https://unity.bepinex.dev/libraries/2021.3.45.zip
[Message:InteropManager] Extracting downloaded unity base libraries
[Message:InteropManager] Running Cpp2IL to generate dummy assemblies from F:\GAMES\STEAM\steamapps\common\Vagrus - The Riven Realms\Vagrus_Data/il2cpp_data/Metadata/global-metadata.dat
[Info : Cpp2IL] [Library] Initializing Metadata...
[Info : Cpp2IL] [Library] Using actual IL2CPP Metadata version 31
[Info : Cpp2IL] [Library] Initialized Metadata in 254ms
[Info : Cpp2IL] [Library] Using binary type Portable Executable (from LibCpp2IL)
[Info : Cpp2IL] [Library] Searching Binary for Required Data...
[Info : Cpp2IL] [Library] Got Binary codereg: 0x1830D4DE0, metareg: 0x1836506A0 in 119ms.
[Info : Cpp2IL] [Library] Initializing Binary...
[Info : Cpp2IL] [Library] Initialized Binary in 96ms
[Info : Cpp2IL] [Library] Mapping pointers to Il2CppMethodDefinitions...
[Info : Cpp2IL] [Library] Processed 145818 OK (73ms)
[Info : Cpp2IL] [Program] Creating application model...
[Info : Cpp2IL] [Program] Application model created in 1680.4077ms
[Info :InteropManager] Cpp2IL finished in 00:00:06.8782589
[Info :InteropManager] Generating interop assemblies
[Info :Il2CppInteropGen] Reading assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.0055804
[Info :Il2CppInteropGen] Reading unity assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.0840441
[Info :Il2CppInteropGen] Creating rewrite assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.0118063
[Info :Il2CppInteropGen] Computing renames...
[Info :Il2CppInteropGen] Done in 00:00:00.0426762
[Info :Il2CppInteropGen] Creating typedefs...
[Info :Il2CppInteropGen] Done in 00:00:00.0326819
[Info :Il2CppInteropGen] Computing struct blittability...
[Info :Il2CppInteropGen] Done in 00:00:00.0298757
[Info :Il2CppInteropGen] Filling typedefs...
[Info :Il2CppInteropGen] Done in 00:00:00.1042038
[Info :Il2CppInteropGen] Filling generic constraints...
[Info :Il2CppInteropGen] Done in 00:00:00.0033520
[Info :Il2CppInteropGen] Creating members...
[Info :Il2CppInteropGen] Done in 00:00:00.7737017
[Info :Il2CppInteropGen] Scanning method cross-references...
[Info :Il2CppInteropGen] Done in 00:00:00.7360205
[Info :Il2CppInteropGen] Finalizing method declarations...
[Info :Il2CppInteropGen] Done in 00:00:01.7956488
[Info :Il2CppInteropGen] 69 total potentially dead methods
[Info :Il2CppInteropGen] Filling method parameters...
[Info :Il2CppInteropGen] Done in 00:00:00.7914738
[Info :Il2CppInteropGen] Creating static constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.2893752
[Info :Il2CppInteropGen] Creating value type fields...
[Info :Il2CppInteropGen] Done in 00:00:00.0467963
[Info :Il2CppInteropGen] Creating enums...
[Info :Il2CppInteropGen] Done in 00:00:00.0710419
[Info :Il2CppInteropGen] Creating IntPtr constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.0596015
[Info :Il2CppInteropGen] Creating non-blittable struct constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.0162662
[Info :Il2CppInteropGen] Creating generic method static constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.0646336
[Info :Il2CppInteropGen] Creating field accessors...
[Info :Il2CppInteropGen] Done in 00:00:01.7313324
[Info :Il2CppInteropGen] Filling methods...
[Info :Il2CppInteropGen] Done in 00:00:00.8519633
[Info :Il2CppInteropGen] Generating implicit conversions...
[Info :Il2CppInteropGen] Done in 00:00:00.0179548
[Info :Il2CppInteropGen] Implementing awaiters...
[Info :Il2CppInteropGen] Type Unity.Services.Core.Internal.TaskAsyncOperation was found to implement INotifyCompletion, but no suitable method was found. 0 method(s) were found with the required name.
[Info :Il2CppInteropGen] Type System.Threading.Tasks.ForceAsyncAwaiter was found to implement INotifyCompletion, but no suitable method was found. 0 method(s) were found with the required name.
[Info :Il2CppInteropGen] Type System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable+ConfiguredValueTaskAwaiter was found to implement INotifyCompletion, but no suitable method was found. 0 method(s) were found with the required name.
[Info :Il2CppInteropGen] Type System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable1+ConfiguredValueTaskAwaiter was found to implement INotifyCompletion, but no suitable method was found. 0 method(s) were found with the required name. [Info :Il2CppInteropGen] Type System.Runtime.CompilerServices.ValueTaskAwaiter was found to implement INotifyCompletion, but no suitable method was found. 0 method(s) were found with the required name. [Info :Il2CppInteropGen] Type System.Runtime.CompilerServices.ValueTaskAwaiter1 was found to implement INotifyCompletion, but no suitable method was found. 0 method(s) were found with the required name.
[Info :Il2CppInteropGen] Type System.Runtime.CompilerServices.TaskAwaiter was found to implement INotifyCompletion, but no suitable method was found. 0 method(s) were found with the required name.
[Info :Il2CppInteropGen] Type System.Runtime.CompilerServices.TaskAwaiter1 was found to implement INotifyCompletion, but no suitable method was found. 0 method(s) were found with the required name. [Info :Il2CppInteropGen] Type System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter was found to implement INotifyCompletion, but no suitable method was found. 0 method(s) were found with the required name.
[Info :Il2CppInteropGen] Type System.Runtime.CompilerServices.YieldAwaitable+YieldAwaiter was found to implement INotifyCompletion, but no suitable method was found. 0 method(s) were found with the required name.
[Info :Il2CppInteropGen] Done in 00:00:00.0076130
[Info :Il2CppInteropGen] Creating properties...
[Info :Il2CppInteropGen] Done in 00:00:00.2057049
[Info :Il2CppInteropGen] Unstripping types...
[Info :Il2CppInteropGen] Done in 00:00:00.0432295
[Info :Il2CppInteropGen] Unstripping fields...
[Info :Il2CppInteropGen] Restored 420 fields
[Info :Il2CppInteropGen] Failed to restore 2 fields
[Info :Il2CppInteropGen] Done in 00:00:00.0068904
[Info :Il2CppInteropGen] Unstripping methods...
[Info :Il2CppInteropGen] Restored 13257 methods
[Info :Il2CppInteropGen] Failed to restore 1020 methods
[Info :Il2CppInteropGen] Done in 00:00:00.4967342
[Info :Il2CppInteropGen] Unstripping method bodies...
[Info :Il2CppInteropGen] IL unstrip statistics: 7041 successful, 1231 failed
[Info :Il2CppInteropGen] Done in 00:00:00.1501567
[Info :Il2CppInteropGen] Writing xref cache...
[Info :Il2CppInteropGen] Done in 00:00:00.5137233
[Info :Il2CppInteropGen] Writing assemblies...
[Info :Il2CppInteropGen] Done in 00:00:04.8789059
[Info :Il2CppInteropGen] Writing method pointer map...
[Info :Il2CppInteropGen] Done in 00:00:00.0427882
[Info :Il2CppInteropGen] Clearing static data...
[Info :Il2CppInteropGen] Done in 00:00:00.0000058
[Info :Il2CppInteropGen] Done!
[Info : Preloader] 0 patcher plugins loaded
[Info : Preloader] 0 assemblies discovered
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message: BepInEx] Chainloader initialized
[Warning:Il2CppInterop] Class::Init signatures have been exhausted, using a substitute!
[Info :Il2CppInterop] Registered mono type Il2CppInterop.Runtime.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Info : BepInEx] 0 plugins to load
[Message: BepInEx] Chainloader startup complete

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions