Oh The Biomes We've Gone

Oh The Biomes We've Gone

17M Downloads

leaves crash

birmss opened this issue · 42 comments

commented

When trees are destroyed,After the leaves begin to rot my game will crash
Uploading crash-2024-08-03_09.21.53-server.txt…

commented

only trees in this mod

commented

image
File never uploaded

commented
commented

Crashed only when the leaves of the fruit tree rot

commented

Was experiencing the same crash on a personal modpack, but was unsure if it was an issue with Sinytra or not.

commented

Was experiencing the same crash on a personal modpack, but was unsure if it was an issue with Sinytra or not.

Maybe not, i dont use Sinytra

commented

Is it only Fruit Trees?

commented

Seems so. Standing idle in an Orchard biome will eventually crash the game (well, server).

commented

Can someone try with just bwg and our depos and see if it happens?

commented

It has something to do with the way leaves drop resources, I use a copy of the vanilla code for the fruit leaves decay so I wonder if something is messing with it

commented

It seems to not crash with just BWG and it's dependencies. When I experienced the crash, it blamed any forge port of lithium I tried to use (radium or canary).

commented

crash-2024-08-03_13.43.50-server.txt
Also getting this issue when I spawn in the world.

commented

Seems to be an incompat with lithium forks.

commented

crash-2024-08-03_01.46.44-server.txt
Hopefully this crash log uploads.

commented

Only happens on versions 1.0.3+. If I had to guess, probably has something to do with the fruit leaves drop fix for issue #36 .

EDIT: Even without Canary loaded I'm getting the crash. Tried again without Embeddium or any addons and it still crashes, so not entirely certain that it has to do with any of the Sodium/Lithium ports.

commented

It also incompatible with Fast Leaf Decay

commented

@JT122406 @Eletoast
I can confirm it is not an incompatibility. I can straightforwardly reproduce the crash with only the requirements of Biomes We've Gone by planting an orchard sapling, bonemealing it, and removing enough wood that the leaves start to decay.
crash-2024-08-03_14.12.42-server.txt

commented

It also incompatible with Fast Leaf Decay

I think that fast leaf decay just makes the crash, well, faster. I tried without fast leaf decay running and had the same issue.

commented

It occurs with any trees (Skyris, orchard, yucca, baobob) with loot tables added in the commit c646cd4 and possibly other commits if tree loot tables were updated elsewhere.

commented

Yes, this seems to be happening for me too

at net.potionstudios.biomeswevegone.world.level.block.plants.tree.leaves.BWGFruitLeavesBlock.method_9514(BWGFruitLeavesBlock.java:30)

commented

So is this now happening without Litium/Lithium forks?
And or fast leave decay

commented

This is all a bit odd since it references the error in my code for dropping resources on decay, however it doesn't like the loottable but I use the same loottable as the oak leaves with apples for our fruit leaves

commented

那么,现在没有 Litium/Lithium 分叉,这种情况会发生吗?和/或快速离开腐烂

yes

commented

Could it be that only some variants (base, flowering, fruiting) of the leaf blocks are getting their loottable registered (so some say their loottable has length zero) but all variants are trying to trigger a drop upon decay?

commented

For skyris trees at least, I can trigger the crash consistently when a fruiting leaf block tries to decay. I can't trigger it for the base or flowering blocks, so it does seem to have something to do with the added loot tables for fruiting leaves specifically.

commented

Could it be that only some variants (base, flowering, fruiting) of the leaf blocks are getting their loottable registered (so some say their loottable has length zero) but all variants are trying to trigger a drop upon decay?

Loottables are done in json so there is no like register

commented

For skyris trees at least, I can trigger the crash consistently when a fruiting leaf block tries to decay. I can't trigger it for the base or flowering blocks, so it does seem to have something to do with the added loot tables for fruiting leaves specifically.

with just bwg?

commented

@JT122406 Yes, only BWG and its dependencies.

commented

So the drops on this jar are not correct it'll be just normal apples for all fruit leaves but someone please test and if you crash send the log here if not then also let us know:
https://discord.com/channels/636017992265891846/636020573046308874/1269523101385887827

commented

So the drops on this jar are not correct it'll be just normal apples for all fruit leaves but someone please test and if you crash send the log here if not then also let us know: https://discord.com/channels/636017992265891846/636020573046308874/1269523101385887827

@JT122406
Identical crashing behavior on the Forge snapshot jar.

crash-2024-08-03_22.40.01-server.txt

commented

@LordofDorknes Can you send me the log, I put debugs in it

commented

Alright I'm gonna lose my mind, I changed the drops back to using normal mc leaf drops and It's still crashing

commented

I have now tried using only the method from the vanilla Leavesblock and using the default leaves loottable maker and I’m still crashing

commented

Flowering Skyris leaves are still causing the same crashes for me. I tested all the following though as well and seem fine so far:

Baobab ✅
Orchard ✅
Palo Verde ✅
Jacaranda ✅
Indigo Jacaranda ✅
Yucca ✅

Not sure if there are any other leaves considered fruit or flowering that I didn't test, but I figured I'd go through a bunch of them to see if any other than Skyris slipped through.

commented

Just the ripe ones are fruit, flowering didn't have the issue before

commented

crash-2024-08-05_15.18.08-server.txt
This happened on the latest version 1.0.5 beta

commented

Can confirm, also receiving such a crash on 1.0.5 Beta. Will attach a log for further review.

This occurs on a 1.20.1 Fabric instance.

https://mclo.gs/acPBPFG

commented

I am also receiving this crash on the 1.0.5 beta. Pasting my server's crash report in case any additional info there helps.
https://mclo.gs/uI0IHGa

commented

Still active unfortunately

commented

Seems like issue is the fortune chances (for dropping saplings) doesn't have at least one entry (which is used when there is no fortune). I took a look at the other fruit leaves before the workaround and they had a similar issue with their sapling drops.

Current crashing entry (in data/biomeswevegone/loot_tables/blocks/green_apple_skyris_leaves.json):

{
  "type": "minecraft:item",
  "conditions": [
    {
      "condition": "minecraft:survives_explosion"
    },
    {
      "chances": [],
      "condition": "minecraft:table_bonus",
      "enchantment": "minecraft:fortune"
    }
  ],
  "name": "biomeswevegone:skyris_sapling"
}

Fixed entry (matched changes with oak leaves loot table, but I noticed the leaves in this mod use just the first chance entry, so don't scale with fortune):

{
  "type": "minecraft:item",
  "conditions": [
    {
      "condition": "minecraft:survives_explosion"
    },
    {
      "chances": [
        0.05,
        0.0625,
        0.083333336,
        0.1
      ],
      "condition": "minecraft:table_bonus",
      "enchantment": "minecraft:fortune"
    }
  ],
  "name": "biomeswevegone:skyris_sapling"
}

The datagen code would need to be updated to give output similar to the above (at least once value in the "chances" list for sapling drops).

commented

That is a good point I didn’t think about it, I will fix that