Ticking world crash with WorldGenBurntTree
raltus opened this issue ยท 12 comments
I was flying back to my base and generated some new chunks when the crash happened. I had been noticing some occasional stuttering after updating a few mods, but I wasn't sure what was causing it. Though I think it started after I updated Roots to the new version. It may be related since until that point Mystic World had not been in my pack.
crash-2019-09-22_20.19.43-server.txt
That's... not making much sense, unfortunately. From what I can gather the line that's triggering this is that something in the World is null, but it's nothing that I seem to have any control over.
Is it happening in a fresh world?
The world is around two months old. I started a new play one around when I released the pack because of generation changes in two mods. I have only updated mods and not added any, though I may be removing one in the next update. Only thing I took out was a few custom recipes because they were no longer needed. One thing I just noticed is the wings mod has UD next to it. I've never had a problem with it so I'm not sure why that would be. I was using the bat wings at the time, but I have been for a while now without issue.
I specifically asked if it was happening in a new world to determine if it was something specific to the world (some sort of potential corruption), or whether it was a core issue with Mystical World itself.
So, again, please test the following for me, without this information I cannot help you:
- Is it still occurring? i.e., can you fly around new chunks and cause crashes repeatedly, or did it only happen the once?
- Is it happening if you generate a new world and fly around that one?
I made a copy of the pack in case I needed to try removing mods. I went back to the same area in the copy of the original world and didn't have the crash again. I also made a new world with the same seed so I could go to the same spot with fresh generation. I did notice a lag spike, but I didn't crash like before. Looking at the error, the only thing I can think of is something happened the moment the charred tree generated. I even went to spectator and took a look underground for other generation that may have happened at the same time, but there was just caves.
I did make one more fresh world with a different seed and I didn't have a issue when the trees generated. I will see if it happens again as I'm playing, but right now I'm not sure how to reproduce the crash.
The lag spike is potentially unrelated to Mystical World, but is potentially whatever caused the world generator of the tree (which is identical to the vanilla tree generation in almost every way) to think it had a "null" world... a bit strange. Feel free to reopen if you find you can replicate consistently!
I am having the same crash as well.
It is a new world. Lag spikes frequently though I wasn't able to pin point the cause in the log.
I do want to ask the OP though. Do you have Dynamic Trees and any of their add-ons installed?
I am modifying the RLCraft modpack and felt that it was missing a bit of magic.
I am simply guessing here. But, if the OP has Dynamic Trees as well, it may be a good place to begin looking, since MW is looking to interact with/generate vanilla trees.
No, I am not using dynamic trees. I can't remember if I'd put that in when I started building the pack or not. I've looked at it before and decided not to use it. RLCraft would give me something to compare mods with when I have time. My pack is on Curse as well, Nature's Grimoire. What are you trying to add?
The following are mods I added to RLCraft.
First Set of Added Mods -
Little Tiles - https://www.curseforge.com/minecraft/mc-mods/littletiles
Thaumcraft - https://www.curseforge.com/minecraft/mc-mods/thaumcraft
Thaumic Periphery - https://www.curseforge.com/minecraft/mc-mods/thaumic-periphery
Thaumic JEI - https://www.curseforge.com/minecraft/mc-mods/thaumic-jei
Thaumcraft 6 Aspects for JEI - https://www.curseforge.com/minecraft/mc-mods/thaumcraft-6-aspects-for-jei
Rustic - https://www.curseforge.com/minecraft/mc-mods/rustic
Botania - https://www.curseforge.com/minecraft/mc-mods/botania
Roots - https://www.curseforge.com/minecraft/mc-mods/roots
Embers Rekindled - https://www.curseforge.com/minecraft/mc-mods/embers-rekindled
Soot - https://www.curseforge.com/minecraft/mc-mods/soot
Spartan Weaponry Arcana - https://www.curseforge.com/minecraft/mc-mods/spartan-weaponry-arcana
Immersive Engineering - https://www.curseforge.com/minecraft/mc-mods/immersive-engineering
Embersified - https://www.curseforge.com/minecraft/mc-mods/embersified
Alternating Flux - https://www.curseforge.com/minecraft/mc-mods/alternating-flux
Immersive Tech - https://www.curseforge.com/minecraft/mc-mods/immersive-tech
Engineered Golems - https://www.curseforge.com/minecraft/mc-mods/engineered-golems
Patchouli - https://www.curseforge.com/minecraft/mc-mods/patchouli
Mystic World - https://www.curseforge.com/minecraft/mc-mods/mystic-world
MysticalLib - https://www.curseforge.com/minecraft/mc-mods/mysticallib
Nutrition - https://github.com/WesCook/Nutrition/releases
Dynamic Trees - Thaumcraft Compat - https://www.curseforge.com/minecraft/mc-mods/dttc
Second Set of Added Mods. -
Valkyrien Skies - https://www.curseforge.com/minecraft/mc-mods/valkyrien-skies (ValkyrienWarfare 0.9_pre_6)
Dynamic Trees - Pam's Harvestcraft Compat - https://www.curseforge.com/minecraft/mc-mods/dtphc
Pam's HarvestCraft - https://www.curseforge.com/minecraft/mc-mods/pams-harvestcraft
Pam's Cookables - Pam's Harvestcraft Addon - https://www.curseforge.com/minecraft/mc-mods/pams-cookables
Just Enough HarvestCraft (JEHC) - https://www.curseforge.com/minecraft/mc-mods/just-enough-harvestcraft
Horse Power - https://www.curseforge.com/minecraft/mc-mods/horse-power
Astikor [Horse Carts] - https://www.curseforge.com/minecraft/mc-mods/astikorcarts
Animania - https://www.curseforge.com/minecraft/mc-mods/animania
CraftStudio API - https://www.curseforge.com/minecraft/mc-mods/craftstudio-api
In the process of making this post I disabled the second set of mods and just flew around the map (something that typically makes my toast cry).
The lag spikes and relating errors I was receiving was greatly reduced.
As I am not sure what caused my crash, which incidentally was bad enough to completely close the MultiMC launcher, I wasn't able to attempt to recreate the crash. Thus am not aware if the crash was caused by the second group of mods, but am certain that the lag spikes are related.
I can definitely see there being an issue with Dynamic Trees; we don't support it at all, and I know that generating normal trees with it installed can cause some issues. Outside of that, I think the crashes are unrelated.
Even if your launcher closes, you can go to the Minecraft folder for that pack and look at the crashes folder, so @XvBUSHvX if you could kindly open a new issue with that crash report, that would be great.
"Running ahead, skipping X ticks" is not necessarily indicative of lag. You can get TPS lag with it and without it -- I've had these messages popping up even though my server has been sitting on a perfect 20tps. I'd recommend something like Sampler (/sampler tps
) to get an accurate idea of what your actual TPS is in these circumstances.
Re: "loaded a new chunk", the issue here is generally that, although the code is specifically trying to center the tree (or whatever structure is being generated) in the chunk, if you go within two of the edge of the chunk, you can potentially cause the next chunk (chunks are generated 2x2, although I forget in which direction) to generate.
I do need to check into the barrow, hut & tree placement algorithms to make sure that they're as far over as they can possibly be, but, this is honestly not an issue to worry about. People make a huge deal about "cascading worldgen lag".
The example you have here is not cascading world lag. Despite the crash, loading an additional chunk or even two every so often is not "cascading worldgen lag".
Actual cascading worldgen lag happens when, for some reason, the world generation process sets itself into a loop: it loads the next chunk along in the process of populating the current chunk, and then that chunk has to be populated as well. Then the next chunk loads another, and that loads another, and so-on and so-forth.
There were mods that did actually cause things like that and they would actually cascade quite a bit. You can easily recognise them, though, because they will specifically have multiple lines warning about cascading from the same mod, within a few seconds of each other.
The cascades you're seeing are well within the normal bounds for a mod. They will not cause any actual lag during normal chunk generation via exploration, and the lag they would cause if you were to rapidly fly around the world is minimal compared to Minecraft trying to load a bunch of chunks at once.
From what I understand of the RLCraft mod, it's quite a hefty pack, in that it's running Dynamic Trees, Better Foliage and Lycanite's(?). That may be the reason why you're experiencing lag, even if you have a high-end computer. Likewise, hosting it on a single-player computer will also increase the computing power required, as it is doing both the client and server calculations (instead of connecting to a server) at the same time, increasing the work load.
I don't necessarily think that there is something specifically about Mystical World's tree generation algorithm that is causing lag and thus this crash; I think it's more likely that some other mod is interfering with tree generation and/or the significant lag being caused by other things is somehow contributing.
I think your best bet at this point would be to perform a binary search through your common mods:
- delete half of them (made more difficult by library mods, unfortunately, I know) or more them into another folder, out of the mods directory.
- launch the game and see if you can get it to crash. If you can't, then potentially the mod causing the issue was moved; swap the two sets around until you get a crash
- once you experience a crash, move half of the mods into another folder, and repeat.
Hopefully you will eventually come across the actual culprit. You could boost the frequency of burnt trees to increases the chances of a crash happening if you'd like (in the configuration).
In reality, I think it's more likely that there's a confluence of issues all adding to the pile, but it's possible there is a programming error on my end when it comes to the trees (although I doubt it, as what I'm doing is very close to other mods, and these reports are the first time people have had issue with the mod since trees were added ... several months ago?). I'm more than willing to look into it,
There could also be one mod that is modifying the way tree generators work -- there are ways to invasively modify the code of other mods -- that is causing this issue.
Other potential options:
- definitely look at increase the frequency at which the burnt trees spawn
- alternately, disable the burnt trees entirely and see if you continue to get crashes -- potentially from other world generation or other mods
--
Code wise, just for the record: the NullPointException on this line:
at net.minecraft.world.gen.feature.WorldGenerator.func_175903_a(WorldGenerator.java:37)
Indicates an issue with the following code:
protected void setBlockAndNotifyAdequately(World worldIn, BlockPos pos, IBlockState state)
{
if (this.doBlockNotify)
{
worldIn.setBlockState(pos, state, 3);
}
else
{
int flag = net.minecraftforge.common.ForgeModContainer.fixVanillaCascading ? 2| 16 : 2; //Forge: With bit 5 unset, it will notify neighbors and load adjacent chunks.
worldIn.setBlockState(pos, state, flag);
}
}
It's impossible to tell precisely which line is responsible, but given that it's a NullPointer, it would imply that access (via dot notation) to one of the members is failing. In this case, "this" cannot be null (and if it is, there are much larger issues), therefore it is either the ForgeModContainer being null (again, highly unlikely), or we're left with worldIn
being null. As it is called in both blocks, this is likely where the actual crash is happening.
Stepping back into the delightfully named crosSection
function for the WorldGenBurntTree (delightfully copied from vanilla):
IBlockState state = this.world.getBlockState(blockpos);
if (state.getBlock().isAir(state, world, blockpos) || state.getBlock().isLeaves(state, world, blockpos)) {
this.setBlockAndNotifyAdequately(this.world, blockpos, p_181631_3_);
affectedBlocks.add(blockpos);
}
This is where that function is called. this.world
and world
are the same thing in this context, and is the world
parameter being passed to the setBlockAndNotify
function. This means that there was no error accessing world.getBlockState
, and then in the if
statement after, likewise no errors from the isAir
or isLeaves
functions.
If world
were actually null, then the error would be occurring earlier as execution could never reach the state that it is currently at (in WorldGenerator).
Hence, my confusion on the matter...
I'll reopen this and leave it open for more information you might find.
Ok, getting closer I think. I loaded our common mods and flew around for a while. I had a few spikes that registered with the 'did the system time change....' message. After it finally crashed I went back through the log and found this before the crash info.
additional log info.txt
The cascade has already been reported on Thaumcraft, but it appears Mystic World had one as well. Might be partly due to the speed of flight. Wings is equivalent to sprinting in spectator, which I was doing for the test. The crash report looks identical to the previous as far as I can tell.
crash-2019-09-24_20.11.43-server.txt