MelonLoader

MelonLoader

242 Downloads

[Bug]: (Mono) Failed to GetExport ( g_free )

Hexcede opened this issue ยท 1 comments

commented

All of the following criteria must be met

  • All Requirements must be installed.
  • Full Latest.log file included. If no file exists then leave this unchecked and state so.

All of the following are optional to answer

  • Tried reinstalling the Game.
  • Tried reinstalling MelonLoader.
  • Tried restarting PC.
  • Was able to see the Start Screen.

Describe the issue.

On many Unity Mono games using Unity versions from around ~2019, MelonLoader cannot find the export g_free from mono.
I am running under Proton with the requirements installed (I followed the wiki).

I am unable to find any working Unity mono game in my games list, and coincidentally all appear to be using older Unity versions, whereas most newer Unity games do not use Mono or have native Linux support.

Additionally, I had to work around another issue, Failed to Load Mono Library! by copying MonoBleedingEdge/EmbedRuntime/mono-2.0-bdwgc.dll to MonoBleedingEdge/EmbedRuntime/mono.dll. For some reason all of these non-working games seem to have a mono.dll called mono-2.0-bdwgc.dll and I have no information about this but obviously this is a version compatibility issue and I am unsure if it's meant to be supported by MelonLoader or not.

What is clear is that my workaround is allowing some exports to be resolved but with the ones that work, it seems to be g_free.

When switching between Proton versions Proton is sometimes unable to load the dll I assume and it results in Failed to Load Mono Library! even with my workaround. It also does this for some even older mono.dlls (that I steal from other games) and I have attached logs trying each of these, with a fresh install of the game.

I have tested with a few mono games under Steam Proton 5.0-10 & 5.13-6 and none work correctly:

  • 20 Minutes Till Dawn (the game I am trying to get MelonLoader to work for) which uses unity version 2019.4.21f1 (Latest.log)
  • Stacklands (
    Latest.log)
  • Rounds - Fails on first export, mono_jit_init (Latest.log
    )
  • Inscryption - Failed to load mono even with workaround (Latest.log)

All of these games also have the following folders in their MonoBleedingEdge/etc/mono folder: 4.5, 4.0, & 2.0

Did you attach your log file?

  • Yes, I attached my log file to the text box above.
  • No, I could not find a log file at {Game_Directory}\MelonLoader\Latest.log
commented

Okay so unfortunately I am clearly doing a lot of things wrong. Renaming mono.dll is not a workaround, it just causes more issues. I had gotten the impression trying to find workarounds that this was helping to find mono, but this is not the underlying issue. Closing and opening under a separate issue.