Stack overflow fue to infinite recursion while generating whispering fog emmiter

Issue #51 resolved
Former user created an issue

I'm in the process of making a modpack for semi-private use, and while testing out world generation after adding this mod, I get a stack overflow crash.

Here's the crash report, with redundant recursive calls removed. No idea whats causing it, and it seems the top part of the crash report changes every time I try to recreate the bug, but the final behavior of a stack overflow remains the same.

I looked in the code that is triggering the recursion, and it seems to be related to generating a whispering fog emmiter block.

net.minecraft.util.ReportedException: Exception getting block type in world
    at net.minecraft.world.World.func_147439_a(World.java:686) ~[ahb.class:?]
    at net.minecraft.world.World.func_147453_f(World.java:4605) ~[ahb.class:?]
    at net.minecraft.world.World.func_147455_a(World.java:3208) ~[ahb.class:?]
    at CustomOreGen.Util.TileEntityHelper.readFromPartialNBT(TileEntityHelper.java:29) ~[TileEntityHelper.class:?]
    at CustomOreGen.Server.MapGenOreDistribution$Component.attemptPlaceBlock(MapGenOreDistribution.java:818) ~[MapGenOreDistribution$Component.class:?]
    at CustomOreGen.Server.MapGenVeins$SolidSphereComponent.func_74875_a(MapGenVeins.java:719) ~[MapGenVeins$SolidSphereComponent.class:?]
    at net.minecraft.world.gen.structure.StructureStart.func_75068_a(StructureStart.java:45) ~[avm.class:?]
    at CustomOreGen.Server.MapGenOreDistribution$StructureGroup.func_75068_a(MapGenOreDistribution.java:717) ~[MapGenOreDistribution$StructureGroup.class:?]
    at CustomOreGen.Server.MapGenOreDistribution.func_75051_a(MapGenOreDistribution.java:546) ~[MapGenOreDistribution.class:?]
    at CustomOreGen.Server.MapGenOreDistribution.populate(MapGenOreDistribution.java:270) ~[MapGenOreDistribution.class:?]
    at CustomOreGen.Server.ServerState.populateDistributions(ServerState.java:140) ~[ServerState.class:?]
    at CustomOreGen.Server.ServerState.onPopulateChunk(ServerState.java:200) ~[ServerState.class:?]
    at CustomOreGen.FMLInterface.generate(FMLInterface.java:81) ~[FMLInterface.class:?]
    at cpw.mods.fml.common.registry.GameRegistry.REPLACED_generateWorld(GameRegistry.java:137) ~[GameRegistry.class:1.7.10-R0.1-SNAPSHOT]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
    at farseek.util.Reflection$MethodValue$.apply$extension(Reflection.scala:59) ~[Reflection$MethodValue$.class:?]
    at farseek.core.ReplacedMethod.apply(MethodReplacer.scala:105) ~[Farseek-1.0.11.jar:?]
    at farseek.world.gen.ChunkGeneratorExtensions$.generateWorld(ChunkGeneratorExtensions.scala:19) ~[ChunkGeneratorExtensions$.class:?]
    at farseek.world.gen.ChunkGeneratorExtensions.generateWorld(ChunkGeneratorExtensions.scala) ~[ChunkGeneratorExtensions.class:?]
    at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java) ~[GameRegistry.class:1.7.10-R0.1-SNAPSHOT]
    at net.minecraft.world.gen.ChunkProviderServer.func_73153_a(ChunkProviderServer.java:449) ~[ms.class:?]
    at net.minecraft.world.chunk.Chunk.func_76624_a(Chunk.java:1187) ~[apx.class:?]
    at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:303) ~[ms.class:?]
    at kcauldron.ChunkGenerator.internalGenerate(ChunkGenerator.java:71) ~[ChunkGenerator.class:1.7.10-R0.1-SNAPSHOT]
    at kcauldron.ChunkGenerator.chunkGeneratorCycle(ChunkGenerator.java:50) ~[ChunkGenerator.class:1.7.10-R0.1-SNAPSHOT]
    at cpw.mods.fml.common.FMLCommonHandler.onPostServerTick(FMLCommonHandler.java:252) ~[FMLCommonHandler.class:1.7.10-R0.1-SNAPSHOT]
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:862) ~[MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]
Caused by: java.lang.StackOverflowError
    at net.minecraft.world.WorldServer.func_147454_a(WorldServer.java:600) ~[mt.class:?]
    at net.minecraft.world.WorldServer.func_147464_a(WorldServer.java:594) ~[mt.class:?]
    at glenn.gases.common.block.BlockFogEmitter.func_149674_a(BlockFogEmitter.java:45) ~[BlockFogEmitter.class:?]
    at net.minecraft.world.WorldServer.func_147454_a(WorldServer.java:604) ~[mt.class:?]
    at net.minecraft.world.WorldServer.func_147464_a(WorldServer.java:594) ~[mt.class:?]
    at glenn.gases.common.block.BlockFogEmitter.func_149674_a(BlockFogEmitter.java:45) ~[BlockFogEmitter.class:?]
    at net.minecraft.world.WorldServer.func_147454_a(WorldServer.java:604) ~[mt.class:?]
    at net.minecraft.world.WorldServer.func_147464_a(WorldServer.java:594) ~[mt.class:?]
    at glenn.gases.common.block.BlockFogEmitter.func_149674_a(BlockFogEmitter.java:45) ~[BlockFogEmitter.class:?]
...
...
...
    at net.minecraft.world.WorldServer.func_147454_a(WorldServer.java:604) ~[mt.class:?]
    at net.minecraft.world.WorldServer.func_147464_a(WorldServer.java:594) ~[mt.class:?]
    at glenn.gases.common.block.BlockFogEmitter.func_149674_a(BlockFogEmitter.java:45) ~[BlockFogEmitter.class:?]
    at net.minecraft.world.WorldServer.func_147454_a(WorldServer.java:604) ~[mt.class:?]
[21:05:29 ERROR]:   Cause of unexpected exception was
java.lang.StackOverflowError

Here's a list of mods I am currently using:

#!
Advanced Vanilla 2
ATG 0.12.0
Baubles 1.0.1.10
bdlib 1.9.4.109
Binnie Mods 2.0-pre14
Binnie Patcher 1.8
Biomes O' Plenty 2.1.0.2027
Bugfix Mod 2.5.0
Buildcraft 7.1.18
ChickenChunks 1.3.4.19
CoFH Core 3.1.3-328
CoFH Tweaks 1.1.3B3-94
CodeChickenCore 1.0.7.47
CodeChickenLib 1.1.3.138
Craft Guide 1.6.9.0
CustomOreGen 1.2.26
EnderCore  0.2.0.39_beta
Farseek 1.0.11
Fastcraft 1.23
Fast Leaf Decay 1.4
Gases Framework 1.2.3
Gendustry 1.6.4.135
Glenn's Gases 1.6.6
Gregtech 6.03.28
Forestry 4.2.16.64
Forge Multipart 1.2.0.347
Forge Relocation 0.0.1.4
Forge Relocation FMP 0.0.1.2
IDCleaner 1.0
Industrialcraft Experimental 2-2.2.826
Journeymap Unlimited 5.1.4p1
Magic Bees 2.4.3
MineFactory Reloaded 2.8.2B1-200
MineTweaker3 3.0.10B
ModTweaker2 0.9.6
No More Recipe Conflict 0.3
NotEnoughIDs 1.4.3.4
NotEnoughItems 1.0.5.120
MTUtils 1.4.2
Plant Mega Pack 4.33-1.7.10-1492
Per Fabrica Ad Astra: Geologica 0.2.29
ProjectRed Base 4.7.0pre12.95
ProjectRed Compat 4.7.0pre12.95
ProjectRed Fabrication 4.7.0pre12.95
ProjectRed Integration 4.7.0pre12.95
ProjectRed Lighting 4.7.0pre12.95
ProjectRed Mechanical 4.7.0pre12.95
ProjectRed World 4.7.0pre12.95
RealisticTorches 1.6.3
RedstoneArsenal 1.1.3B1-94
Streams 0.2
TabulaRasa 1.0.1-3
TextureGeneratorLib vBeta2
Thaumcraft 4.2.3.5
Thermal Dynamics 1.2.0-171
Thermal Expansion 4.1.4-247
Thermal Foundation 1.2.6B1-116
Waila 1.5.10
Waila Harvestability 1.1.6
Waila Plugins 0.2.0-23
Wawla 1.3.3
WR-CBE 1.4.1.11
WTF Cave Biomes v1.6
WTFCore v1.7

Comments (8)

  1. Trent VanSlyke

    But.. I haven't even implemented whispering fog yet? What?

    edit: oh shit, this is the 1.7 branch. Yeah, I'll get on it

  2. sylex

    Hi i'm the one who posted this bug. Yea its 1.7.10, I forgot to mention that. I looked at the decompiled source for minecraft and it looks like the problem is caused by calling world.scheduleBlockUpdate() at line 51 in BlockFogEmitter.java That function is the one that calls updateTick() in the first place, meaning that calling world.scheduleBlockUpdate() again is going to just cause infinite recursion. Simply removing line 51 fixes the problem.

    I built and tested the fix myself. The chunk that generated the problem is no longer causing a crash, and the cracked bedrock/whispering fog is there. Everything else seems to be the way it should be.

  3. Trent VanSlyke

    If that is the case, it's not a world gen issue. You disabled Whisperinf Fog blocks generating fog.

  4. sylex

    They still generate fog, I stood next to cracked bedrock and I can confirm they are generating whispering fog.

  5. Trent VanSlyke

    Would you mind downloading this and telling me if it resolves your problem? If it does, I will close this and release a new update.

  6. sylex

    Thanks for the quick patch. I just finished testing the chunks that were causing problems, and I get no crashes. Cracked bedrock is still being generated and whispering fog is being emited from them.

    Looks like everything is working. Thank you!

  7. Log in to comment