HMCL-dev / HMCL-dev/HMCL

[Bug] macOS ARM64 下 Cleanroom 启动时混入 LWJGL2 与 LWJGL3

Open
#6,509 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
10.1k
Forks
934
Avg merge
1d 5h
Merged PRs (30d)
82

Description

平台 | Platform
  • macOS 26.5.2 (Apple Silicon / arm64)
  • Java 21.0.11 (Zulu)
  • HMCL 3.17.0.351
  • Minecraft 1.12.2
  • Cleanroom 0.3.16-alpha
  • lwjglxx 1.1.6
问题描述 | Bug Description

从 MMC 格式整合包导入一个使用 Cleanroom 0.3.16-alpha 的 1.12.2 实例后,在 macOS arm64 上启动时,实际 classpath 同时包含旧版 LWJGL2 和 Cleanroom 使用的 LWJGL3:

org.lwjgl.lwjgl:lwjgl:2.9.2-nightly-20140822
org.lwjgl.lwjgl:lwjgl_util:2.9.2-nightly-20140822
org.lwjgl:lwjgl:3.3.6
com.cleanroommc:lwjglxx:1.1.6

启动日志出现:

The jar file ... lwjgl-2.9.2-nightly-20140822.jar has a security seal for path org.lwjgl
The jar file ... lwjgl-3.3.6.jar is trying to seal already secured path org.lwjgl
Caused by: java.lang.NoSuchMethodError: getPointer
    at org.lwjgl.Sys.loadLibrary(Sys.java:95)
重现步骤 | Steps to Reproduce
  1. 将包含 Cleanroom 0.3.16-alpha 的 MMC 格式整合包导入 HMCL。
  2. 在 macOS arm64、Java 21 上启动实例。
  3. 查看实际启动 classpath 和游戏日志。
临时解决方法 | Workaround

从版本 JSON 的顶层 libraries 以及嵌套 patches[].libraries 中移除以下旧版条目:

org.lwjgl.lwjgl:*

完全退出并重新打开 HMCL 后,启动日志变为:

LWJGL Version: 3.3.6-snapshot
OpenAL initialized.
期望行为 | Expected Behavior

当 Cleanroom 版本明确使用 LWJGL3 时,希望 HMCL 在合并版本 JSON 或生成实际 classpath 时,避免同时加载包含 org.lwjgl 包的旧 LWJGL2 条目,或提供明确的冲突处理提示。

这个现象与 #3528 类似,但在 HMCL 3.17.0.351 + Cleanroom 0.3.16-alpha 的 MMC 导入路径中仍可复现,烦请确认现有修复是否覆盖该场景。

隐私说明 | Privacy Note

为避免泄露隐私,本文没有上传原始日志或导出的 crash ZIP;原始文件可能包含本地用户名、绝对路径、UUID 和访问令牌。上方内容仅保留脱敏后的环境信息、classpath 和关键错误行。

启动器崩溃报告 / 启动器日志文件 | Launcher Crash Report / Launcher Log File

已在上方提供脱敏后的关键启动器/游戏日志片段。需要进一步信息时,我可以提供经过脱敏的最小复现日志。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the MMC import and launch flow on macOS arm64 with the listed Cleanroom instance, then trace how top-level libraries and nested patches[].libraries are merged into the actual classpath. Compare the resulting entries with the reported LWJGL2/LWJGL3 conflict and inspect the existing handling related to #3528. Done means the conflicting old LWJGL2 entries are avoided or a clear conflict warning is provided without breaking valid launches.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.