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

Crash, generating new World #1786

Open LukaPix opened 6 years ago

LukaPix commented 6 years ago

I am running Forge 10.13.4.1614 And DragonAPI v19c This happens to me trying to create a new world ( default settings ) minecraft doesn't even crash it just outputs this to my log. https://pastebin.com/paTeTbRK Full Log https://justpaste.it/1i10x

I am running the mods

[1.7.10]AppliedExchange-1.7.10-0.1.2 aa_java_enforcer-1.7.10-1.1.5 Academy Craft Actually Additions AdvancedSystemsManager-1.7.10-0.2.0 Aether 2 AetherAspects-1.7.10-1.2 AIImprovements-1.7.10-0.0.1b8 Anim-Texture-Fix-0.3-alpha AOBD AOBDBB AppleMilkTea2-1.7.10_2.9n Applied Energistics 2 Stuff Applied Energistics 2 Aroma Backup Aroma1997 Core Artemis-1.7.2-0.3.1-71f6753-17 Automagy Avaritia-1.13 BD Library BetterFpS BetterLoadingScreen-1.3.10 Big Reactors BiggerCraftingTables-1.7.10-1.7 BiomesO'Plenty Blue Power Botania+r1.8-249 BotaniaVisualizer-1.7.2-1.0a Buildcraft cacti-1.0.1-1.7.10 Carpenter's Blocks ChatFlow-1.1 ChemLab-1.7.10-3.1.0.rc1 ChemLab-1.7.10-3.1.0.rc1-coremod Chicken Chunks Chisel ChromatiCraft+1.7.10+V19c ChunkPurge-1.7.10-2.1 Code Chicken Core CoFH Core Computer Craft craftingtweaks-mc1.7.10-1.0.88 CustomGui-0.6 denseores-1.6.2 dimensionloader-1.7.10-4.0 DragonAPI+1.7.10+V19c Dummy Core EasyConfigButton-1.0 Elec Core Electrical Age ElectriCraft+1.7.10+V19b Ender Core EnderIO-1.7.10-2.3.0.429_beta EnderIOAddons-1.7.10-2.3.0.427_beta-0.10.13.56_beta EnderStorage EquivalentEnergistics+-+0.7+-+1.7.10 Essential Craft Essential Thaumaturgy EternalSingularity-1.7.10-1.0.4 exobj-1.0.1f ExpandedRedstone+1.7.10+V19a Extra Cells $OBF Fluxed Core Forbidden Magic Forestry Funky Locomotion gadomancy-1.7.10-1.0.7.3 Ganys Nether Ganys Surface GardenStuff-1.7.10-1.7.0 Gendustry Generators geoactivity-1.6 GeoStrata+1.7.10+V19a Gildedgames Util Gregtania-0.0.2 gregtech-5.09.29 GT-PlusPlus-1.7.0-prerelease Hardcore Ender Expansion Hats HEXCraft-1.7.10-0.8.5 IChun Utility Immersive Engineering Industrial Craft Experimental Infernal Mobs InfiniteInvo-1.0.52 K4 Library Lambda Library LaserTech-1.2.6-1.7.10 Logisticpipes Mantle-1.7.10-0.3.2.DEV.GITBORK MatterOverdrive-1.7.10-0.4.4 Mekanism-1.7.10-9.1.1.1031 MekanismGenerators-1.7.10-9.1.1.1031 MekanismTools-1.7.10-9.1.1.1031 Metallurgy-1.7.10-4.0.9.148 MetallurgyChisel-1.7.10-1.0.0.11 MetallurgyCore-1.7.10-4.0.5.30 Minechem mineralistic-1.3 Minetweaker 3 Minetweaker Recipe Maker ModTweaker2-0.9.6 MultiBlockMod1.7.10-0.20 Neoteric-0.0.2 Nether Ores NGT Library Not Enough Items NotEnoughIDs-1.4.3.4 NotEnoughThaumcraftTabs-1.0.2 NVLWarpdriveExtensions-1.7.10.1558.1.22 Open Computers Open Mods Library Open Peripheral Addons Open Peripheral Core Open Peripheral Integration Optifine HD Ultra OreDictInit-1.7.10-1.0.5-VerLater PEAA-1.5.3 peaether-1.7.10-PEA1.0.0 PEEX-1.1.1 plantmegapack-4.33-1.7.10-1492 Portal Gun PortalGunSounds PortalGunSounds.pak ProjectE-1.7.10-PE1.10.1 Qmunity Library ReactorCraft+1.7.10+V19c Real Train ReAuth-3.5.0 Reborn Core RotaryCraft+1.7.10+V19c sampler-1.60.1 ServerInfoViewer-1.7.10-1.0.4-universal SG Craft SimpleItemActions-1.7.10-1.0.1 soundCap-1.0 soundreloader-1.1-1.7.10 Steves Carts 2 supremelaser-1.0.1 Tainted Magic Tech Reborn Technomancy Thaumcraft Thaumic Bases Thaumic Energistics Thaumic Exploration Thaumic Tinkerer Thaumic Utilities ThaumicEquivalence-1.7.10-1.0.4 The+Wings+of+Alfheim-1.7.10-30 Thermal Dynamics Thermal Expansion Thermal Foundation Thermal Singularities TheToolTooltipTool-1.7.10-0.3.0-4-universal tinker_io-1.7.10-release+1.5.0 Tinkers Construct Extra Materials Tinkers Construct Tinkers Gregworks Tinkers Mechworks TipTheScales-1.7.10-1.0.1 Treecapitator TrussMod-beta-1.7.10-37 TweakedInventoryTweaks-1.58 Uncharted_1.7.10_v03 Universal Singularities Vulpes Library Waila-1.5.10_1.7.10 WanionLib-1.7.10-1.8 WarpDrive-1.7.10-1.3.35.- Wawla-1.0.5.120 WTP-1.7.10-1.0.29.1 Zetta Industries

