Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Crash] Collision with prickly vines and icicles can cause a crash #18

Open
kawazoe opened this issue Nov 7, 2024 · 7 comments
Open

Comments

@kawazoe
Copy link

kawazoe commented Nov 7, 2024

I noticed random crashes while walking around some portions of a new world I just created. After looking at the logs, it turns out it's caused by bats randomly getting hurt by prickly vines.

I couldn't reproduce the issue manually. Trying to spawn a bat near the vine didn't cause any issue, and the bat did take damage. I think this might only happen in partially loaded chunks.

Here's the crash log:

crash-2024-11-07_18.53.16-server.txt

EDIT: After playing for a bit, the server started crashing more and more frequently until I couldn't even log on anymore. It's the same crash every time.

@kawazoe
Copy link
Author

kawazoe commented Nov 8, 2024

I took some time to look at the logs and code and, after testing a few things, I managed to simplify the callstack a little.

Looking at the logs, I first thought the bug might actually be in CookingForBlockHead; maybe something related to how they handle LivingDamage events for the CowInAJar feature. They did change that code between 1.20.1 and now, so I tried disabling it. I get a similar error, but this time in a different part of the stack:

java.lang.IllegalStateException: Trying to access unbound value 'ResourceKey[minecraft:damage_type / yungscavebiomes:prickly_vines]' from registry FakeRegistry[registryKey=ResourceKey[minecraft:root / minecraft:damage_type], defaultId=polymer:fake_damage, defaultValue=class_8110[msgId=, scaling=NEVER, exhaustion=0.0, effects=HURT, deathMessageType=DEFAULT]]
    at knot//net.minecraft.class_6880$class_6883.comp_349(class_6880.java:167)
    at knot//net.minecraft.class_1282.method_48792(class_1282.java:140)
    at knot//net.minecraft.class_8143.<init>(class_8143.java:25)
    at knot//net.minecraft.class_3218.method_48760(class_3218.java:1043)
    at knot//net.minecraft.class_1309.method_5643(class_1309.java:1196)
    at knot//com.yungnickyoung.minecraft.yungscavebiomes.block.PricklyVinesBlock.method_9548(PricklyVinesBlock.java:57)

the rest is similar

This all appear to be in minecraft code directly. My modding experience is very sparse, but I suspect there might be a missing registration for the damage type.

@yungnickyoung
Copy link
Member

What happens if you remove Universal Graves? I'm wondering if its dependency, Polymer, somehow causes issues with the way I registered the DamageType.

@Pa-nts
Copy link

Pa-nts commented Nov 24, 2024

Has any progress been made on this error? I seem to be having a similar issue on a custom mod pack server I've been working on. My current solution to avoid crashes is to use Neruina. While this does help the issue it still seems to be present.

@yungnickyoung
Copy link
Member

yungnickyoung commented Nov 26, 2024

So far I haven't been able to determine the cause of the crash, I can't reproduce it. I'm wondering if it's an issue with caching the DamageSource, so I've removed the caching and will include that change in the next release. Hopefully that will fix it.

@yungnickyoung yungnickyoung changed the title [crash] Bats colliding with prickly vines causes cause a crash [Crash] Collision with prickly vines and icicles can cause a crash Nov 26, 2024
@kawazoe
Copy link
Author

kawazoe commented Nov 27, 2024

Unfortunately I didn't get a chance to take a look at this yet. We did manage to workaround the issue in our world by using rcon to kill all bats every 15 minutes + at server start. We haven't seen a crash since.

I'll try to build a version of our pack that doesn't have polymer as soon as I can; probably this weekend.

@SideswipeHoly
Copy link

I have the same issue
crash-2024-11-28_10.53.51-server.txt

@kawazoe
Copy link
Author

kawazoe commented Nov 29, 2024

@SideswipeHoly your crash is very different and has nothing to do with applying damages or any YUNG's mod. It looks like your server just stalled and the log doesn't really point to anything specific. You might want to open a different issue elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants