Nature's Compass

Nature's Compass

116M Downloads

Server freezing in singleplayer and multiplayer or game crashing when trying to search for biome that is disables/doesn't exist

gregest opened this issue ยท 17 comments

commented

Whenever I try to click on a biome that doesn't exist or is disabled, the server either freezes or crashes, it freezes in both single and multiplayer

commented

Please post the crash report, if one is generated.

commented
commented

Same, crashes server

https://pastebin.com/qNszyDTE

commented

i can confirm that too..... server crashes instant...

commented

Looks like this is most likely caused by commit 15b346c

It doesn't know what to do with that "isEnabled" string

I'm getting the same tick-loop as Ravalli03, along with this in the debug log:

java.lang.NoSuchFieldException: isEnabled at java.lang.Class.getDeclaredField(Class.java:2070) at com.chaosthedude.naturescompass.gui.GuiTransparentTextField.func_146194_f(GuiTransparentTextField.java:43) at com.chaosthedude.naturescompass.gui.GuiNaturesCompass.func_73863_a(GuiNaturesCompass.java:105) at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:396) at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1124) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398) at net.minecraft.client.main.Main.main(SourceFile:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) at org.multimc.EntryPoint.listen(EntryPoint.java:143) at org.multimc.EntryPoint.main(EntryPoint.java:34)

commented

In response to @Nogal, that stacktrace is very unlikely to be related to the crash. That bit of reflection needed to render the search box is inside a try/catch, so if an error is thrown, the game won't actually crash, the stacktrace will just be output to the log. I'll be removing those stacktraces (hopefully the reflection entirely, actually) in the next update.

With regards to the issue itself, I have a question and a request for everyone experiencing it:

  1. Does the client/server crash immediately, or does searching happen for a while (i.e. game freezes) before it crashes?
  2. Please try using version 1.5.1 under the exact same conditions as the original crash and let me know if it persists. I'm trying to figure out if this is just a performance configuration issue or if it's unique to 1.6.0.
commented

okay, quickly did a test under the exact same conditions which were

created a completely fresh world, gave myself a nature's compass, flew up in creative and tried searching for biomes that are disabled in configs of the mods or just simply dont exist because I guess they aren't implemented yet. The first three worked, I searched for Degraded, ??? and "JEID does not support this biome" and it didn't crash but when I searched for Coralium Infested Swamp, it crashed to menu with A "Fatal error occured"

A crash report has not been generated but here is the latest.log https://paste.ubuntu.com/p/J4wfVZ8Rr5/ The part where it says that it can't keep up, running a few thousand ms behind is when I searched for the biomes

commented

This issue should be fixed as of version 1.6.1 (out now), but please try it out and confirm.

commented

the issue is still there on my end https://paste.dimdev.org/uwomotovub.mccrash

commented

@gregest: Thanks for investigating. The crash that you encountered in 1.5.1 has been fixed as of 1.6.0.

@Nogal and others: It's been brought to my attention that the spam of stacktraces in the debug log is actually the underlying issue here, as it causes the game to run out of memory pretty quickly. I'm working on fixing the reflection to avoid this. Expect a fix within the next day.

commented

@MattCzyr it sounds like you found the issue, but I wanted to answer your questions from above.

  1. No, it's during the search functionality. During that time the error I pasted above floods the logs until it freezes and then crashes.

  2. I am unable to reproduce the issue in 1.5.1, searching for the exact same vanilla biome (Jungle) causes the crash in 1.6.0 but not 1.5.1

commented

@Nogal @gregest Thanks for following up. As @Nogal noted, I think this boils down to a RAM issue. I'm thinking about tackling this by adding a new config field to specify how many new chunks can be generated per compass search. As you noted, it's not an issue when you've already generated the chunks being searched, but generating thousands of new chunks per search is resource intensive.

commented

@MattCzyr it's certainly more difficult to cause the crash now, but it still occurs. It no longer causes a crash when searching for biomes I've previously visited, but searching for an unvisited biome (i chose 'The End' for my test) balloons the ram out to my Xmx target before the ticking world crash below:

java.lang.NullPointerException: Exception ticking world
        at net.minecraft.world.biome.BiomeCache.func_76838_a(SourceFile:69)
        at net.minecraft.world.biome.BiomeProvider.func_76938_b(BiomeProvider.java:209)
        at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:186)
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:756)
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
        at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
        at java.lang.Thread.run(Thread.java:748)
commented

Just released version 1.6.2. There's a new config field that specifies how many new chunks can be generated per search, and max distance is calculated a bit differently. Delete your config before updating and let me know if this fixes the issue.

commented

I tested it just now and it works perfectly, things get searched for extremely quickly and nothing crashes or freezes anymore, I think the issue is solved now

commented

@MattCzyr just following up, this fixes it for me as well.

This probably also fixes #34 (i see you've already made note that 38 was related as well)