Skip to content

Conversation

@Wartori54
Copy link
Member

Partially replaces #791. Mainly bumps MonoMod to the latest version that doesn't directly target .net9 and other dependencies as well.

@Wartori54
Copy link
Member Author

I should note here that for some unknown reason (that I'd like to call a bug) running dotnet publish -c Release will fail because msbuild will build all the projects in the solution in Release mode but the submodules (specifically MonoMod) on Debug mode.
The workaround I use is running dotnet publish -c Release Celeste.Mod.mm/Celeste.Mod.mm.csproj and dotnet publish -c Release MiniInstaller/MiniInstaller.csproj as two separate commands instead.
Is this worth noting in the README.md?

This was referenced Oct 6, 2024
@maddie480
Copy link
Member

/azp run

@maddie480
Copy link
Member

Communal Helper doesn't like this :despair: (this can be reproduced with only Communal Helper enabled)

Ver 1.4.0.0-fna [Everest: 5112-azure-c50a0]
11/22/2024 14:22:15
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at MonoMod.Cil.ILCursor.GotoNext(MoveType moveType, Func`2[] predicates) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.Utils/Cil/ILCursor.cs:line 308
   at MonoMod.Cil.ILCursor.GotoNext(Func`2[] predicates) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.Utils/Cil/ILCursor.cs:line 393
   at Celeste.Mod.CommunalHelper.DashStates.DreamTunnelDash.Check_State_DreamDash(ILCursor cursor, Boolean equal, Boolean and) in /home/runner/work/CommunalHelper/CommunalHelper/src/DashStates/DreamTunnelDash/DreamTunnelDash.cs:line 342
   at Celeste.Mod.CommunalHelper.DashStates.DreamTunnelDash.<>c.<.cctor>b__60_0(ILContext il) in /home/runner/work/CommunalHelper/CommunalHelper/src/DashStates/DreamTunnelDash/DreamTunnelDash.cs:line 304
   at MonoMod.Cil.ILContext.Invoke(Manipulator manip) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.Utils/Cil/ILContext.cs:line 91
   at MonoMod.RuntimeDetour.DetourManager.ManagedDetourState.InvokeManipulator(ILHookEntry entry, MethodDefinition def) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/DetourManager.Managed.cs:line 606
   at MonoMod.RuntimeDetour.DetourManager.ManagedDetourState.UpdateEndOfChain() in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/DetourManager.Managed.cs:line 581
   at MonoMod.RuntimeDetour.DetourManager.ManagedDetourState.AddILHook(SingleILHookState ilhook, Boolean takeLock) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/DetourManager.Managed.cs:line 461
   at MonoMod.RuntimeDetour.ILHook.Apply() in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/ILHook.cs:line 226
   at MonoMod.RuntimeDetour.ILHook..ctor(MethodBase method, Manipulator manipulator, IDetourFactory factory, DetourConfig config, Boolean applyByDefault) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/ILHook.cs:line 188
   at MonoMod.RuntimeDetour.ILHook..ctor(MethodBase source, Manipulator manip, DetourConfig config, Boolean applyByDefault) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/ILHook.cs:line 138
   at MonoMod.RuntimeDetour.ILHook..ctor(MethodBase source, Manipulator manip, DetourConfig config) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/ILHook.cs:line 104
   at Celeste.Mod.Helpers.LegacyMonoMod.LegacyHookEndpointManager.Modify(MethodBase method, Delegate callback) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Helpers/LegacyMonoMod/HookEndpointManager.cs:line 77
   at Celeste.Mod.Helpers.LegacyMonoMod.LegacyHookEndpointManager.Modify[T](MethodBase method, Delegate callback) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Helpers/LegacyMonoMod/HookEndpointManager.cs:line 72
   at IL.Celeste.Player.add_IsRiding_Solid(Manipulator)
   at Celeste.Mod.CommunalHelper.DashStates.DreamTunnelDash.Load() in /home/runner/work/CommunalHelper/CommunalHelper/src/DashStates/DreamTunnelDash/DreamTunnelDash.cs:line 71
   at Celeste.Mod.CommunalHelper.CommunalHelperModule.Load() in /home/runner/work/CommunalHelper/CommunalHelper/src/CommunalHelperModule.cs:line 45
   at Celeste.Mod.Everest.Register(EverestModule module) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.cs:line 552
   at Celeste.Mod.Everest.Loader.LoadModAssembly(EverestModuleMetadata meta, Assembly asm) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Loader.cs:line 569
   at Celeste.Mod.Everest.Loader.LoadMod(EverestModuleMetadata meta) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Loader.cs:line 511
   at Celeste.Mod.Everest.Loader.LoadModDelayed(EverestModuleMetadata meta, Action callback) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Loader.cs:line 480
   at Celeste.Mod.Everest.Loader.LoadZip(String archive) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Loader.cs:line 335
   at Celeste.Mod.Everest.Loader.LoadAuto() in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Loader.cs:line 197
   at Celeste.Mod.Everest.Boot() in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.cs:line 458
   at Celeste.Celeste..ctor() in /home/vsts/work/1/s/Celeste.Mod.mm/Patches/Celeste.cs:line 308
   at Celeste.Celeste.orig_Main(String[] args)

@Wartori54
Copy link
Member Author

Wartori54 commented Nov 24, 2024

Appears to be a MonoMod bug, will bump again once that's fixed.

@maddie480
Copy link
Member

New crash with Strawberry Jam on startup:

Ver 1.4.0.0-fna [Everest: 5322-azure-942bc]
02/05/2025 23:04:52
System.ArgumentException: Source method is generic, generic hooks are not supported
   at MonoMod.RuntimeDetour.Hook.CheckSupported() in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/Hook.cs:line 710
   at MonoMod.RuntimeDetour.Hook.PrepareRealTarget(Object target, TrampolineData& trampoline, DataScope`1& scope) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/Hook.cs:line 705
   at MonoMod.RuntimeDetour.Hook..ctor(MethodBase source, MethodInfo target, Object targetObject, IDetourFactory factory, DetourConfig config, Boolean applyByDefault) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/Hook.cs:line 564
   at MonoMod.RuntimeDetour.Hook..ctor(MethodBase source, Delegate target, DetourConfig config) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/Hook.cs:line 388
   at MonoMod.RuntimeDetour.Hook..ctor(MethodBase source, Delegate target) in /home/vsts/work/1/s/external/MonoMod/src/MonoMod.RuntimeDetour/Hook.cs:line 330
   at Celeste.Mod.IsaGrabBag.ForceVariants.Load() in IsaGrabBag/ForceVariant.cs:line 147
   at Celeste.Mod.IsaGrabBag.GrabBagModule.Load() in IsaGrabBag/Module.cs:line 51
   at Celeste.Mod.Everest.Register(EverestModule module) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.cs:line 571
   at Celeste.Mod.Everest.Loader.LoadModAssembly(EverestModuleMetadata meta, Assembly asm) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Loader.cs:line 578
   at Celeste.Mod.Everest.Loader.LoadMod(EverestModuleMetadata meta) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Loader.cs:line 520
   at Celeste.Mod.Everest.CheckDependenciesOfDelayedMods() in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.cs:line 745
   at Celeste.Mod.Everest.Loader.LoadAuto() in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Loader.cs:line 205
   at Celeste.Mod.Everest.Boot() in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.cs:line 464
   at Celeste.Celeste..ctor() in /home/vsts/work/1/s/Celeste.Mod.mm/Patches/Celeste.cs:line 309
   at Celeste.Celeste.orig_Main(String[] args)

@maddie480
Copy link
Member

we need to address the Isa's Grab Bag crash before merging this

@Wartori54
Copy link
Member Author

Already PR'd (CommunalHelper/IsaGrabBag#23). After an update to that mod we should be on the clear because no other helper in gamebanana has any generic hooks.

@Wartori54
Copy link
Member Author

Forwarding this to here: the aforementioned PR in IsaGrabBag has been merged, this should be the last blocker for this PR.

@maddie480
Copy link
Member

/azp run

@maddie480 maddie480 merged commit 50cb527 into EverestAPI:dev Mar 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants