ReikaKalseki / Reika_Mods_Issues

The issue tracker for all of my mods - RotaryCraft, its addons, ChromatiCraft, and everything else.
46 stars 14 forks source link

[Chromaticraft v31b] Dimension Crash giving Null Pointer Exception due to Invalid Biome ID #2962

Open Ameliaaaaaaaaa opened 2 years ago

Ameliaaaaaaaaa commented 2 years ago

I have been getting a crash when exploring the Dimension (which I believe is referred to as Proxima) in Chromaticraft. The game crashes after repeatedly generating biomes with invalid IDs, often extremely large and near a power of 2, that then default to an ID of 0 and then crash the game via a NullPointerException. It should be noted that I did not assign these IDs to anything in my Chromaticraft config, i.e., I didn't set the biome ID of Structure Field to be 2049 or 2563.

I have had this crash occur in versions v30d, v31a, and v31b. Possibly older versions as well.

This crash happens somewhat randomly, often during regular exploration of the Luminescent Sanctuary biome, sometimes after utilization of Elemental Sonar, and quite often when heading towards a puzzle structure. It does not always happen; with luck I can get a core or two before the crash happens or perhaps even exit the dimension in the intended way, avoiding the crash completely.

This crash only happens during generation of new chunks; when I am not moving substantially, such as when I am completing a puzzle, this crash does not occur.

Log excerpts and crash report for one example, using v31b, here (I can attach the full log on request, but Pastebin would not let me upload it because it was too big): https://pastebin.com/2bD1BJen Crash Report https://pastebin.com/2fHCxRN8 fml-client-latest.log excerpt https://pastebin.com/NW90HTiQ latest.log

Anecdotally, using the Mobility Star seems to increase the probability that this happens, and so does walking quickly, whereas going more slowly seems to decrease the likelihood of this occurring but not eliminate it entirely. Uninstalling Fastcraft and lowering render distance also seem to help but not fix the issue.

Weirdly, the probability of this crash seems to markedly increase when I enter a world where my character was already in Proxima compared to when I enter through the portal; this often happens when I return to my save after this exact crash. (This seems especially odd because the dimension seems to fully reset after each crash.) This often results in a cycle where I enter Proxima through a portal, get a core after about half an hour of travel time and puzzle solving, explore to find another puzzle, get the crash, restart my game, enter the save, explore the new Proxima for about a minute and thirty seconds, get the crash again, restart my game, enter the save, explore the new Proxima for about a minute and thirty seconds, get the crash, et cetera. After a few rounds, I usually just teleport myself to a negative y-value, sending me back to the Overworld. This "resets the cycle", so to speak, bringing the probability of the crash happening back to normal.

It is quite possible, maybe even likely, that these actions that "likely affect the probability of the crash" are merely a result of magical thinking, but I include them here anyway because they may also be indicators of the underlying issue.

Mobs also seem to spawn in the Luminescent Sanctuary (or at least what should be the Luminescent Sanctuary). One I have observed quite often is Ender Zoo's Enderminy. I suspect this is related to the biome ID issue I have laid out above and to issue #2438. I have attached a photo, taken in v31b. 2021-12-30_17 18 53

Also, the Redstone Ether data (from Wireless Redstone: Chicken Bones Edition) for Proxima does not seem to reset with the rest of the dimension, causing this to appear in fml-client-latest.log: https://pastebin.com/ViXSzbsX This seems to be unrelated to the issue at hand, as no actual chunk data persists between resets, but it may be important to solving my issue or to the percieved cycle behaviour so I mentioned it.

I hope I have provided enough information to help resolve this issue! I would love a fix to this because it is making it exceedingly difficult to collect cores and therefore progress in ChC, but I completely understand if it takes time!

Also, I wish you a happy holidays and a happy new year!

Ameliaaaaaaaaa commented 2 years ago

I should probably mention that I am playing in singleplayer on a FTB Infinity Evolved pack modified to exclude BoP and include Reika's mods.

Luminiferous348 commented 2 years ago

I'll just attach myself to this error, since it seems like I have the same error, as far as I can tell. Here is the latest.log for additional viewing pleasure.

Also, it seems like the world generation is breaking down at 10k blocks out. (This screenshot was taken right before the game crashed).

I play on a selfmade pack which consists of the major Reika mods (Chromati, Ractor, Electri, Rotary, ExpandedRedstone), ExtraUtils, Ender Storage, Iron Chests, Mystcraft, AE2, ChickenChunks with CodeChickenCore and a few client sided mods. So nothing which isn't from Reika and does anything with biomes/dimensions besides of Mystcraft.

FINDERFEED commented 2 years ago

I am getting the same error (Crash report https://pastebin.com/Cd4vUkZD). Mods: JourneyMap, Natures compass and Chromaticraft with DragonAPI.

VeiTheOne commented 2 years ago

Same error over here. It's really annoying when I'm trying to have fun, especially since it's the first time I've ever seen the Dimension since I started playing with the mod off and on several years ago.

It's really bloody annoying. latest.log crash-2022-02-21_22.01.10-server.txt

lAimBotl commented 2 years ago

I can also confirm it is on V31b, I am guessing Reika is on the hiatus though.

FavoritoHJS commented 2 years ago

I'm guessing the cause is ChromaChunkManager.getBiomesForGeneration() leaving some areas unfilled which are then read as 0.

Without seeing how Vanilla does it, though, it's hard to say.

EDIT: No, that can't be it, there's nothing that could NPE there. Plus, the stack trace doesn't say anything.

Acsimagoria commented 2 years ago

This Invalid Biome problem also happened on my self-made pack containing V31b. I thought it was caused by other mods at the very beginning so I disabled all other mods and did quite a few tests(yes including NEI, Waila. I’ve even tried disabling things like fastcraft, betterfps, and foamfix in one of my tests but it turned out to be a bad idea for its continuous lagging…). Yet this crash never went away, so I believe it should be Chromaticraft that caused this crash. In summary, whenever I wanna approach the structure field biome, the game crashes. I guess it has to do with some vanilla biome handling problem? However, for two of my tests, they crashed even earlier before I got near the structure field biome so maybe it’s not the only one biome causing crashes… Since I’ve never been to Proxima in earlier versions than V31b and I didn’t test biomes in the Far Regions, I am not sure if this crash could be duplicated under these circumstances.

kingofrunes commented 2 years ago

Just to add, under similar conditions to the ones mentioned above, I too was encountering this error.

Oddly enough using the same exact world files/data/mods/config and instead starting up a local server and running the code on that caused this error to go away completely. So it seems that it's something specific with the Single Player code that's causing this.

Only issue I was running into running it on the server was it timing out which I fixed or mitigated by increasing the timeout value to 60.

shadoxxhd commented 8 months ago

I've had a very similar crash happen in the overworld: https://pastebin.com/29MrZ09W It seems to happen every couple hours of play time, and I haven't noticed any particular patterns (sometimes it happens when I'm exploring, but sometimes when I'm far from any unexplored chunks).

The coordinate mentioned in the crash does appear to have a correct biome (after reloading, I checked out), and the terrain there was generated a long time ago.