"this. text" is null happens suddenly
TheWhistlers opened this issue ยท 1 comments
When I was modding an addon for create-fabric, when I opened REI, the game crashed suddenly. From then on, I can't launch my client game, and always give me the same crash report like:
---- Minecraft Crash Report ----
// Shall we play a game?
Time: 2022/12/12 afternoon 9:04
Description: Initializing game
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null
at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1769)
at java.base/java.util.regex.Matcher.reset(Matcher.java:415)
at java.base/java.util.regex.Matcher.(Matcher.java:252)
at java.base/java.util.regex.Pattern.matcher(Pattern.java:1134)
at net.minecraft.text.TranslatableText.forEachPart(TranslatableText.java:61)
at net.minecraft.text.TranslatableText.updateTranslations(TranslatableText.java:53)
at net.minecraft.text.TranslatableText.visitSelf(TranslatableText.java:145)
at net.minecraft.text.Text.visit(Text.java:96)
at net.minecraft.text.StringVisitable.getString(StringVisitable.java:91)
at net.minecraft.text.Text.getString(Text.java:39)
at net.minecraft.client.MinecraftClient.method_1581(MinecraftClient.java:774)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at net.minecraft.client.search.TextSearchableContainer.index(TextSearchableContainer.java:36)
at net.minecraft.client.search.IdentifierSearchableContainer.add(IdentifierSearchableContainer.java:48)
at net.minecraft.client.MinecraftClient.method_1535(MinecraftClient.java:787)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at net.minecraft.client.MinecraftClient.initializeSearchableContainers(MinecraftClient.java:786)
at net.minecraft.client.MinecraftClient.(MinecraftClient.java:576)
at net.minecraft.client.main.Main.main(Main.java:197)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
A detailed walkthrough of the error, its code path and all known details is as follows:
-- Head --
Thread: Render thread
Stacktrace:
at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1769)
at java.base/java.util.regex.Matcher.reset(Matcher.java:415)
at java.base/java.util.regex.Matcher.(Matcher.java:252)
at java.base/java.util.regex.Pattern.matcher(Pattern.java:1134)
at net.minecraft.text.TranslatableText.forEachPart(TranslatableText.java:61)
at net.minecraft.text.TranslatableText.updateTranslations(TranslatableText.java:53)
at net.minecraft.text.TranslatableText.visitSelf(TranslatableText.java:145)
at net.minecraft.text.Text.visit(Text.java:96)
at net.minecraft.text.StringVisitable.getString(StringVisitable.java:91)
at net.minecraft.text.Text.getString(Text.java:39)
at net.minecraft.client.MinecraftClient.method_1581(MinecraftClient.java:774)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at net.minecraft.client.search.TextSearchableContainer.index(TextSearchableContainer.java:36)
at net.minecraft.client.search.IdentifierSearchableContainer.add(IdentifierSearchableContainer.java:48)
at net.minecraft.client.MinecraftClient.method_1535(MinecraftClient.java:787)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at net.minecraft.client.MinecraftClient.initializeSearchableContainers(MinecraftClient.java:786)
at net.minecraft.client.MinecraftClient.(MinecraftClient.java:576)
๐ We use the issue tracker exclusively for final bug reports and feature requests. However, this issue appears to be better suited for either a discussion thread, or a message on our discord server. Please post your request on one of these, and the conversation can continue there.