thesupersonic16 / HedgeModManager

A mod manager for Sonic Generations, Sonic Lost World, Sonic Forces, Sonic Colours Ultimate and other PC Hedgehog Engine games.
MIT License
242 stars 60 forks source link

Can't get games to launch while detecting modloader on Linux #905

Open dropdprojects opened 1 month ago

dropdprojects commented 1 month ago

I followed the current Bottles guide, but when I put the launch option in (WINEDLLOVERRIDES='dinput8.dll=n,b' %command%) the games don't launch, I'm trying this with Generations and Frontiers and neither of them will even show a screen. They launch fine without the command, but then of course the mods don't get applied

I ran Frontiers with the terminal open both with and without the launch option, and this exception occurred in the failed launch:

Unhandled Exception: System.InvalidProgramException: Invalid IL code in :CommonLoader.AssemblerServiceImpl.Init (): IL_0067: call 0x0600019a

at .CommonLoader.AssemblerService.Init () [0x00000] in <31bb1febdd3747b5a1e64bc9e590daaa>:0 at (wrapper native-to-managed) .CommonLoader.AssemblerService.Init() [ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidProgramException: Invalid IL code in :CommonLoader.AssemblerServiceImpl.Init (): IL_0067: call 0x0600019a

at .CommonLoader.AssemblerService.Init () [0x00000] in <31bb1febdd3747b5a1e64bc9e590daaa>:0

I'm assuming this exception is the problem, but I'm not sure what it means

thesupersonic16 commented 1 month ago

Frontiers wont work without dotnet48, though HMM should beable to fix that for you if you are using Bottles. Are you using HedgeModManager 7.12-9? And what Linux device are you using?

Can you check if you get an error message with Generations?

dropdprojects commented 1 month ago

Yes, HMM is updated (it wasn't working until the newest update anyway because of the Steam detection error) and I'm playing on Linux Mint 21.3

Generations does throw an exception but it's different:

Unhandled Exception: System.MissingMethodException: Method not found: bool System.Collections.HashHelpers.IsWellKnownEqualityComparer(object) at System.Collections.Generic.HashSet1[T].Add (T item) [0x00000] in <7a1cc2d67b164134ab358e04ee577310>:0 at Microsoft.CSharp.RuntimeBinder.Semantics.InputFile.SetAssemblyID (Microsoft.CSharp.RuntimeBinder.Semantics.KAID aid) [0x00007] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.Semantics.BSYMMGR..ctor (Microsoft.CSharp.RuntimeBinder.Syntax.NameManager nameMgr, Microsoft.CSharp.RuntimeBinder.Semantics.TypeManager typeManager) [0x00062] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.Semantics.GlobalSymbolContext..ctor (Microsoft.CSharp.RuntimeBinder.Syntax.NameManager namemgr) [0x00019] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.Semantics.LangCompiler..ctor (Microsoft.CSharp.RuntimeBinder.Errors.CController pCtrl, Microsoft.CSharp.RuntimeBinder.Syntax.NameManager pNameMgr) [0x0000d] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Reset () [0x00017] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.RuntimeBinder..ctor () [0x00011] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.GetInstance () [0x00022] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder..ctor (Microsoft.CSharp.RuntimeBinder.CSharpCallFlags flags, System.String name, System.Type callingContext, System.Collections.Generic.IEnumerable1[T] typeArguments, System.Collections.Generic.IEnumerable1[T] argumentInfo) [0x00038] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember (Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.String name, System.Collections.Generic.IEnumerable1[T] typeArguments, System.Type context, System.Collections.Generic.IEnumerable1[T] argumentInfo) [0x00030] in <041efb0393ed431392fd0e82293fb94d>:0 at HMMCodes.MemoryService.WriteAsmHook (System.String instructions, System.Int64 address, HMMCodes.HookBehavior behavior, HMMCodes.HookParameter parameter) [0x00055] in <a584fe9eb3c54760a3c06493114f2c6f>:0 at FixHighFrameRateIssuesexperimental_9fbff8cec5c74a8a93b2c25025971ff6.<InitStatic>g__Patch|1_0 (System.Int64 address) [0x00001] in <a584fe9eb3c54760a3c06493114f2c6f>:0 at FixHighFrameRateIssuesexperimental_9fbff8cec5c74a8a93b2c25025971ff6.InitStatic () [0x00001] in <a584fe9eb3c54760a3c06493114f2c6f>:0 at FixHighFrameRateIssuesexperimental_9fbff8cec5c74a8a93b2c25025971ff6.Init () [0x00001] in <a584fe9eb3c54760a3c06493114f2c6f>:0 at CommonLoader.CodeObject.Init () [0x0000a] in <9ac7212e8c8f42aaafc4ea4cd1ba2bf3>:0 at CommonLoader.AssemblyLoader.raiseInitializers () [0x0001c] in <9ac7212e8c8f42aaafc4ea4cd1ba2bf3>:0 at CommonLoader.ManagedCommonLoader.RaiseInitializers () [0x00000] in <9ac7212e8c8f42aaafc4ea4cd1ba2bf3>:0 at <Module>.CommonLoader.RaiseInitializers () [0x00000] in <9ac7212e8c8f42aaafc4ea4cd1ba2bf3>:0 at (wrapper native-to-managed) <Module>.CommonLoader.RaiseInitializers() [ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: bool System.Collections.HashHelpers.IsWellKnownEqualityComparer(object) at System.Collections.Generic.HashSet1[T].Add (T item) [0x00000] in <7a1cc2d67b164134ab358e04ee577310>:0 at Microsoft.CSharp.RuntimeBinder.Semantics.InputFile.SetAssemblyID (Microsoft.CSharp.RuntimeBinder.Semantics.KAID aid) [0x00007] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.Semantics.BSYMMGR..ctor (Microsoft.CSharp.RuntimeBinder.Syntax.NameManager nameMgr, Microsoft.CSharp.RuntimeBinder.Semantics.TypeManager typeManager) [0x00062] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.Semantics.GlobalSymbolContext..ctor (Microsoft.CSharp.RuntimeBinder.Syntax.NameManager namemgr) [0x00019] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.Semantics.LangCompiler..ctor (Microsoft.CSharp.RuntimeBinder.Errors.CController pCtrl, Microsoft.CSharp.RuntimeBinder.Syntax.NameManager pNameMgr) [0x0000d] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Reset () [0x00017] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.RuntimeBinder..ctor () [0x00011] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.GetInstance () [0x00022] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder..ctor (Microsoft.CSharp.RuntimeBinder.CSharpCallFlags flags, System.String name, System.Type callingContext, System.Collections.Generic.IEnumerable1[T] typeArguments, System.Collections.Generic.IEnumerable1[T] argumentInfo) [0x00038] in <041efb0393ed431392fd0e82293fb94d>:0 at Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember (Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.String name, System.Collections.Generic.IEnumerable1[T] typeArguments, System.Type context, System.Collections.Generic.IEnumerable1[T] argumentInfo) [0x00030] in <041efb0393ed431392fd0e82293fb94d>:0 at HMMCodes.MemoryService.WriteAsmHook (System.String instructions, System.Int64 address, HMMCodes.HookBehavior behavior, HMMCodes.HookParameter parameter) [0x00055] in :0 at FixHighFrameRateIssuesexperimental_9fbff8cec5c74a8a93b2c25025971ff6.g__Patch|1_0 (System.Int64 address) [0x00001] in :0 at FixHighFrameRateIssuesexperimental_9fbff8cec5c74a8a93b2c25025971ff6.InitStatic () [0x00001] in :0 at FixHighFrameRateIssuesexperimental_9fbff8cec5c74a8a93b2c25025971ff6.Init () [0x00001] in :0 at CommonLoader.CodeObject.Init () [0x0000a] in <9ac7212e8c8f42aaafc4ea4cd1ba2bf3>:0 at CommonLoader.AssemblyLoader.raiseInitializers () [0x0001c] in <9ac7212e8c8f42aaafc4ea4cd1ba2bf3>:0 at CommonLoader.ManagedCommonLoader.RaiseInitializers () [0x00000] in <9ac7212e8c8f42aaafc4ea4cd1ba2bf3>:0 at .CommonLoader.RaiseInitializers () [0x00000] in <9ac7212e8c8f42aaafc4ea4cd1ba2bf3>:0

dropdprojects commented 1 month ago

I ran Generations again with the codes disabled since the exception mentions them and it ended up not throwing an exception, but it still doesn't launch, it does launch if I uninstall the mod loader even if I leave the launch option, so I believe something is going wrong when the game tries to interface with dinput8.dll

thesupersonic16 commented 1 month ago

Is HMM able to find both games without any manual registry edits? And where did you place the exe file?

Atleast for Frontiers, HMM is meant to create symlinks into the game prefix.

And by current guide, are you talking about this?

dropdprojects commented 1 month ago

I did use Flatseal to give Bottles permission to see their install folders, the exe is in Generations' install folder, and yes that was the guide I followed

thesupersonic16 commented 1 month ago

HMM is not designed to be installed in a game install directory. Did you also give Bottles access to the whole home folder? If Steam is correctly detected games should show up and as you press save, HMM should be writing data to the game prefix that is located in the home folder.

If that doesnt work, then you may have to manually create the symlinks or install the framework.

dropdprojects commented 1 month ago

The frameworks are installed, I did the copy paste method (#3) in the guide. I moved HMM to it's own folder on the root of my SSD and it changed nothing

dropdprojects commented 1 month ago

Would putting the games on my root drive make a difference? I'm running them off of a separate SSD, so giving Bottles access to my Home folder doesn't make a difference, since the games aren't installed on that drive, that's why I manually told Bottles to look in their install folders

thesupersonic16 commented 1 month ago

HMM needs access to Steam which is in the home folder.

dropdprojects commented 1 month ago

Oh that's what you meant, like I said though Bottles already has access to the home folder, and HMM has no issue attempting to launch the games, they launch through Steam like normal, the problem is that they seem to crash on startup when interfacing with the mod loader, if the mod loader (dinput8.dll, not HMM itself) is not installed or the dinput8.dll launch option is not used the games launch like normal

Perhaps this is a proton problem as opposed to an HMM problem

thesupersonic16 commented 1 month ago

I am going to need a proton log for Frontiers. You can look up how to create one. Make sure no codes and mods are enabled, however make sure the modloader is installed while creating the log.

dropdprojects commented 1 month ago

Okay, I have a few logs here

This first one is running with no mods or codes, and I go into the Arcade Mode menu: frontiersWorking.log

This log is with a single stage mod installed, it crashes when loading the Arcade Mode menu: frontiersCrash.log

It seems applying the mods is the real issue, everything works fine if the mod loader does nothing

dropdprojects commented 1 month ago

Tried the same with Gens, game still doesn't launch even without any mods or codes: generations.log

raravan commented 1 month ago

sup everyone, guess I put this here:

"I got Sonic Generations working with mods, at least. For Generations, I just added HMM as a non-steam game, set its compatibility tool to GE Proton and installed the mods I wanted. I had to manually download the mods and import the folders (1 click functionality on Gamebanana doesn't work here). Sonic Generations had to be installed on the Steam Deck's internal SSD with this method, as HMM would not find Sonic games installed on the SD card. After installing mods and the mod loader and saving, I set the following as a launch option in Steam's Properties for Sonic Generations:

WINEDLLOVERRIDES='dinput8.dll=n,b' %command%

Now Sonic Generations boosts on Steam Deck with mods without having to start HMM first :) It's the only one I could get to work on my new Steam Deck." - one good guy from reddit (u/FangkingOmega).

I can confirm this method is working.

dropdprojects commented 1 month ago

sup everyone, guess I put this here:

I don't believe this is relevant to my issue, I'm not attempting this on Steam Deck, and I can get mods installed, the games are crashing/not launching with mods installed

thesupersonic16 commented 1 month ago

Okay, I have a few logs here

This first one is running with no mods or codes, and I go into the Arcade Mode menu: frontiersWorking.log

This log is with a single stage mod installed, it crashes when loading the Arcade Mode menu: frontiersCrash.log

It seems applying the mods is the real issue, everything works fine if the mod loader does nothing

I thought the issue was the game not launching. Since the game does launch, enable the debug console and see if a console window shows up. Also is Steam Input enabled?

dropdprojects commented 1 month ago

yes the console appears and yes steam input is enabled

Edit: and I thought it wasn't launching, turns out it was instant crashing

thesupersonic16 commented 1 month ago

I am getting conflicting information. You arr saying you are getting a crash when loading the arcade menu and getting instant crashing in a way you thought the game isn't launching.

Try disabling Steam Input (as there is a known issue with it for Forces, maybe same issue with Frontiers?), and all mods and codes, then describe to me what is happening. Does the console window stay open long enough that you can read the information? Does the game window show up even if it closes right away?

dropdprojects commented 1 month ago

Okay, I'm going to clarify everything here to make sure we're on track before I proceed

  1. Both Sonic Generations and Sonic Frontiers were crashing on startup when the mod loader was enabled
  2. Today, I did a fresh install of Frontiers with no mods, as the previous installation was left over from Windows before I switched to Linux.
  3. When going to make the proton log for Frontiers, the game launched and worked flawlessly with the mod loader enabled, but without any mods or codes active.
  4. Enabling a cyberspace stage mod now causes Frontiers to crash when I open the Arcade mode menu. This led me to the conclusion that having mods enabled is the actual issue at heart, as I had mods that affected the main menu and skipped intro logos on the previous install, which would give it the illusion of crashing on startup.
  5. Generations still crashes on startup with the mod loader enabled, regardless whether mods are enabled or not

This is where we are at now. To answer the questions in your reply, the console doesn't display any information and instantly closes when Frontiers crashes. And for Generations, a window doesn't even appear, that one still acts like it's not launching

thesupersonic16 commented 1 month ago

For Generations, it appears to have failed to find a .NET Framework, normally Mono is included by default. This appears to be different from what you mentioned before. Not sure if you uninstalled it or whatever version of proton you used doesnt include it. You can try install either. dotnet48 is preferred if you can get it installed.

For Frontiers, since you mentioned it can start with the modloader, assuming Steam Input played no role here, try enabling a simple code like Infinite Boost Guage and check if it causes any issues and build up from there like try a non-DLL mod like an asset mod, then try a couple of DLL mods. Not sure if any other mods also causes crashes, you mentioned a stage mod crashing, but does others crash aswell? Mainly want to know what is different between all the mods that could cause the crash.

thesupersonic16 commented 1 month ago

Oh you said and Frontiers.

dropdprojects commented 1 month ago

Simply having a code enabled causes Frontiers to crash shortly after launch, the black window before the Sega logo appears, but then crashes

thesupersonic16 commented 1 month ago

Can you send a proton log for that state of the crash?

dropdprojects commented 1 month ago

steam-1237320.log

thesupersonic16 commented 1 month ago

I am not sure what is going on. I don't even see anything in the log saying the Codes.dll file is being loaded either.

Can you try renaming dinput8.dll that is next to the game exe to d3d11.dll? The modloader supports both names, so ideally you should see no difference, maybe proton doesnt like it. you will also need to update the command line args with the new name.

After doing this HMM might ask you to install the modloader again, just say No or launch the game from Steam directly.

dropdprojects commented 1 month ago

Still crashes

I also found a way to install dotnet48 into the Gens prefix, still no dice. I guess I just gotta use Windows for these games

thesupersonic16 commented 1 month ago

Only thing I can think of now is to just delete Codes.dll and launch the game directly on Steam (not using HMM). If this allows the game to launch, then the issue is likely within CLR and/or CommonLoader. But without this file, codes will not work, however some mods will still work.

thesupersonic16 commented 1 month ago

Simply having a code enabled causes Frontiers to crash shortly after launch, the black window before the Sega logo appears, but then crashes

I am going to stop. I keep forgetting things you had mentioned.

I have never seen this issue before, nor am I able to work out what could be the cause at this monent.

dropdprojects commented 1 month ago

Still getting the same Arcade mode crash without Codes.dll

Honestly it's fine, I seem to be the only person affected by this and I just didn't want to switch back to windows only to play as Shadow in Gens lol, thank you for trying to work this out with me!

floofyneko69 commented 4 weeks ago

WINEDLLOVERRIDES='dinput8.dll=n,b' %command%

Linux Mint user here, I gave this a try and it works for Sonic Frontiers. The game boots up with modloader and mods enabled, which didn't happen before, as I was having the same issue as you have @dropdprojects Granted, the solution is mentioned to be used on Steam Desk, but that console uses a Steam original Linux distribution based on Ubuntu much like Linux Mint, so give it a try, it should work flawlessly afterwards