thesupersonic16 / HedgeModManager

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

[Bug] [Frontiers] Custom .hmm codes crash Frontiers immediately on launch #697

Closed MrKnytt closed 1 year ago

MrKnytt commented 1 year ago

In Linux Mint, using the Bottles method, with the dependencies installed using the windows.7z file, Sonic Frontiers crashes at launch whenever I try using a mod with custom .hmm codes.

Some of the mods I've tried include Sr101's Bounce Bracelet mod - https://gamebanana.com/mods/463461 ; Weezley's Legacy Spindash Mod (all variants) - https://gamebanana.com/mods/462772 ; Trepe Serafin's Open Zone Drift mod - https://gamebanana.com/mods/461121 ; Locomotivesss's Unleashed Sweep Kick mod - https://gamebanana.com/mods/461751 ; and Locomotivesss's Manual Tricking mod - https://gamebanana.com/mods/462713

The same issue crops up when trying to use the ExtraCodes.hmm method of adding custom codes. Any form of custom .hmm codes seems to crash Frontiers on Linux for me. I have tried every version of Proton I could get running as well.

thesupersonic16 commented 1 year ago

Does using codes that comes with HMM work? Also can you send a proton log of the game?

MrKnytt commented 1 year ago

Using built in HMM codes works just fine. Other mods all work fine. It's just custom codes.

This is the proton log. Hopefully this is the right log, but I'm not entirely sure on how to get logs yet as I'm still mostly new to Linux.

steam-1237320.log

RibShark commented 1 year ago

I am having the same issue on Linux (Bazzite) with Sonic Origins mods that use custom .hmm codes. In addition, clicking save when such a mod is enabled in the manager produces this error:

HMM Info:
    Version: 7.10-3
    Args: 
    StartDir: Z:\var\home\rib\.local\share\Steam\steamapps\common\SonicOrigins\build\main\projects\exec
    Process Level: Administrator
    Game: Sonic Origins
    GameInstall: Sonic Origins

Exception:
    Type: Exception
    Message: Error compiling codes
(2,18): error CS0234: The type or namespace name 'Numerics' does not exist in the namespace 'System' (are you missing an assembly reference?)
(2,18): error CS0234: The type or namespace name 'Numerics' does not exist in the namespace 'System' (are you missing an assembly reference?)

    Source: HedgeModManager.CodeCompiler
    Function: System.Threading.Tasks.Task CompileCodes[TCollection](TCollection, System.IO.Stream, HedgeModManager.CodeCompiler.PreProcessor.IIncludeResolver, System.String[])
    StackTrace: 
       at HedgeModManager.CodeCompiler.CodeProvider.CompileCodes[TCollection](TCollection sources, Stream resultStream, IIncludeResolver includeResolver, String[] loadPaths)
       at HedgeModManager.CodeCompiler.CodeProvider.CompileCodes[TCollection](TCollection sources, String assemblyPath, IIncludeResolver includeResolver, String[] loadsPaths)
       at HedgeModManager.ModsDB.<SaveDB>d__30.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at HedgeModManager.MainWindow.<SaveModsDB>d__42.MoveNext() in F:\Git\HedgeModManager\HedgeModManager\UI\MainWindow.xaml.cs:line 664
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at HedgeModManager.MainWindow.<SaveConfig>d__54.MoveNext() in F:\Git\HedgeModManager\HedgeModManager\UI\MainWindow.xaml.cs:line 995
    InnerException:
RibShark commented 1 year ago

The error is seemingly fixed by https://github.com/hedge-dev/HedgeModManager/commit/b4d11dff8b78d76ecd01fd84e8833ef289117d0e, but the crash when playing the game persists.

RibShark commented 1 year ago

Even if saving the mods on Windows and copying the generated files over to Linux, the issue continues to persist.

RibShark commented 1 year ago

Seems that this isn't effecting external codes, rather any code, built-in or external, that uses ReflectionHelpers causes the crash.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity. Please comment on this issue if you don't want it to automatically close in 14 days.

RibShark commented 1 year ago

See: https://github.com/hedge-dev/HMMCodes/issues/7

DeaTh-G commented 1 year ago

It seems this issue has already been migrated over to the HMMCodes repository, as such I'll be closing this issue here on the main HedgeModManager repo.