ReikaKalseki commented 6 years ago

Does this happen reliably?

LukaPix commented 6 years ago

Yes, i also tried generating a Biomes O' Plenty and the other Minecraft world types, everything crashes besides a flat world

ReikaKalseki commented 6 years ago

This looks like a mod interaction with "EC3", "AcademyCraft", "plantmegapack", GregTech, and a couple others. All the world generators are interfering and causing chunk gen to continue infinitely.

OvermindDL1 commented 6 years ago

As for Gregtech5 it generates chunks in 3x3 sets at once, and thus can interact badly with other mods that do similar things. GT6 on the other hand is fully noise-deterministic and thus only generates 1 chunk at a time, never more. As GT5 is being used above, it may be contributing to the issue when mixed with another mod, but would not be the issue of itself.

ReikaKalseki commented 6 years ago

The issue is "spilling" generation, which is near-ubiquitous among mods, especially those that add anything more complex than a flower or tree type. Basically a chunk generates, and a mod generates some blocks - usually part of an ore vein, structure, or similar - that 'spills' into adjacent chunks, triggering their generation as well. If those also have their own spilling generation, then this can continue until either A) the PC runs out of RAM or B) the JVM crashes with a StackOverflow.

Because of the asynchronicity and unpredictability of chunk generation and order thereof, there is not really a way to fix this; caches cannot be relied on as there is no guarantee that A) they will not grow unmanageably large or B) be meaningless.

OvermindDL1 commented 6 years ago

The issue is "spilling" generation, which is near-ubiquitous among mods, especially those that add anything more complex than a flower or tree type. Basically a chunk generates, and a mod generates some blocks - usually part of an ore vein, structure, or similar - that 'spills' into adjacent chunks, triggering their generation as well. If those also have their own spilling generation, then this can continue until either A) the PC runs out of RAM or B) the JVM crashes with a StackOverflow.

