Voxelum / x-minecraft-launcher

An Open Source Minecraft Launcher with Modern UX. Provide a Disk Efficient way to manage all your Mods!
https://xmcl.app/
MIT License
664 stars 100 forks source link

1.19及以上版本无法正常启动,关于lwjgl和glfw的问题 #724

Open TheAtomicX opened 1 month ago

TheAtomicX commented 1 month ago

是否已经有人报告过这个问题?

启动器版本

0.45.2

操作系统

Linux

架构

x64

当前行为

实验多个版本,发现1.19及以上的版本无法启动,询问ai,是关于lwjgl和glfw的问题,但是lwjgl等均已正常安装

1.21.1的崩溃报告

Exception in thread "Render thread" 

[12:28:54] [Datafixer Bootstrap/INFO]: 226 Datafixer optimizations took 160 milliseconds
[12:28:56] [Render thread/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[12:28:56] [Render thread/INFO]: Setting user: Arcuniverse
[12:28:56] [Render thread/INFO]: Backend library: LWJGL version 3.3.3+5
[12:28:57] [Render thread/INFO]: [STDERR]: java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.glfw.GLFW$Functions
[12:28:57] [Render thread/INFO]: [STDERR]:  at org.lwjgl.glfw.GLFW.glfwGetPlatform(GLFW.java:1340)
[12:28:57] [Render thread/INFO]: [STDERR]:  at fam.a(SourceFile:131)
[12:28:57] [Render thread/INFO]: [STDERR]:  at ac.a(SourceFile:70)
[12:28:57] [Render thread/INFO]: [STDERR]:  at fgo.a(SourceFile:2545)
[12:28:57] [Render thread/INFO]: [STDERR]:  at fgo.a(SourceFile:2517)
[12:28:57] [Render thread/INFO]: [STDERR]:  at net.minecraft.client.main.Main.main(SourceFile:249)
[12:28:57] [Render thread/INFO]: [STDERR]: Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NullPointerException: A required function is missing: glfwInitAllocator [in thread "Render thread"]
[12:28:57] [Render thread/INFO]: [STDERR]:  at org.lwjgl.system.APIUtil.requiredFunctionMissing(APIUtil.java:145)
[12:28:57] [Render thread/INFO]: [STDERR]:  at org.lwjgl.system.APIUtil.apiGetFunctionAddress(APIUtil.java:139)
[12:28:57] [Render thread/INFO]: [STDERR]:  at org.lwjgl.glfw.GLFW$Functions.<clinit>(GLFW.java:42)
[12:28:57] [Render thread/INFO]: [STDERR]:  at org.lwjgl.glfw.GLFW.nglfwGetError(GLFW.java:1251)
[12:28:57] [Render thread/INFO]: [STDERR]:  at org.lwjgl.glfw.GLFW.glfwGetError(GLFW.java:1280)
[12:28:57] [Render thread/INFO]: [STDERR]:  at fam.a(SourceFile:156)
[12:28:57] [Render thread/INFO]: [STDERR]:  at com.mojang.blaze3d.platform.GLX._initGlfw(SourceFile:58)
[12:28:57] [Render thread/INFO]: [STDERR]:  at  com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:509)
[12:28:57] [Render thread/INFO]: [STDERR]:  at fgo.<init>(SourceFile:502)
[12:28:57] [Render thread/INFO]: [STDERR]:  at net.minecraft.client.main.Main.main(SourceFile:239)

1.19.4的崩溃报告

Time: 2024-08-10 12:14:02
Description: Initializing game

java.lang.ExceptionInInitializerError
at org.lwjgl.glfw.GLFW.nglfwGetError(GLFW.java:1219)
at org.lwjgl.glfw.GLFW.glfwGetError(GLFW.java:1248)
at egi.a(SourceFile:140)
at com.mojang.blaze3d.platform.GLX._initGlfw(SourceFile:59)
at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:844)
at emh.<init>(SourceFile:493)
at net.minecraft.client.main.Main.main(SourceFile:198)
Caused by: java.lang.NullPointerException: A required function is missing: glfwInitAllocator
at org.lwjgl.system.APIUtil.requiredFunctionMissing(APIUtil.java:129)
at org.lwjgl.system.APIUtil.apiGetFunctionAddress(APIUtil.java:122)
at org.lwjgl.glfw.GLFW$Functions.<clinit>(GLFW.java:42)
... 7 more

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
at org.lwjgl.glfw.GLFW.nglfwGetError(GLFW.java:1219)
at org.lwjgl.glfw.GLFW.glfwGetError(GLFW.java:1248)
at egi.a(SourceFile:140)
at com.mojang.blaze3d.platform.GLX._initGlfw(SourceFile:59)
at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:844)
at emh.<init>(SourceFile:493)

 -- Initialization --
