MelonLoader

MelonLoader

242 Downloads

[Bug]: Crashing on start of game

abevol opened this issue ยท 3 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.

All I see is a console window that closes very quickly, and this is its content:
[NewEntryPoint] Passing ptr to LoadAssemblyAndGetFuncPtr back to host...

Game: Kingdom Two Crowns
Platform: Steam
OS: Windows 11
MelonLoader: v0.6.1

Update:
I tried MelonLoader v0.5.7, and it works fine now.

Thanks all your hard work!

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

This also happens on "Papers, Please" with 0.6.1, but won't happen with 0.5.7

Game window opens not responding and then a 2nd console window opens before the game window and original console close, then the 2nd console closes after a short time.

1st console output/latest.log

2nd console:

[NewEntryPoint] Passing ptr to LoadAssemblyAndGetFuncPtr back to host...
[NewEntryPoint] Configuring imports...
[NewEntryPoint] Initializing. In default load context: True
[NewEntryPoint] Caught exception invoking Initialize! System.TypeInitializationException: The type initializer for 'MelonLoader.MelonLogger' threw an exception.
 ---> System.IO.IOException: The process cannot access the file 'C:\Program Files (x86)\Steam\steamapps\common\PapersPlease\MelonLoader\Latest.log' because it is being used by another process.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.FileStream..ctor(String path, FileStreamOptions options)
   at System.IO.File.Open(String path, FileStreamOptions options)
   at MelonLoader.MelonLogger..cctor() in D:\a\MelonLoader\MelonLoader\MelonLoader\Utils\MelonLogger.cs:line 19
   --- End of inner exception stack trace ---
   at MelonLoader.MelonLogger.MsgDirect(String txt) in D:\a\MelonLoader\MelonLoader\MelonLoader\Utils\MelonLogger.cs:line 31
   at MelonLoader.Core.WelcomeMessage() in D:\a\MelonLoader\MelonLoader\MelonLoader\Core.cs:line 141
   at MelonLoader.MelonUtils.Setup(AppDomain domain) in D:\a\MelonLoader\MelonLoader\MelonLoader\MelonUtils.cs:line 36
   at MelonLoader.Core.Initialize() in D:\a\MelonLoader\MelonLoader\MelonLoader\Core.cs:line 57
   at MelonLoader.NativeHost.MelonLoaderInvoker.Initialize() in D:\a\MelonLoader\MelonLoader\MelonLoader.NativeHost\MelonLoaderInvoker.cs:line 10
   at MelonLoader.NativeHost.NativeEntryPoint.Initialize() in D:\a\MelonLoader\MelonLoader\MelonLoader.NativeHost\NativeEntryPoint.cs:line 43
commented

Try using MelonLoader 5.7, worked with me for BoneLab
edit: im dumb, you tried that already and it worked lmao

commented

similar to #437