Yep, this is a huge issue. For everyone to know better that basically means that, for example, GT5 can generate it's 3x3 chunks, which maybe another mod generates a single neighbor chunk on one of those edges, which then causes another 3x3 to generate, and so forth. Lots of different mods can interact like this.

This is why GT6 is entirely noise-based (I kept yelling at greg to fix it along with simple code examples, he finally did ^.^), it will never ever generate an adjacent chunk.

Any mod that can cause adjacent chunks to generate is, in my not-so-humble opinion, broken and it absolutely should be considered a bug.

ReikaKalseki commented 6 years ago

Any mod that can cause adjacent chunks to generate is, in my not-so-humble opinion, broken and it absolutely should be considered a bug.

This is rarely avoidable. If the thing to be generated is bigger than a chunk, you cannot simply ignore the issue, and as I said above, chunk-based caches are not a feasible solution as they A) need some way to be meaningfully saved and reloaded (as the "rest" of the generated area may not be generated until some much later time), B) almost always grow to have thousands or even millions of entries and C) completely break down if generation changes in some way between chunks.

OvermindDL1 commented 6 years ago

That is a general fault in the design though, either the 'large' things should be generated only when all the chunks have already been generated (I.E. generate it when the last one was generated instead of generating it on the first or on some 'key'/central chunk), or it should be redesigned so it can be generated piecemeal based on some position-dependent data. If a cache ever even appears in mind then that means the problem is approached in an entirely incorrect manner.

ReikaKalseki commented 6 years ago

Both of those ideas are only meaningful if A) the structure was always 'destined' for a specific position (otherwise it would not be possible to know when 'all the chunks have been generated' because you would not know what chunks you need) - rather than simply being scattered randomly, like an ore vein - and B) you know generation will succeed in the specified location (or its failure is acceptable).

OvermindDL1 commented 6 years ago

Not if it was destined for a certain position, but rather if it is a certain shape. Just compare that shape to an is-loaded check list around the given recently loaded point.

redelman commented 6 years ago

Chunk gen cascades like described above are problematic enough that (at least these days, not sure about the 1.7.10 era) Forge has an option to enable logging when chunk gen cascades happen, so they can be caught and fixed. I play with a large amount of mods in 1.12 and there's very few (that I use anyway) that cause chunk gen cascades, so it is most definitely avoidable.

OvermindDL1 commented 6 years ago

(at least these days, not sure about the 1.7.10 era)

Oh it was in 1.7.10 too, it is easily outright a bug in a given mod if any mod generates a chunk from another chunk generator, always. ^.^;

Forge should have had that option added back then, but then again it should have had a lot of things it didn't have... >.<

ReikaKalseki commented 6 years ago

Not if it was destined for a certain position, but rather if it is a certain shape. Just compare that shape to an is-loaded check list around the given recently loaded point.

Are you saying to just check the chunks it would spill into and only generate if they have been loaded?

In the vast majority of cases, that would prevent the structure from ever generating, as it either would require most or all of the surrounding chunks be loaded (which is near impossible to happen naturally before it itself is loaded).

OvermindDL1 commented 6 years ago

Are you saying to just check the chunks it would spill into and only generate if they have been loaded?

Indeed, if it is 'too' large then split up the structure to generate piecemeal.

In the vast majority of cases, that would prevent the structure from ever generating, as it either would require most or all of the surrounding chunks be loaded (which is near impossible to happen naturally before it itself is loaded).

Not loaded, 'generated'. You can either test it by having MC attempt to load from disk if not loaded while telling it not to generate, or just keep a bitset stored away in global NBT somewhere to keep track of it yourself.

The best method is of course to always support chunk-wise generation without requiring surrounding chunks to be loaded, which can be done by either a generation system designed for chunk-by-chunk generation directly, or by holding some state (again a bitset or whatever) stored away somewhere that tells you what still needs to be generated and when a given chunk has a coordinate that matches inside that based around the central generation point of the structure(s) then generate what's needed for in that chunk as well, that'd be a simple hack for an existing broken system, but the best design is still of course to do chunk specific generation only.