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

启动游戏崩溃 #7

Closed
PIut02 opened this issue Jun 2, 2024 · 9 comments · Fixed by #46
Closed

启动游戏崩溃 #7

PIut02 opened this issue Jun 2, 2024 · 9 comments · Fixed by #46
Labels
bug Something isn't working

Comments

@PIut02
Copy link

PIut02 commented Jun 2, 2024

crash-2024-06-02_17.20.07-client.txt

@3TUSK
Copy link
Contributor

3TUSK commented Jun 2, 2024

请提供

  • 完整的模组列表
  • 日志文件 latest.log 或者 debug.log

@TartaricAcid
Copy link
Contributor

又是 mixin 的 Redirector 问题,我们 Redirector 了 MouseHandler 里的一个热点方法,这个方法也被很多其他模组 mixin 了,导致出现了冲突,我看看怎么搞吧

@TartaricAcid TartaricAcid added the bug Something isn't working label Jun 3, 2024
@3TUSK
Copy link
Contributor

3TUSK commented Jun 3, 2024

这个方法也被很多其他模组 mixin 了

就此处出问题的 MouseHandlerMixin::reduceSensitivity 来说,有这么几个方法可以用:

  • @ModifyArgs,可以同时修改多个传入 LocalPlayer#turn 的参数,但 @ModifyArgs 的实现原理导致其在 Forge 环境无法正常使用。
  • 写两个 @ModifyArg,可以绕开 @ModifyArgs 在 Forge 下的问题,但一样的代码会因此执行两遍,未知是否会导致性能问题。
  • 使用 MixinExtras 的 @WrapOperation。可以有效保证对其他 Mod 的兼容,但 Forge 环境下并没有 MixinExtras,需要自行打包。
  • 找出是哪个 Mod 也在 @Redirect,然后看看能不能跟作者谈谈,出一个公用的 API。

@F1zeiL
Copy link
Contributor

F1zeiL commented Jun 3, 2024

这个方法也被很多其他模组 mixin 了

就此处出问题的 MouseHandlerMixin::reduceSensitivity 来说,有这么几个方法可以用:

  • @ModifyArgs,可以同时修改多个传入 LocalPlayer#turn 的参数,但 @ModifyArgs 的实现原理导致其在 Forge 环境无法正常使用。
  • 写两个 @ModifyArg,可以绕开 @ModifyArgs 在 Forge 下的问题,但一样的代码会因此执行两遍,未知是否会导致性能问题。
  • 使用 MixinExtras 的 @WrapOperation。可以有效保证对其他 Mod 的兼容,但 Forge 环境下并没有 MixinExtras,需要自行打包。
  • 找出是哪个 Mod 也在 @Redirect,然后看看能不能跟作者谈谈,出一个公用的 API。

我们目前采用了两个 @ModifyArg 来解决这个问题,因为 @ModifyArgs 无法在 Java 17+ 的环境中使用。暂时没有发现性能问题 UMU

@PIut02
Copy link
Author

PIut02 commented Jun 3, 2024

使用hotfix3崩溃仍然存在,但报错信息有变化
整合包里模组有些多,我先排查下看看是哪些模组导致崩溃
crash-2024-06-03_23.47.16-client.txt
latest.log

冲突的模组有点多,而且复现条件很奇怪,排查出来的单个mod直接启动又不冲突了,我直接把mods文件夹上传吧
https://www.123pan.com/s/Wql1jv-gnkVh.html

@PIut02
Copy link
Author

PIut02 commented Jun 12, 2024

似乎与史诗战斗冲突,禁用掉史诗战斗tacz与其他模组都能正常启动,但单独把史诗战斗拿出来和tacz一起却又不会冲突

@3TUSK
Copy link
Contributor

3TUSK commented Jun 13, 2024

@PIut02 你给出的 Mod 列表下载链接需要注册或付费才能下载。不知道 https://airportal.cn/ 这个还能不能用?

@PIut02
Copy link
Author

PIut02 commented Jun 13, 2024

可以使用但有时限,已经重新上传
https://airportal.cn/371623/BOsKc9QbCH
取件码371623

@3TUSK
Copy link
Contributor

3TUSK commented Jun 14, 2024

@PIut02

就目前的测试结果和对既往文献分析结果来说,理论上确实是 Epic Fight 和 TaC:Z 冲突,但触发条件有点苛刻。
并且,理论上新版 Epic Fight 已经不再会和 TaC:Z 冲突了,但新版 Epic Fight 至今还没发布。

我试试能不能换个思路……

折叠起来的内容是给开发者看的

For the record, I believe this becomes an instance of SpongePowered/Mixin#544 where @ModifyArg won't play well with @Redirect if an index is specified, and this instance requires very specific launch order to reproduce. Namely, Epic Fight's @Redirect must happen before TaC:Z's @ModifyArg in order to reproduce this crash.
Removing mods will shuffle the loading order; with the presence of other mixins at the same spot, this may or may not fixing on its own due the changing order.

Epic Fight has removed its usage of mixin on MouseHandler since this commit Epic-Fight/epicfightmod@8b8c75a which can also solve this issue; however this update has not been released at the moment I am writing this.

If you are on Fabric's Mixin fork (that is, Fabric/NeoForge/Quilt/anything that ships it, version 0.13.1+mixin.0.8.5 or later), this won't be an issue because they fixed it on their own (FabricMC/Mixin#128).

Changing back to @Redirect cannot work, for multiple @Redirect cannot chain together.

I am going to make a PR to TaC:Z on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants