dzwdz / chat_heads

Mozilla Public License 2.0
59 stars 34 forks source link

The game crashes when joining a world #117

Closed MONG-sepsv closed 2 weeks ago

MONG-sepsv commented 3 weeks ago

The game crashes when joining a world

Fourmisain commented 2 weeks ago

You really make me wanna say "No it doesn't."

Needs way more info, like what version you are using, what mod loader and what other mods you have installed. Ideally I'd need a crash report or latest.log, which should contain all that info.

MONG-sepsv commented 2 weeks ago

错误报告-2024-11-7_21.02.17.zip I actually forgot about this. My mod port is from forge.

Fourmisain commented 2 weeks ago

That's a lot of stuff, barely understand what I'm looking at!

From the crash report the issue is this:

IllegalArgumentException: Invalid texture size: 8x0 at com.mojang.blaze3d.platform.NativeImage.\<init> ...

Happening here. This seems to imply that you're using a 64x32 legacy skin texture.

The confusing part is that vanilla Minecraft still does process legacy skins, automatically turning them into modern 64x64 skins, so Chat Heads should never actually see them.

I assume you're loading the skin via CustomSkinLoader from https://littleskin.cn, so maybe there's a bug with that. I'll see if I can reproduce the issue and will probably just add a piece of code that handles legacy skins.

In the meantime you can try converting your legacy skin, e.g. with https://godly.github.io/minetest-skin-converter/ ("Browse" to upload you skin, then right click save the square 64x64 skin.)

Fourmisain commented 2 weeks ago

This is actually a bug with CustomSkinLoader's Forge version. On Fabric, loading legacy skins works without issues. On Forge, the code that converts legacy skins fails due to

ClassCastException: class com.mojang.blaze3d.platform.NativeImage cannot be cast to class customskinloader.fake.itf.IFakeNativeImage

(Which can be seen in your logs as well.)

The game crashes even without Chat Heads, so I'll open an issue on CustomSkinLoader's issue tracker.

MONG-sepsv commented 2 weeks ago

So what should I do?

Fourmisain commented 2 weeks ago

In the meantime you can try converting your legacy skin, e.g. with https://godly.github.io/minetest-skin-converter/ ("Browse" to upload you skin, then right click save the square 64x64 skin.)

Either that, or wait.

MONG-sepsv commented 2 weeks ago

Okay, I'll think about it.

Fourmisain commented 2 weeks ago

There's already a fix, they were super fast!

You can wait for the next CustomSkinLoader release or try the build artifacts here: https://github.com/xfl03/MCCustomSkinLoader/actions/runs/11725889605/artifacts/2158384435 You'll want CustomSkinLoader_ForgeV2-14.21.1-SNAPSHOT-81.jar

Fourmisain commented 2 weeks ago

This is fixed in CustomSkinLoader 14.21.1.

MONG-sepsv commented 2 weeks ago

The problem is solved, thank you