Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instruction needed for the Failed to patch AquaMai.Mods.GameSettings.ForceAsServer error #32

Open
sexyxlyWAol opened this issue Feb 11, 2025 · 4 comments

Comments

@sexyxlyWAol
Copy link

I updated my Windows today, and was not able to launch the game after that. I came across your telegram group and found a new build of auamai.dll, but it still did not work after I installed it.

我今天更新了 Windows,之后就无法启动游戏了。我偶然发现了您的电报群,并找到了 aquamai.dll 的新版本,但安装后仍然无法正常工作。

The log was:

[18:46:36.543] > Applying AquaMai.Mods.GameSettings.ForceAsServer
[18:46:36.581] Failed to patch AquaMai.Mods.GameSettings.ForceAsServer: HarmonyLib.HarmonyException: IL Compile Error (unknown location) ---> HarmonyLib.HarmonyException: IL Compile Error (unknown location) ---> System.TypeInitializationException: The type initializer for 'AMDaemon.Network' threw an exception. ---> System.TypeInitializationException: The type initializer for 'AMDaemon.Api' threw an exception. ---> System.DllNotFoundException: amdaemon_api
  at (wrapper managed-to-native) AMDaemon.Api.Core_setExceptionHook_register()
  at AMDaemon.Api..cctor () [0x00001] in <24a3db4cca924c1fabf53f73eb608870>:0
   --- End of inner exception stack trace ---
  at AMDaemon.Network..cctor () [0x00001] in <24a3db4cca924c1fabf53f73eb608870>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.RuntimeMethodHandle.GetFunctionPointer(intptr)
  at System.RuntimeMethodHandle.GetFunctionPointer () [0x00000] in <df7127ba07dc446d9f5831a0ec7b1d63>:0
  at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.GetFunctionPointer (System.Reflection.MethodBase method, System.RuntimeMethodHandle handle) [0x00000] in <eb2b3ce744ac4751b58306479953badb>:0
  at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.GetNativeStart (System.Reflection.MethodBase method) [0x0004d] in <eb2b3ce744ac4751b58306479953badb>:0
  at MonoMod.RuntimeDetour.DetourHelper.GetNativeStart (System.Reflection.MethodBase method) [0x00005] in <eb2b3ce744ac4751b58306479953badb>:0
  at MonoMod.RuntimeDetour.Detour._RefreshChain (System.Reflection.MethodBase method) [0x000fb] in <eb2b3ce744ac4751b58306479953badb>:0
  at MonoMod.RuntimeDetour.Detour.Apply () [0x00053] in <eb2b3ce744ac4751b58306479953badb>:0
  at MonoMod.RuntimeDetour.Detour..ctor (System.Reflection.MethodBase from, System.Reflection.MethodBase to, MonoMod.RuntimeDetour.DetourConfig& config) [0x002e1] in <eb2b3ce744ac4751b58306479953badb>:0
  at (wrapper dynamic-method) MonoMod.RuntimeDetour.ILHook+Context.DMD<MonoMod.RuntimeDetour.ILHook+Context::Refresh>(MonoMod.RuntimeDetour.ILHook/Context)
  at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<MonoMod.RuntimeDetour.ILHook+Context::Refresh>?-996758528(object)
  at HarmonyLib.Internal.RuntimeFixes.StackTraceFixes.OnILChainRefresh (System.Object self) [0x00000] in <f4f7f0eb0ebb4eef99467c9366235b60>:0
  at MonoMod.RuntimeDetour.ILHook.Apply () [0x00059] in <eb2b3ce744ac4751b58306479953badb>:0
  at HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) [0x00047] in <f4f7f0eb0ebb4eef99467c9366235b60>:0
   --- End of inner exception stack trace ---
  at HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) [0x0005f] in <f4f7f0eb0ebb4eef99467c9366235b60>:0
  at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00033] in <f4f7f0eb0ebb4eef99467c9366235b60>:0
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x00045] in <f4f7f0eb0ebb4eef99467c9366235b60>:0
  at HarmonyLib.PatchClassProcessor.Patch () [0x00095] in <f4f7f0eb0ebb4eef99467c9366235b60>:0
  at HarmonyLib.Harmony.PatchAll (System.Type type) [0x00008] in <f4f7f0eb0ebb4eef99467c9366235b60>:0
  at AquaMai.Core.Startup.ApplyPatch (System.Type type) [0x00017] in <ebdad3bd7f8e4f68b07f04e23ffffbcd>:0
[18:46:36.585] > Applying AquaMai.Mods.UX.ServerAnnouncement
[18:46:36.607] > Applying AquaMai.Mods.Utils.LogNetworkErrors
[18:46:36.626] ========================================================================!!!
加载过程中检测到错误!
- 你是否正在使用魔改的 Assembly-CSharp.dll,这会导致函数不一致而无法找到需要修改的函数
- 请检查是否有冲突的 Mod,或者开启了不兼容的选项
[18:46:36.626] ===========================================================================
[18:46:36.627] 加载完成!

Windows:
Edition Windows 11 Home
Version 24H2
Installed on ‎2/‎10/‎2025
OS build 26100.2894
Experience Windows Feature Experience Pack 1000.26100.36.0

System:
Processor AMD Ryzen 7 5700G
Graphics RTX3060

I think it should not be a VC or DX issue, as other versions of the game are working fine, this version was working before I updated Windows as well. I have reinstalled those runtimes but still not working, if it indeed is a runtime issue, it would be great if you could give me some instructions.

我认为这不应该是 VC 或 DX 的问题,因为其他版本的游戏运行良好,在我更新 Windows 之前这个版本也可以运行。我已经重新安装了这些运行时,但仍然不起作用,如果确实是运行时问题,如果您能给我一些说明就太好了。

Thanks.

@sexyxlyWAol
Copy link
Author

I tried these but still did not work:

  1. reinstall the game
  2. update maichartmanager and reinstall aquamai inside that
  3. move the game to C:\

@sexyxlyWAol
Copy link
Author

除了上述之外,还尝试了回滚系统会23h2,白名单杀软后重装,仍然是相同的的报错,不知道各位有没有解决方案。不然我可能得周末重装系统了。(之前交issue的电脑没有中文输入法,见谅)

@mos9527
Copy link

mos9527 commented Feb 14, 2025

这里遇到了相同的问题,挂了调试器发现竟然是RTSS钩子导致amdaemon_api无法正常加载()

关闭RTSS/Rivatuner Statistics Server(来自MSI Afterburner)后得以启动
不知道你的具体情况如何;不过排查下涉及侵入式全局hook软件(如RTSS,杀软等等)也许可以解决问题

@sexyxlyWAol
Copy link
Author

也许是RTSS的问题,因为我有MSI的驱动。不过我通过重装系统解决问题了。

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

No branches or pull requests

2 participants