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

java.lang.IllegalStateException: GLFW error before init: [0x1000C]Wayland: The platform does not provide the window position #65

Open
lwb-2021 opened this issue Jun 29, 2024 · 5 comments

Comments

@lwb-2021
Copy link

Description: Initializing game

java.lang.IllegalStateException: GLFW error before init: [0x1000C]Wayland: The platform does not provide the window position
	at com.mojang.blaze3d.platform.GLX.lambda$_initGlfw$0(GLX.java:60) ~[client-1.20.1-20230612.114412-srg.jar%23972!/:?] {re:classloading}
	at com.mojang.blaze3d.platform.Window.m_85407_(Window.java:133) ~[client-1.20.1-20230612.114412-srg.jar%23972!/:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:kubejs-
...
A detailed walkthrough of the error, its code path and all known details is as follows:
-------------------------------------------------------------------------
-- Head --
Thread: Render thread
Suspected Mods: NONE
Stacktrace:
	at com.mojang.blaze3d.platform.GLX.lambda$_initGlfw$0(GLX.java:60) ~[client-1.20.1-20230612.114412-srg.jar%23972!/:?] {re:classloading}
	at com.mojang.blaze3d.platform.Window.m_85407_(Window.java:133) ~[client-1.20.1-20230612.114412-srg.jar%23972!/:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:kubejs-common.mixins.json:WindowMixin,pl:mixin:APP:embeddiumextras.mixin.json:borderless.BorderlessWindowMixin,pl:mixin:APP:embeddiumextras.mixin.json:borderless.accessors.MainWindowAccessor,pl:mixin:APP:embeddium.mixins.json:workarounds.context_creation.WindowMixin,pl:mixin:APP:mixins.oculus.json:MixinWindow,pl:mixin:A,pl:runtimedistcleaner:A}
	at com.mojang.blaze3d.platform.GLX._initGlfw(GLX.java:59) ~[client-1.20.1-20230612.114412-srg.jar%23972!/:?] {re:classloading}
...
-- Initialization --
Details:
	Modules: 
Stacktrace:...
-- System Details --
Details:
	Minecraft Version: 1.20.1
	Minecraft Version ID: 1.20.1
	Operating System: Linux (amd64) version 6.9.6-zen1-1-zen
	Java Version: 17.0.11, N/A
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
	Memory: 9592770880 bytes (9148 MiB) / 10737418240 bytes (10240 MiB) up to 10737418240 bytes (10240 MiB)
	CPUs: 8
	Processor Vendor: GenuineIntel
	Processor Name: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
	Identifier: Intel64 Family 6 Model 94 Stepping 3
	Microarchitecture: Skylake (Client)
	Frequency (GHz): 2.60
	Number of physical packages: 1
	Number of physical CPUs: 4
	Number of logical CPUs: 8
	Graphics card #0 name: HD Graphics 530
	Graphics card #0 vendor: Intel Corporation (0x8086)
	Graphics card #0 VRAM (MB): 512.00
	Graphics card #0 deviceId: 0x191b
	Graphics card #0 versionInfo: unknown
	Graphics card #1 name: GM107M [GeForce GTX 960M]
	Graphics card #1 vendor: NVIDIA Corporation (0x10de)
	Graphics card #1 VRAM (MB): 288.00
	Graphics card #1 deviceId: 0x139b
	Graphics card #1 versionInfo: unknown
	Virtual memory max (MB): 24337.50
	Virtual memory used (MB): 14283.26
	Swap memory total (MB): 16383.00
	Swap memory used (MB): 4365.25
	JVM Flags: 2 total; -Xms10240M -Xmx10240M
	Launched Version: 1.20.1-forge-47.2.20
	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: Definitely; Client brand changed to 'forge'
	Type: Client (map_client.txt)
	CPU: <unknown>

This error occurpted when I tried to play ATM9 on wayland, I do all things the README.MD described, but they did not work

@lwb-2021
Copy link
Author

lwb-2021 commented Jun 29, 2024

I've searched for some solutions on the Internet.
I think patching this function may be helpful

void _glfwGetWindowPosWayland(_GLFWwindow* window, int* xpos, int* ypos);

@masDO1337
Copy link

java.lang.IllegalStateException: GLFW error before init: [0x1000C]Wayland: The platform does not provide the window position

i also got the same problem. is there an update?

@masDO1337
Copy link

I solved the problem, I just had to change the launcher from Multimc to Prism Launcher

@LeafyLuigi
Copy link

LeafyLuigi commented Jul 1, 2024

Using Prism Launcher under Flatpak with NVIDIA, I've gotten the same "The platform does not provide the window position" error. Game version 1.20.1, using ForgeML. Modpack being ATM9 to the skys. Obviously using Wayland.

I've followed this workaround and rebuilt GLFW using these parameters to ensure Wayland-only. Launching with the native GLFW path set to /path/to/rebuilt/glfw/libglfw.so allows the game to work however I'm experiencing severe graphical issues causing the window to be slightly transparent(?) and go white. This could potentially be due to installed mods but I'm not sure.

Following an NVIDIA update since I forgot to update before testing, I've attempted to run the game without the rebuilt GLFW and the same error occurs. Running the game with the rebuilt GLFW didn't work due to a different error related to a lack of OpenGL context, likely because I reused the same minecraft install via symlink. At this point I've kinda given up.

As much as I'd rather use Flatpak, I installed prismlauncher from the AUR. Attempting to run the game again this time without using the rebuilt GLFW did not crash nor were there any graphical issues.

I am under the assumption that the issue could be related to the Flatpak permission settings or other faults related to the Flatpak version.

@Shapaper233
Copy link

neoforged/NeoForge#657 (comment)
This can solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants