The bug
Loading in a TrueType font with a size set to an out-of-bounds value (such as -1) in the font JSON causes the game to crash with an IllegalStateException
whilst trying to render it. The game will also crash on startup if the resource pack with the font is not removed/disabled.
How to reproduce
Download the attached resource pack and move it to your resource packs folder
Attempt to enable the resource pack
Stack trace
20w51a: [^crash-2021-01-11_12.35.26-client.txt]
Description: Rendering overlay
java.lang.IllegalStateException: Image is not allocated.
at djw.h(SourceFile:155)
at djw.b(SourceFile:365)
at djw.a(SourceFile:359)
at djw.a(SourceFile:348)
at djg$a.a(SourceFile:154)
at dsc.a(SourceFile:52)
at dsb.a(SourceFile:131)
at dsb.d(SourceFile:117)
at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap.computeIfAbsent(Int2ObjectOpenHashMap.java:479)
at dsb.b(SourceFile:117)
at dpz$a.accept(SourceFile:220)
at age.a(SourceFile:17)
at age.a(SourceFile:43)
at afp.b(SourceFile:23)
at dpz.c(SourceFile:312)
at dpz.b(SourceFile:167)
at dpz.a(SourceFile:133)
at dpz.a(SourceFile:115)
at dpz.a(SourceFile:73)
at dqb.a(SourceFile:124)
at dtp.a(SourceFile:132)
at dtm.a(SourceFile:75)
at egc.a(SourceFile:612)
at dpe.e(SourceFile:1053)
at dpe.e(SourceFile:688)
at net.minecraft.client.main.Main.main(SourceFile:215)
Just confirmed this also affects 1.16.5.