Bug 278014 - games/lwjgl3: Minecraft 1.20.x doesn't launch but 1.12.2 does.
Summary: games/lwjgl3: Minecraft 1.20.x doesn't launch but 1.12.2 does.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-28 20:07 UTC by Yusuf Yaman
Modified: 2024-04-20 17:30 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (vvd)


Attachments
Minecraft Log (deleted)
2024-03-28 20:07 UTC, Yusuf Yaman
no flags Details
Minecraft Log (13.23 KB, text/plain)
2024-03-28 20:11 UTC, Yusuf Yaman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuf Yaman 2024-03-28 20:07:20 UTC
Minecraft 1.20.x doesn't launch but 1.12.2 does. I use Prism Launcher from this personal ports tree.
https://github.com/er2off/freebsd-ports

This port has a lwjgl3 port and I was able to run Minecraft 1.20.x when I was on 14.0-RELEASE but I got build errors on 14.0-STABLE.
Comment 1 Yusuf Yaman 2024-03-28 20:11:27 UTC
Created attachment 249545 [details]
Minecraft Log
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-28 20:19:53 UTC
Work for me without any launchers.
I'm using shell script for run:

#!/usr/bin/env bash

scriptdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"

playername="VVD"
UUID="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
allocated_ram="4G"
java_binary="${scriptdir}"/java/bin/java
java_binary=/usr/local/openjdk21/bin/java
#java_binary=/usr/local/openjdk17/bin/java

LWJGL_DIR=/usr/local/share/java/classes/lwjgl3
LWJGL=${LWJGL_DIR}/lwjgl-glfw.jar:${LWJGL_DIR}/lwjgl-jemalloc.jar:${LWJGL_DIR}/lwjgl-openal.jar:${LWJGL_DIR}/lwjgl-opengl.jar:${LWJGL_DIR}/lwjgl-opengles-natives-freebsd.jar:${LWJGL_DIR}/lwjgl-stb.jar:${LWJGL_DIR}/lwjgl-stb-natives-freebsd.jar:${LWJGL_DIR}/lwjgl-tinyfd.jar:${LWJGL_DIR}/lwjgl-tinyfd-natives-freebsd.jar:${LWJGL_DIR}/lwjgl.jar:${LWJGL_DIR}/lwjgl-natives-freebsd.jar

NATIVES=/usr/local/lib/lwjgl3
DEBUG="-Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.util.DebugLoader=true"

cd "${scriptdir}" || exit 1

"${java_binary}" -Xmx${allocated_ram} -Xss1M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -Dlog4j2.formatMsgNoLookups=true -Dlog4j.configurationFile=assets/log_configs/client-1.12.xml "-DFabricMcEmu= net.minecraft.client.main.Main " \
 "-Djava.library.path=${NATIVES}" "-Djna.tmpdir=/tmp" "-Dorg.lwjgl.system.SharedLibraryExtractPath=${NATIVES}" "-Dio.netty.native.workdir=${NATIVES}" ${DEBUG} \
 "-cp" "libraries/org/ow2/asm/asm/9.6/asm-9.6.jar:libraries/org/ow2/asm/asm-analysis/9.6/asm-analysis-9.6.jar:libraries/org/ow2/asm/asm-commons/9.6/asm-commons-9.6.jar:libraries/org/ow2/asm/asm-tree/9.6/asm-tree-9.6.jar:libraries/org/ow2/asm/asm-util/9.6/asm-util-9.6.jar:libraries/net/fabricmc/sponge-mixin/0.12.5+mixin.0.8.5/sponge-mixin-0.12.5+mixin.0.8.5.jar:libraries/net/fabricmc/intermediary/1.20.4/intermediary-1.20.4.jar:libraries/net/fabricmc/fabric-loader/0.15.7/fabric-loader-0.15.7.jar:libraries/com/github/oshi/oshi-core/6.4.5/oshi-core-6.4.5.jar:libraries/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar:libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:libraries/com/google/guava/guava/32.1.2-jre/guava-32.1.2-jre.jar:libraries/com/ibm/icu/icu4j/73.2/icu4j-73.2.jar:libraries/com/mojang/authlib/6.0.52/authlib-6.0.52.jar:libraries/com/mojang/blocklist/1.0.10/blocklist-1.0.10.jar:libraries/com/mojang/brigadier/1.2.9/brigadier-1.2.9.jar:libraries/com/mojang/datafixerupper/6.0.8/datafixerupper-6.0.8.jar:libraries/com/mojang/logging/1.1.1/logging-1.1.1.jar:libraries/com/mojang/patchy/2.2.10/patchy-2.2.10.jar:libraries/com/mojang/text2speech/1.17.9/text2speech-1.17.9.jar:libraries/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.jar:libraries/commons-io/commons-io/2.13.0/commons-io-2.13.0.jar:libraries/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:libraries/io/netty/netty-buffer/4.1.97.Final/netty-buffer-4.1.97.Final.jar:libraries/io/netty/netty-codec/4.1.97.Final/netty-codec-4.1.97.Final.jar:libraries/io/netty/netty-common/4.1.97.Final/netty-common-4.1.97.Final.jar:libraries/io/netty/netty-handler/4.1.97.Final/netty-handler-4.1.97.Final.jar:libraries/io/netty/netty-resolver/4.1.97.Final/netty-resolver-4.1.97.Final.jar:libraries/io/netty/netty-transport-classes-epoll/4.1.97.Final/netty-transport-classes-epoll-4.1.97.Final.jar:libraries/io/netty/netty-transport-native-epoll/4.1.97.Final/netty-transport-native-epoll-4.1.97.Final-linux-aarch_64.jar:libraries/io/netty/netty-transport-native-epoll/4.1.97.Final/netty-transport-native-epoll-4.1.97.Final-linux-x86_64.jar:libraries/io/netty/netty-transport-native-unix-common/4.1.97.Final/netty-transport-native-unix-common-4.1.97.Final.jar:libraries/io/netty/netty-transport/4.1.97.Final/netty-transport-4.1.97.Final.jar:libraries/it/unimi/dsi/fastutil/8.5.12/fastutil-8.5.12.jar:libraries/net/java/dev/jna/jna-platform/5.13.0/jna-platform-5.13.0.jar:libraries/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar:libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:libraries/org/apache/commons/commons-compress/1.22/commons-compress-1.22.jar:libraries/org/apache/commons/commons-lang3/3.13.0/commons-lang3-3.13.0.jar:libraries/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar:libraries/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar:libraries/org/apache/logging/log4j/log4j-api/2.19.0/log4j-api-2.19.0.jar:libraries/org/apache/logging/log4j/log4j-core/2.19.0/log4j-core-2.19.0.jar:libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.19.0/log4j-slf4j2-impl-2.19.0.jar:libraries/org/joml/joml/1.10.5/joml-1.10.5.jar:${LWJGL}:libraries/org/slf4j/slf4j-api/2.0.7/slf4j-api-2.0.7.jar:versions/fabric-loader-0.15.7-1.20.4/fabric-loader-0.15.7-1.20.4.jar" \
 net.fabricmc.loader.impl.launch.knot.KnotClient --username ${playername} --version fabric-loader-0.15.7-1.20.4 --gameDir "${scriptdir}" --assetsDir assets --assetIndex 12 --uuid ${UUID} --accessToken 00000000000000000000000000000000 --clientId 0000 --xuid 0000 --userType mojang --versionType release
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-28 20:25:15 UTC
> Caused by: java.lang.NullPointerException: A required function is missing: glfwGetPreeditCursorRectangle