Details:
Modules: 
Stacktrace:
at net.minecraft.client.main.Main.main(SourceFile:198)

-- System Details --
Details:
Minecraft Version: 1.19.4
Minecraft Version ID: 1.19.4
Operating System: Linux (amd64) version 6.8.0-40-generic
Java Version: 17.0.12, Azul Systems, Inc.
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Azul Systems, Inc.
Memory: 313649760 bytes (299 MiB) / 461373440 bytes (440 MiB) up to 4123000832 bytes (3932 MiB)
CPUs: 16
Processor Vendor: GenuineIntel
Processor Name: 12th Gen Intel(R) Core(TM) i7-12650H
Identifier: Intel64 Family 6 Model 154 Stepping 3
Microarchitecture: Alder Lake
Frequency (GHz): 4.60
Number of physical packages: 1
Number of physical CPUs: 10
Number of logical CPUs: 16
Graphics card #0 name: AD107M [GeForce RTX 4060 Max-Q / Mobile]
Graphics card #0 vendor: NVIDIA Corporation (0x10de)
Graphics card #0 VRAM (MB): 8224.00
Graphics card #0 deviceId: 0x28a0
Graphics card #0 versionInfo: unknown
Virtual memory max (MB): 23120.02
Virtual memory used (MB): 5800.11
Swap memory total (MB): 15259.00
Swap memory used (MB): 0.00
JVM Flags: 0 total; 
Launched Version: 1.19.4
Backend library: LWJGL version 3.3.1 build 7
Backend API: Unknown
Window size: <not initialized>
GL Caps: Using framebuffer using OpenGL 3.2
GL debug messages: <disabled>
Using VBOs: Yes
Is Modded: Probably not. Client jar signature and brand is untouched
Type: Client (map_client.txt)
 CPU: <unknown>

期望行为

正常启动游戏

复现步骤

系统:Ubuntu 24.04

显卡:NVIDIA GeForce RTX 4060 Laptop GPU/PCIe/SSE2 驱动:使用 NVIDIA driver metapackage 来自 nvidia-driver-555

其他信息?

  1. 302 中有类似问题

  2. 使用hmcl可以正常启动
miaomiaotail commented 1 month ago

我推荐使用Windows玩游戏 我个人不建议你在你的工作电脑上玩游戏,调整一些什么还是太麻烦了

TheAtomicX commented 1 month ago

ok,我想的是linux占用比windows少,游戏可以有更好的性能释放

Yixiao @.***> 于 2024年8月11日周日 22:04写道:

我推荐使用Windows玩游戏 我个人不建议你在你的工作电脑上玩游戏,调整一些什么还是太麻烦了

— Reply to this email directly, view it on GitHub https://github.com/Voxelum/x-minecraft-launcher/issues/724#issuecomment-2282771827, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFKQ5MURQPSPQZDNLG4BDSTZQ5VP7AVCNFSM6AAAAABMJP4MY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBSG43TCOBSG4 . You are receiving this because you authored the thread.Message ID: @.***>

miaomiaotail commented 1 month ago

ok,我想的是linux占用比windows少,游戏可以有更好的性能释放 Yixiao @.> 于 2024年8月11日周日 22:04写道: 我推荐使用Windows玩游戏 我个人不建议你在你的工作电脑上玩游戏,调整一些什么还是太麻烦了 — Reply to this email directly, view it on GitHub <#724 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFKQ5MURQPSPQZDNLG4BDSTZQ5VP7AVCNFSM6AAAAABMJP4MY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBSG43TCOBSG4 . You are receiving this because you authored the thread.Message ID: @.>

没关系,我们仍然会调查你提交的问题。请放心。

zty012 commented 4 weeks ago

可以尝试用HMCL启动一次游戏,补全GLFW库,然后使用自定义的GLFW库