mojira.dev
MC-308647

The resource packs screen can cache font glyphs incorrectly after toggling the "Font Settings" option

The resource pack menu sometimes holds font glyphs in a cache when it shouldn’t. This happens with both rendering backends, but when using the Vulkan rendering backend, this can cause either the game or the JVM to crash, the underlines below the words “Available” and “Selected” to disappear or render incorrectly, and the Vulkan validation layer to log errors.

How to reproduce:

  1. Start the game with the Vulkan rendering backend.

  2. Go to Options… → Resource Packs… and observe that the underlines under the words “Available” and “Selected” are visible. (You actually need to open the resource pack menu first for the issue to occur.)

  3. Exit the resource packs menu.

  4. Go to Options… → Language… → Font Settings…

  5. Toggle the “Force Unicode Font” option. It doesn’t matter what its value currently is; just set it to the other value.

  6. Exit and go back to the resource packs menu.
    -> ❌ The underlines under the words “Available” and “Selected” have disappeared.

  7. Wait a few seconds. If nothing happens, toggle fullscreen or focus on a different window.
    -> ❌ The game crashes.

Stack trace:

com.mojang.renderpearl.api.device.GpuDeviceLossException: VK_ERROR_DEVICE_LOST: Failed to wait for semaphore
Queue <queue>

	at com.mojang.renderpearl.backend.vulkan.VulkanUtils.crashIfFailure(VulkanUtils.java:37)
	at com.mojang.renderpearl.backend.vulkan.VulkanCommandEncoder.awaitSubmitCompletion(VulkanCommandEncoder.java:564)
	at com.mojang.renderpearl.backend.vulkan.VulkanCommandEncoder$1.awaitCompletion(VulkanCommandEncoder.java:582)
	at net.minecraft.client.renderer.StagedVertexBuffer$GpuBufferPool$PendingRecycle.tryRecycle(StagedVertexBuffer.java:325)
	at net.minecraft.client.renderer.StagedVertexBuffer$GpuBufferPool.lambda$tryRecycleBuffers$0(StagedVertexBuffer.java:259)
	at java.base/java.util.ArrayList.removeIf(ArrayList.java:1773)
	at java.base/java.util.ArrayList.removeIf(ArrayList.java:1751)
	at net.minecraft.client.renderer.StagedVertexBuffer$GpuBufferPool.tryRecycleBuffers(StagedVertexBuffer.java:258)
	at net.minecraft.client.renderer.StagedVertexBuffer$GpuBufferPool.acquire(StagedVertexBuffer.java:269)
	at net.minecraft.client.renderer.StagedVertexBuffer.upload(StagedVertexBuffer.java:129)
	at net.minecraft.client.gui.render.GuiRenderer.render(GuiRenderer.java:143)
	at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:505)
	at net.minecraft.client.Minecraft.renderFrame(Minecraft.java:1363)
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1261)
	at net.minecraft.client.Minecraft.run(Minecraft.java:955)
	at net.minecraft.client.main.Main.main(Main.java:292)

Linked issues

Attachments

Comments 2

On my laptop I got a JVM crash once:

[media]

After trying the steps for a while, I get this crash:

[media]

[Mod] ManosSef

RogueLogix

Confirmed

Platform G

Very Important

Crash

26.2 Pre-Release 4, 26.3 Snapshot 4

26.3 Snapshot 5

Retrieved