Vulkan Renderer Mod causes OutOfMemoryError: Out of stack space on Minecraft 1.21.1 (RTX 4060, Fabric)
Summary:
When enabling the Vulkan Renderer Mod (vulkanmod 0.5.5), Minecraft 1.21.1 crashes on startup with java.lang.OutOfMemoryError: Out of stack space during Vulkan initialization. Removing the mod allows the game to launch normally with the default OpenGL renderer.
Environment:
- Minecraft: 1.21.1
- Fabric Loader: 0.17.2
- Java: OpenJDK 21.0.8.0 (Eclipse Adoptium)
- OS: Windows 11
- GPU: NVIDIA GeForce RTX 4060 (latest drivers)
- VulkanMod: 0.5.5 (bundles LWJGL 3.3.3-snapshot)
- 119 mods loaded (see log excerpt below for key mods)
Steps to reproduce:
- Install Vulkan Renderer Mod (vulkanmod 0.5.5) into a Fabric 1.21.1 instance.
- Launch Minecraft with Fabric Loader 0.17.2 and Java 21.
- Observe crash during renderer initialization.
Expected behavior: Minecraft initializes the Vulkan renderer and proceeds to the main menu.
Actual behavior: Crash on startup with:
java.lang.OutOfMemoryError: Out of stack space
at knot//org.lwjgl.system.MemoryStack.nmalloc(MemoryStack.java:322)
at knot//org.lwjgl.vulkan.VkExtensionProperties.malloc(VkExtensionProperties:210)
at knot//org.lwjgl.vulkan.VkInstance.getAvailableDeviceExtensions(VkInstance.java:82)
at knot//org.lwjgl.vulkan.VkInstance.getInstanceCapabilities(VkInstance.java:45)
at knot//org.lwjgl.vulkan.VkInstance.<init>(VkInstance.java:29)
at knot//net.vulkanmod.vulkan.Vulkan.createInstance(Vulkan.java:244)
at knot//net.vulkanmod.vulkan.Vulkan.initVulkan(Vulkan.java:139)
at knot//net.vulkanmod.vulkan.VRenderSystem.initRenderer(VRenderSystem:63)
at knot//com.mojang.blaze3d.systems.RenderSystem.initRenderer(RenderSystem:1004)
at knot//net.minecraft.class_310.<init>(class_310:524)
Startup log excerpt:
[14:15:13] [main/INFO]: Loading Minecraft 1.21.1 with Fabric Loader 0.17.2
...
[14:15:14] [main/INFO]: Loading 119 mods:
- vulkanmod 0.5.5
|-- org_lwjgl_lwjgl-shaderc 3.3.3
|-- org_lwjgl_lwjgl-vma 3.3.3
|-- org_lwjgl_lwjgl-vulkan 3.3.3
...
[14:15:25] [Render thread/INFO]: == VulkanMod ==
[14:15:25] [Render thread/INFO]: Selecting Platform: WIN32
[14:15:25] [Render thread/INFO]: GLFW: 3.4.0 Win32 WGL Null EGL OSMesa VisualC DLL
[14:15:27] [Render thread/INFO]: Backend library: LWJGL version 3.3.3-snapshot
Attempts and workarounds tried:
- Closed OBS (graphics-hook previously present in modules) — no effect.
- Increased JVM stack size (e.g., -Xss2M / -Xss4M) — no effect.
- Removed Vulkan mod — game launches normally (OpenGL renderer).
- Verified GPU drivers are the latest for RTX 4060.
- Verified Vulkan support via driver install (vulkan runtime present).
Notes / Hypothesis:
- The stack trace shows the failure occurs inside LWJGL's MemoryStack allocation when enumerating Vulkan extensions. This suggests an issue in the way the mod/LWJGL is allocating stack memory or handling the returned extension list (possible bug in the mod or an LWJGL binding mismatch).
- The environment uses LWJGL 3.3.3-snapshot packaged by vulkanmod; consider testing with a stable LWJGL or reviewing MemoryStack usage in Vulkan.createInstance.
- There may be interactions with the large mod list or specific mods — testing with only vulkanmod + Fabric was not yet performed.
Workaround:
- Remove vulkanmod to use default OpenGL renderer.
Please investigate potential improper MemoryStack usage when enumerating Vulkan extensions or any mod conflicts that could cause inflated stack usage during instance creation.
I encountered the same problem on my rtx 4060. Initially, I was using the 577 version of the video driver, but after playing for a few minutes with the Vulkan mod on 1.21, the driver crashed. I decided to update to the 580.88 version in hopes that it would resolve the issue, but I was unable to even launch the game (java.lang.OutOfMemoryError: Out of stack space). I searched for information about Vulkan changes in the new driver descriptions, but I did not find anything. I'll have to stay on OpenGL for now :(
Having the same issue.
Edit: I went on Vulkan discord and start scrolling up in the Off-topic chat, into someone started talking about it. Copy and paste from discord: Sa1672ndo — 8/28/25, 2:22 PM -Dorg.lwjgl.system.stackSize=256 add this to your JVM args and that should fix it
It did in fact fix it. Hopefully this helps someone in the future.
As of the Nvidia Driver ver 580.82.07, this issue is fixed. Update your systems. Nvidia patch notes: Fixed a bugregression introduced in 580.65.06 that could cause Vulkan applications to hang on Wayland. Added support for NVIDIA Smooth Motion on GeForce RTX 40 Series GPUs. Fixed a bug that caused /sys/class/drm/.../enabled to always report "disabled" for NVIDIA GPU connectors.
Having the same issue.
Edit: I went on Vulkan discord and start scrolling up in the Off-topic chat, into someone started talking about it. Copy and paste from discord: Sa1672ndo — 8/28/25, 2:22 PM -Dorg.lwjgl.system.stackSize=256 add this to your JVM args and that should fix it
It did in fact fix it. Hopefully this helps someone in the future.
This is the fix. Thank uu. It really helped someone after 1 week
The same thing happens to me on a 4070, in 1.21.5 and in 1.21.4.
As of the Nvidia Driver ver 580.82.07, this issue is fixed. Update your systems. Nvidia patch notes: Fixed a bugregression introduced in 580.65.06 that could cause Vulkan applications to hang on Wayland. Added support for NVIDIA Smooth Motion on GeForce RTX 40 Series GPUs. Fixed a bug that caused /sys/class/drm/.../enabled to always report "disabled" for NVIDIA GPU connectors.
Wayland is linux thing-y, right? This issue happen on windows, so... It doesn't relate to our issue, I think. And no, as of v581 on windows issue is still there.
I encountered this problem as well with the 581.29 driver version of my GeForce RTX 40 series GPU, game version 1.21.5. Is there a way to solve this?
i have the same thing the stack size thingy didnt help it caused error code 1 https://imgur.com/a/WnSCi9e
As of the Nvidia Driver ver 580.82.07, this issue is fixed. Update your systems. Nvidia patch notes: Fixed a bugregression introduced in 580.65.06 that could cause Vulkan applications to hang on Wayland. Added support for NVIDIA Smooth Motion on GeForce RTX 40 Series GPUs. Fixed a bug that caused /sys/class/drm/.../enabled to always report "disabled" for NVIDIA GPU connectors.
Wayland is linux thing-y, right? This issue happen on windows, so... It doesn't relate to our issue, I think. And no, as of v581 on windows issue is still there.
welp, this stinks
i have the same thing the stack size thingy didnt help it caused error code 1 https://imgur.com/a/WnSCi9e
please try with only vulkanmod, i think some other mods could be in turn incompatible with stack size thingy (i'm no developer so i don't know what this stack thingy actually is, but with it my vulkan setup works)
i have the same thing the stack size thingy didnt help it caused error code 1 https://imgur.com/a/WnSCi9e
please try with only vulkanmod, i think some other mods could be in turn incompatible with stack size thingy (i'm no developer so i don't know what this stack thingy actually is, but with it my vulkan setup works)
From my testing, vulkanmod has no conflicts with any other mods. I tested this by using Simply Optimized, getting rid of certain mods that cause issues, then disabling and renabling each one to see if they have aconflict.So this is not mod compatiblty issue, for now use -Dorg.lwjgl.system.stackSize=256
-Dorg.lwjgl.system.stackSize=256
shouldnt this be mentioned somewhere in a "troubleshooting" section for vulkanmod?
Probably better if it’s just added to the mod description as like a “For NVIDIA users:” Sent from Proton Mail for iOS On Tue, Oct 28, 2025 at 4:35 AM, Notenlish @.> wrote: Notenlish left a comment (xCollateral/VulkanMod#665) -Dorg.lwjgl.system.stackSize=256 shouldnt this be mentioned somewhere in a "troubleshooting" section for vulkanmod? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>
@HoneyBerries This should be closed
i have the same thing the stack size thingy didnt help it caused error code 1 https://imgur.com/a/WnSCi9e
please try with only vulkanmod, i think some other mods could be in turn incompatible with stack size thingy (i'm no developer so i don't know what this stack thingy actually is, but with it my vulkan setup works)
i tried and didnt work bro RTX 3050 Refresh Mobile 6GB + GeForce Driver 591.59
@Confiac1563 Send crashlog