Misplaced textures when reloading resource packs
hexakon opened this issue · 5 comments
After a seemingly arbitrary amount of resource pack changes and reloads (F3+T) since game launch, textures begin to be misplaced and misassigned. This mostly concerns player skins and capes, but also UI elements and blocks in some cases, forcing a relaunch in order to fix all the textures.
I'm using MultiMC 5 and play on online servers, with Fabric Loader version 0.11.6. This error persists even with only OfflineSkins (1.17.1-v1-fabric) and Fabric API (0.37.1+1.17) active, although it appears to take longer to reproduce the bug compared to when I have other mods running. The bug seems to be easiest reproduced in a server with many plugins and/or have server resource packs, but once occurred it will quickly worsen regardless of multiplayer or integrated server.
The above screenshots were taken in the same singleplayer world without going back to the menu. The second was taken after another use of F3+T since the first. At the time of these screenshots, I was still running some client-side optimization mods.
The above screenshots were taken in the lobbies of servers Hypixel and Minehut respectively. This block texture glitch occurred seemingly without any input - I had changed resource packs after the screenshot at Hypixel, but the glitch appeared minutes later. Only OfflineSkins and Fabric API were loaded.
A screenshot in the same singleplayer world as earlier, of what I assume to be the vignette texture being replaced along with the sun by player skin textures. All three groups of screenshots are from three different sessions.
In addition to having my username as filename and placing it in the right folder (as per the instructions on the curseforge page), I also have copies of my skin and custom cape stored in the respective "uuid" folder, named in both my usual uuid and my uuid without minus signs. This latter effort did not appear to have an effect on the problem.
Let me know if there's anything I can do to help.
Could you test if this happens on the forge version? also how many memory do you allocate? and does this happen in older minecraft versions like 1.16.5?
The screenshots above were taken with allocated memory of minimum 512 MB and max 3072MB, and permgen 128 MB. I was still able to reproduce the bug when I launched the same instance with min 2048 MB, max 4096 MB and permgen 128 MB.
The bug still happens when launched via the vanilla launcher. (Fabric 0.11.6 for Minecraft 1.17.1)
Here's a screenshot of the game log whenever the bug occurs. There are several failures which look like this each time the bug occurs or worsens. I tested some more and F3+T seems to usually fix the textures except player and cape skins, and only occasionally worsens the issue.
I couldn't get Forge to work on 1.17.1 (both vanilla launcher and MultiMC), so I tried on 1.16.5 (via MultiMC). The bug does not seem to happen on Forge 1.16.5, but it did happen when I tried on Fabric 1.16.5. I haven't tested how bad it can get, just whether any texture gets swapped at all.
I couldn't reproduce this in my environment, I tried F3+T over 20 times, everything still normal.
How many reloads do you need for this to happen? and do your reloads take longer than 15 seconds? how many CPU cores do you have?
The mod has a cache of 15 seconds, if no access in this time period, it will discard any loaded SkinData that exceeds this limit.
Normally, the mod registers a TickListener to refresh this cache for all loaded players so their SkinData don't get discarded too often, this TickListener's behavior might be different on Fabric than Forge.
New version seems to work just fine. Tested it out in a couple places with server resource packs that would have messed up the textures in older versions, haven't ran into any issues after 10 min. Awesome, thanks!