LavaGang / MelonLoader

The World's First Universal Mod Loader for Unity Games compatible with both Il2Cpp and Mono
https://discord.gg/2Wn3N2P
Apache License 2.0
2.43k stars 477 forks source link

[Bug]: Game Crashing when Failing to read Game Info #294

Closed MeitziQ closed 2 years ago

MeitziQ commented 2 years ago

All of the following criteria must be met

All of the following are optional to answer

Describe the issue.

Car Mechanic Simulator 2021 Steam After game got update, with Unity version from 2020.3.32 to 2020.3.38 (maybe related, maybe not) MelonLoader is no longer able to load game base assembly file.

With MelonLoader version 0.5.3 you will see: [DEBUG] Initializing Base Assembly... [DEBUG] [MonoLibrary] Setup Successful! [DEBUG] [MonoResolveManager] Setup Successful!

With MelonLoader version 0.5.4 or 0.5.5 (here its from 0.5.5) [DEBUG] Initializing Base Assembly... [ERROR] System.IO.EndOfStreamException: Unable to read beyond the end of the stream.

Latest.log v0.5.5 Latest.log ok v0.5.3

Two ways to test this:

  1. Demo or real game from Steam (demo is older version, but its seems get exact same error)
  2. Only game assembly dll

Did you attach your log file?

slxdy commented 2 years ago

ML failed to read the game info, but that wont affect mods

MeitziQ commented 2 years ago

I disagree.

When MelonLoader does load game info correctly, mods works. When it does not, its says what is on title and "Failed to Initialize Assets Manager!" and game crash.

These are current facts: Game works with MelonLoader v0.5.3 Game does not work with MelonLoader v0.5.4 nor v0.5.5 Previous version of game, did work with MelonLoader v0.5.4

with version 0.5.4 you get first System.IO.EndOfStreamException and System.OutOfMemoryException then "Failed to Initialize Assets Manager!" and these affect so that game crash or quit. (not sure if it crash or just someone give up)

In theory, it of course possible that first error what you say, only error that it cant read something. However, its seems highly unlikely first error is not related to this issue.

Should I change the title to this "Failed to Initialize Assets Manager!" and focus on that? Does Initialize Assets Manage need any game info ?

Latest (1).log

slxdy commented 2 years ago

Also, 0.5.5 should not give you the error. As long as it has the Unity version, everything should be fine

MeitziQ commented 2 years ago

With version v0.5.5 Open-Beta there is no longer any errors. Game just crash before it can fully start.

Should I make a new bug report with that info, or add log file here? I think, reading Game Info bug is fixed, however, it seems maybe crashing bug is different.

slxdy commented 2 years ago

Log pls

MeitziQ commented 2 years ago

This is v0.5.5 and game crash. (game still work with version v0.5.3 )

v0.5.5 Open-Beta crash.log

Unity Player.log

HerpDerpinstine commented 2 years ago

Works on the latest alpha-development nightly build.