https://reviews.freebsd.org/D44490
Comment 4 Yusuf Yaman 2024-03-28 20:57:50 UTC
(In reply to Vladimir Druzenko from comment #3)
I applied the patch to the glfw and Minecraft 1.20.x launches now. Sometimes the game freeze for a second especially in fullscreen mode but I am not sure if this is related.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-28 21:09:12 UTC
(In reply to nxjosephofficial from comment #4)
Did you close browser before start?
Comment 6 Yusuf Yaman 2024-03-28 21:12:49 UTC
(In reply to Vladimir Druzenko from comment #5)
No. I am going to try freezing issue again after i close the browser once.
Comment 7 Yusuf Yaman 2024-03-28 21:19:13 UTC
I rebooted to be ensure and tested minecraft again, no freezing so far! Thank you.
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-04-20 17:18:34 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1c4dc051cb6a2a3119c7ccf0e1ba155a7914761b

commit 1c4dc051cb6a2a3119c7ccf0e1ba155a7914761b
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-04-20 16:57:22 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-04-20 17:17:28 +0000

    graphics/glfw: add option PREEDIT with patches to support running applications such as Minecraft with games/lwjgl3

    The patches are still experimental and not committed.
    Upstream pool request: https://github.com/glfw/glfw/pull/2130

    PR:                     278014
    Approved by:            eduardo (maintainer), arrowd (mentor, implicit)
    Differential Revision:  https://reviews.freebsd.org/D44490
    MFH:                    2024Q2

 graphics/glfw/Makefile | 20 +++++++++++++++++++-
 graphics/glfw/distinfo | 30 +++++++++++++++++++++++++++++-
 2 files changed, 48 insertions(+), 2 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-04-20 17:21:36 UTC
A commit in branch 2024Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d94a177146ce35beba17ed7743e650121328c3be

commit d94a177146ce35beba17ed7743e650121328c3be
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-04-20 16:57:22 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-04-20 17:20:46 +0000

    graphics/glfw: add option PREEDIT with patches to support running applications such as Minecraft with games/lwjgl3

    The patches are still experimental and not committed.
    Upstream pool request: https://github.com/glfw/glfw/pull/2130

    PR:                     278014
    Approved by:            eduardo (maintainer), arrowd (mentor, implicit)
    Differential Revision:  https://reviews.freebsd.org/D44490
    MFH:                    2024Q2

    (cherry picked from commit 1c4dc051cb6a2a3119c7ccf0e1ba155a7914761b)

 graphics/glfw/Makefile | 20 +++++++++++++++++++-
 graphics/glfw/distinfo | 30 +++++++++++++++++++++++++++++-
 2 files changed, 48 insertions(+), 2 deletions(-)
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2024-04-20 17:30:31 UTC
> Caused by: java.lang.NullPointerException:
> A required function is missing: glfwGetPreeditCursorRectangle
For now, users must build graphics/glfw self with option PREEDIT on.
Waiting upstream merge pool request https://github.com/glfw/glfw/pull/2130 and create new version 3.5.