Null texture urls in profile properties cause the game to crash
Steps to reproduce:
- Give yourself the offending item with the command
/give @p player_head[profile={properties:[{name:"textures",value:"e3RleHR1cmVzOntTS0lOOnt1cmw6bnVsbH19fQo="}]}]
Observed results
- The game crashes with the stacktrace
[20:15:53] [Render thread/ERROR]: Reported exception thrown! z: Rendering item at fhz.a(SourceFile:596) ~[minecraft-1.21-client.jar:?] at fhz.a(SourceFile:564) ~[minecraft-1.21-client.jar:?] at fhz.a(SourceFile:560) ~[minecraft-1.21-client.jar:?] at fhy.a(SourceFile:1293) ~[minecraft-1.21-client.jar:?] at fhy.m(SourceFile:588) ~[minecraft-1.21-client.jar:?] at fhy.l(SourceFile:529) ~[minecraft-1.21-client.jar:?] at fib.b(SourceFile:36) ~[minecraft-1.21-client.jar:?] at fib.a(SourceFile:22) ~[minecraft-1.21-client.jar:?] at fib.b(SourceFile:36) ~[minecraft-1.21-client.jar:?] at fib.a(SourceFile:29) ~[minecraft-1.21-client.jar:?] at fhy.a(SourceFile:218) ~[minecraft-1.21-client.jar:?] at ges.a(SourceFile:896) ~[minecraft-1.21-client.jar:?] at fgo.c(SourceFile:1285) ~[minecraft-1.21-client.jar:?] at fgo.f(SourceFile:882) [minecraft-1.21-client.jar:?] at net.minecraft.client.main.Main.main(SourceFile:256) [minecraft-1.21-client.jar:?] at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100) [NewLaunch.jar:?] at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) [NewLaunch.jar:?] at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) [NewLaunch.jar:?] Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "this.input" is null at java.base/java.net.URI$Parser.parse(URI.java:3186) ~[?:?] at java.base/java.net.URI.<init>(URI.java:645) ~[?:?] at com.mojang.authlib.yggdrasil.TextureUrlChecker.isAllowedTextureDomain(TextureUrlChecker.java:31) ~[authlib-6.0.54.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.unpackTextures(YggdrasilMinecraftSessionService.java:150) ~[authlib-6.0.54.jar:?] at grm$1.a(SourceFile:55) ~[minecraft-1.21-client.jar:?] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
Expected results
- The game to not crash, and for the player head to resolve to a default skin.
Footnote
This issue also occurs with Cape and Elytra profile texture parts, not just the skin profile texture.
Cape
/give @p player_head[profile={properties:[{name:"textures",value:"e3RleHR1cmVzOntDQVBFOnt1cmw6bnVsbH19fQo="}]}]
Elytra
/give @p player_head[profile={properties:[{name:"textures",value:"e3RleHR1cmVzOntFTFlUUkE6e3VybDpudWxsfX19Cg=="}]}]