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

Strange crashing issue when attempting to use BepInEx with Crystar #812

Open
KingKrouch opened this issue Mar 28, 2024 · 0 comments
Open
Labels
error Error message or log that may need investigation needs-replication Issue needs to be replicated by BepInEx dev

Comments

@KingKrouch
Copy link

What happened?

When attempting to set up BepInEx 6 (x64-IL2CPP build) with the game Crystar (on Steam), it seemingly generates dummy assemblies and then crashes when the game is supposed to launch.

I noticed that there was an error regarding corrupt memory, so I decided to see if SteamStub might have been used with the game, but attempting to use a SteamStub unpacker on the game's main executable complains about the file missing an expected .bind section, so I'm unsure if there's some other form of obfuscation on the game executable, or if I'm simply just reading too far into it.

As far as I'm aware, this same issue happens on Windows 10/11 as well.

BepInEx Distribution

Bleeding Edge from BepisBuilds

Log outputs

LogOutput.log:
[Message: Preloader] BepInEx 6.0.0-be.688 - CRYSTAR
[Message: Preloader] Built from commit 49015217f3becf052d33fa4658ac19229f5daa3a
[Info   :   BepInEx] System platform: Windows 10 (Wine 9.0) 64-bit
[Info   :   BepInEx] Process bitness: 64-bit (x64)
[Info   :   BepInEx] Running under Unity 2018.2.14f1
[Info   :   BepInEx] Runtime version: 6.0.7
[Info   :   BepInEx] Runtime information: .NET 6.0.7
[Message:InteropManager] Downloading unity base libraries
[Message:InteropManager] Extracting downloaded unity base libraries
[Message:InteropManager] Running Cpp2IL to generate dummy assemblies
[Info   :    Cpp2IL] [Library] Initializing Metadata...
[Info   :    Cpp2IL] [Library] Using actual IL2CPP Metadata version 24
[Info   :    Cpp2IL] [Library] Initialized Metadata in 289ms
[Info   :    Cpp2IL] [Library] Using binary type Portable Executable (from LibCpp2IL)
[Info   :    Cpp2IL] [Library] Searching Binary for Required Data...
[Info   :    Cpp2IL] [Library] Got Binary codereg: 0x180C94180, metareg: 0x180C943D0 in 107ms.
[Info   :    Cpp2IL] [Library] Initializing Binary...
[Info   :    Cpp2IL] [Library] Initialized Binary in 188ms
[Info   :    Cpp2IL] [Library] Mapping Globals...
[Info   :    Cpp2IL] [Library] OK (31ms)
[Info   :    Cpp2IL] [Library] Mapping pointers to Il2CppMethodDefinitions...
[Info   :    Cpp2IL] [Library] Processed 30355 OK (56ms)
[Info   :    Cpp2IL] [Program] Creating application model...
[Info   :    Cpp2IL] [Program] Application model created in 1309.5533ms
[Info   :InteropManager] Cpp2IL finished in 00:00:06.4395798
[Info   :InteropManager] Generating interop assemblies
[Info   :Il2CppInteropGen] Reading assemblies...
[Info   :Il2CppInteropGen] Done in 00:00:00.0500243
[Info   :Il2CppInteropGen] Reading unity assemblies...
[Info   :Il2CppInteropGen] Done in 00:00:00.2762562
[Info   :Il2CppInteropGen] Creating rewrite assemblies...
[Info   :Il2CppInteropGen] Done in 00:00:00.0095527
[Info   :Il2CppInteropGen] Computing renames...
[Info   :Il2CppInteropGen] Done in 00:00:00.0923157
[Info   :Il2CppInteropGen] Creating typedefs...
[Info   :Il2CppInteropGen] Done in 00:00:00.0469145
[Info   :Il2CppInteropGen] Computing struct blittability...
[Info   :Il2CppInteropGen] Done in 00:00:00.0563211
[Info   :Il2CppInteropGen] Filling typedefs...
[Info   :Il2CppInteropGen] Done in 00:00:00.0414536
[Info   :Il2CppInteropGen] Filling generic constraints...
[Info   :Il2CppInteropGen] Done in 00:00:00.0177631
[Info   :Il2CppInteropGen] Creating members...
[Info   :Il2CppInteropGen] Done in 00:00:01.2334675
[Info   :Il2CppInteropGen] Scanning method cross-references...
[Info   :Il2CppInteropGen] Done in 00:00:00.8514621
[Info   :Il2CppInteropGen] Finalizing method declarations...
[Info   :Il2CppInteropGen] Done in 00:00:02.1542483
[Info   :Il2CppInteropGen] 0 total potentially dead methods
[Info   :Il2CppInteropGen] Filling method parameters...
[Info   :Il2CppInteropGen] Done in 00:00:00.2940993
[Info   :Il2CppInteropGen] Creating static constructors...
[Info   :Il2CppInteropGen] Done in 00:00:00.6572259
[Info   :Il2CppInteropGen] Creating value type fields...
[Info   :Il2CppInteropGen] Done in 00:00:00.0242964
[Info   :Il2CppInteropGen] Creating enums...
[Info   :Il2CppInteropGen] Done in 00:00:00.1488465
[Info   :Il2CppInteropGen] Creating IntPtr constructors...
[Info   :Il2CppInteropGen] Done in 00:00:00.3194883
[Info   :Il2CppInteropGen] Creating non-blittable struct constructors...
[Info   :Il2CppInteropGen] Done in 00:00:00.0071900
[Info   :Il2CppInteropGen] Creating generic method static constructors...
[Info   :Il2CppInteropGen] Done in 00:00:00.0714007
[Info   :Il2CppInteropGen] Creating field accessors...
[Info   :Il2CppInteropGen] Done in 00:00:00.9779909
[Info   :Il2CppInteropGen] Filling methods...
[Info   :Il2CppInteropGen] Done in 00:00:02.7553512
[Info   :Il2CppInteropGen] Generating implicit conversions...
[Info   :Il2CppInteropGen] Done in 00:00:00.0673809
[Info   :Il2CppInteropGen] Creating properties...
[Info   :Il2CppInteropGen] Done in 00:00:00.1583237
[Info   :Il2CppInteropGen] Unstripping types...
[Info   :Il2CppInteropGen] Done in 00:00:01.0922152
[Info   :Il2CppInteropGen] Unstripping fields...
[Info   :Il2CppInteropGen] Restored 554 fields
[Info   :Il2CppInteropGen] Failed to restore 0 fields
[Info   :Il2CppInteropGen] Done in 00:00:00.0145800
[Info   :Il2CppInteropGen] Unstripping methods...
[Info   :Il2CppInteropGen] Restored 12256 methods
[Info   :Il2CppInteropGen] Failed to restore 660 methods
[Info   :Il2CppInteropGen] Done in 00:00:01.1352837
[Info   :Il2CppInteropGen] Unstripping method bodies...
[Info   :Il2CppInteropGen] IL unstrip statistics: 5734 successful, 1706 failed
[Info   :Il2CppInteropGen] Done in 00:00:01.1852542
[Info   :Il2CppInteropGen] Writing xref cache...
[Info   :Il2CppInteropGen] Done in 00:00:01.7690207
[Info   :Il2CppInteropGen] Writing assemblies...
[Info   :Il2CppInteropGen] Done in 00:00:01.3991920
[Info   :Il2CppInteropGen] Writing method pointer map...
[Info   :Il2CppInteropGen] Done in 00:00:00.0558799
[Info   :Il2CppInteropGen] Done!
[Info   : Preloader] 0 patcher plugins loaded
[Info   : Preloader] 0 assemblies discovered
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message:   BepInEx] Chainloader initialized

ErrorLog.log:
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at BepInEx.Unity.IL2CPP.IL2CPPChainloader.OnInvokeMethod(IntPtr, IntPtr, IntPtr, IntPtr)

Environment

- OS: Proton Experimental (Running on Nobara 39)
- BepInEx: BepInEx 6.0.0-be.688
- Game: CRYSTAR
@KingKrouch KingKrouch added error Error message or log that may need investigation needs-replication Issue needs to be replicated by BepInEx dev labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error Error message or log that may need investigation needs-replication Issue needs to be replicated by BepInEx dev
Projects
None yet
Development

No branches or pull requests

1 participant