Closed QianFuv closed 5 months ago
error log:
[036月2024 00:07:22.997] [Render thread/ERROR] [net.minecraft.client.Minecraft/FATAL]: Out of memory
java.lang.OutOfMemoryError: Java heap space
at mod.lucky77.screen.ScreenBook.createTextField(ScreenBook.java:209) ~[Lucky77_1.19.2_v04.jar%23154!/:1.0]
at mod.lucky77.screen.ScreenBook.loadPages(ScreenBook.java:159) ~[Lucky77_1.19.2_v04.jar%23154!/:1.0]
at mod.lucky77.screen.ScreenBook.<init>(ScreenBook.java:40) ~[Lucky77_1.19.2_v04.jar%23154!/:1.0]
at mod.lucky77.system.SystemPlayer.openBookScreen(SystemPlayer.java:19) ~[Lucky77_1.19.2_v04.jar%23154!/:1.0]
at mod.lucky77.item.ItemBook.m_7203_(ItemBook.java:50) ~[Lucky77_1.19.2_v04.jar%23154!/:1.0]
at net.minecraft.world.item.ItemStack.m_41682_(ItemStack.java:266) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at net.minecraft.client.multiplayer.MultiPlayerGameMode.m_233716_(MultiPlayerGameMode.java:384) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at net.minecraft.client.multiplayer.MultiPlayerGameMode$$Lambda/0x000001a48e137b60.m_233885_(Unknown Source) ~[?:?]
at net.minecraft.client.multiplayer.MultiPlayerGameMode.m_233729_(MultiPlayerGameMode.java:252) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at net.minecraft.client.multiplayer.MultiPlayerGameMode.m_233721_(MultiPlayerGameMode.java:372) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at net.minecraft.client.Minecraft.m_91277_(Minecraft.java:1693) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at net.minecraft.client.Minecraft.m_91279_(Minecraft.java:1953) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at net.minecraft.client.Minecraft.m_91398_(Minecraft.java:1768) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1078) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:700) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23155!/:?]
at java.lang.invoke.LambdaForm$DMH/0x000001a48d005400.invokeStatic(LambdaForm$DMH) ~[?:?]
at java.lang.invoke.LambdaForm$MH/0x000001a48d006800.invoke(LambdaForm$MH) ~[?:?]
at java.lang.invoke.Invokers$Holder.invokeExact_MT(Invokers$Holder) ~[?:?]
at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(DirectMethodHandleAccessor.java:154) ~[?:?]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.3.13.jar%23150!/:?]
at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler$$Lambda/0x000001a48d3bd688.run(Unknown Source) ~[?:?]
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.8.jar%23137!/:?]
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.8.jar%23137!/:?]
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.8.jar%23137!/:?]
at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) ~[modlauncher-10.0.8.jar%23137!/:?]
at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) ~[modlauncher-10.0.8.jar%23137!/:?]
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.8.jar%23137!/:?]
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.8.jar%23137!/:?]
@Epidra
Sorry, Windows Mail considers Github messages as spam, so I got the notification a little late.
I looked through everything and the problem comes from chinese not using spaces. The mod needs them to know how to divide the text into several lines for the book. Without spaces the divider never ends which causes a mermory overflow.
I added spaces after the periods, which lets me open the book: I can update the mod to recognize chinese punctuation marks, but in this case it would be better if you add "/b" after every few words.
/b forces a new line, which would look like this then: (I set the /b randomly)
Totally understood! Thanks for your reply!!!
My suggestion is that you don't need to update the mod to recognize Chinese punctuation. I will update my translation files to use "/b" for line breaks.
I translated the mod's language files 👇 1.19.2 forge newest version zh_cn.json👇
When I enter the game, everything is fine, but when I open the guidebook, it causes a memory leak and exits the game. I've checked the format of the book's content and it seems like there are no fatal errors. Can you help me with this?