ModernUI icon indicating copy to clipboard operation
ModernUI copied to clipboard

与其他mod产生渲染冲突

Open QxMO-qxmo opened this issue 9 months ago • 4 comments

游戏版本1.20.1 fabric 0.15.11

与之冲突的mod OpenLink 1.0.5-hotfix

现象 游戏内加入现代化UI(modernUI)mod后,在openlink面板点击相关一栏即可导致游戏崩溃

如何复现 下载游戏版本1.20.1,fabric0.15.11,api选最新,加入OpenLink 1.0.5-hotfix和Modern UI 3.11.1.6 (Fabric),开启游戏,进入openlink面板,点击相关一栏

可能原因 现代化ui渲染时候与openlink冲突,导致openlink快速大量的重复渲染导致爆栈崩溃

调用栈中反复出现 net.minecraft.class_2585.hashCode、net.minecraft.class_5250.hashCode、net.minecraft.class_2568.hashCode、net.minecraft.class_2583.hashCode 等方法的调用,表明可能在这些类的 hashCode 方法中存在递归调用或循环依赖,导致栈溢出。

windows 10

crash-2025-03-09_23.38.17-client.txt

我已经去openlink的GitHub里提交了issue,可是openlink的开发者反馈这不是他们的问题,只好又来这边问问了

QxMO-qxmo avatar Mar 20 '25 16:03 QxMO-qxmo

否,这就是openlink的问题。

这显然是计算hashCode时出现了循环引用,顺序为Style->HoverEvent->MutableComponent->Style。这肯定是openlink创建文本对象的时候重复使用了同一个Style对象,而hashCode计算都是原版自带的。

BloCamLimb avatar Mar 21 '25 05:03 BloCamLimb

如何解释加了modernUI后才出现崩溃?(好奇

QxMO-qxmo avatar Mar 21 '25 13:03 QxMO-qxmo

因为ModernUI用到了hashCode去查找缓存

BloCamLimb avatar Mar 21 '25 16:03 BloCamLimb

也就是说,所有基于这个方法的mod加进去都会导致崩溃?

QxMO-qxmo avatar Mar 21 '25 16:03 QxMO-qxmo

好像Fabric版Create在打开游戏内设置时会导致按钮不渲染 (Create Issue)[https://github.com/Fabricators-of-Create/Create/issues/1790]

Yukifuri-Yukari avatar Aug 07 '25 09:08 Yukifuri-Yukari

是虚化背景干的

好像Fabric版Create在打开游戏内设置时会导致按钮不渲染 (Create Issue)[https://github.com/Fabricators-of-Create/Create/issues/1790]

Yukifuri-Yukari avatar Aug 08 '25 15:08 Yukifuri-Yukari

No longer add blur effect in 3.12.0.X

BloCamLimb avatar Sep 02 '25 17:09 BloCamLimb