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

Game crashes when a "speedy zombie" from the mod "MobZ" catches on fire. #37

Closed
RearMisser opened this issue Jan 30, 2024 · 3 comments
Closed
Assignees
Labels
not a bug Correct behavior wontfix This will not be worked on
Milestone

Comments

@RearMisser
Copy link

RearMisser commented Jan 30, 2024

To Reproduce
Steps to reproduce the behavior:

  1. Go into a world with "Mobz" and Soul Fired loaded.
  2. Spawn the zombie, (or wait for it to spawn, your choice, haha), you can use /summon mobz:fast, not sure if it has a spawn egg.
  3. Set the zombie on fire. Both soul fire and normal fire make the game crash.

Expected behavior
Game freezes approx 3 seconds after zombie is set on fire and then crashes with the error message below.

Screenshots
image

System information:

  • Minecraft version:1.19.2
  • Mod version: 3.2.1.0

Additional context
This crash report from my server mentions a Herobrine mod I have installed, so it might also have something to do with it. Not sure though, as I had soul fired and that mod installed way before I installed "Mobz", and it never crashed. Just disabling soul fired also fixes the issue.
crash-2024-01-29_19.26.30-server.txt

@RearMisser RearMisser added the bug Unexpected behavior label Jan 30, 2024
@RearMisser
Copy link
Author

RearMisser commented Jan 30, 2024

Upon further testing, it appears that it is indeed some incompatibility between the herobrine mod and Mobz. It started crashing the same way, even when soul fired was disabled, right after I published this, (even though it hadn't crashed it the few times I had tested it without soul fired, wtf)

I dunno, it could still involve your mod, and if it does, maybe you could work with the devs of the other mods to fix this? That sounds tiring tho.

@Crystal-Spider Crystal-Spider added the low priority Work in due time label Feb 24, 2024
@Crystal-Spider
Copy link
Member

Waiting for #42

@Crystal-Spider Crystal-Spider added the pending Waiting for something label May 28, 2024
@Crystal-Spider Crystal-Spider added this to the 4.0.0.0 milestone May 28, 2024
@Crystal-Spider Crystal-Spider added wontfix This will not be worked on not a bug Correct behavior and removed bug Unexpected behavior low priority Work in due time pending Waiting for something labels Jun 18, 2024
@Crystal-Spider
Copy link
Member

I finally had time to test this out properly.

I'm positive this is not an issue with Soul Fire'd, you see it in the logs only because my code intercepts when an entity is about to be hurt with fire and checks whether it should actually be hurt or healed, which damage source to use, etc.
However the real crash happens in this section:

java.lang.StringIndexOutOfBoundsException: begin 17, end 16, length 16
	at java.lang.String.checkBoundsBeginEnd(String.java:4604) ~[?:?] {}
	at java.lang.String.substring(String.java:2707) ~[?:?] {}
	at java.lang.String.substring(String.java:2680) ~[?:?] {}
	at com.lgow.endofherobrine.config.ConfigHandler.shouldPreventPossession(ConfigHandler.java:201) ~[endofherobrine-1.20.2-1.0.8.2.jar%23158!/:1.20.2-1.0.8.2] {re:classloading}
	at com.lgow.endofherobrine.util.ModUtil.possessMob(ModUtil.java:59) ~[endofherobrine-1.20.2-1.0.8.2.jar%23158!/:1.20.2-1.0.8.2] {re:classloading}
	at com.lgow.endofherobrine.event.PossessionEvents.onMobHurt(PossessionEvents.java:28) ~[endofherobrine-1.20.2-1.0.8.2.jar%23158!/:1.20.2-1.0.8.2] {re:classloading}
	at com.lgow.endofherobrine.event.__PossessionEvents_onMobHurt_LivingHurtEvent.invoke(.dynamic) ~[endofherobrine-1.20.2-1.0.8.2.jar%23158!/:1.20.2-1.0.8.2] {re:classloading,pl:eventbus:B}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:58) ~[eventbus-6.2.0.jar%2392!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:300) ~[eventbus-6.2.0.jar%2392!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:281) ~[eventbus-6.2.0.jar%2392!/:?] {}
	at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:280) ~[forge-1.20.2-48.1.0-universal.jar%23167!/:?] {re:classloading}
	at net.minecraft.world.entity.LivingEntity.m_6475_(LivingEntity.java:1647) ~[client-1.20.2-20230921.100330-srg.jar%23162!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.entity.LivingEntity.m_6469_(LivingEntity.java:1139) ~[client-1.20.2-20230921.100330-srg.jar%23162!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.entity.monster.Zombie.m_6469_(Zombie.java:268) ~[client-1.20.2-20230921.100330-srg.jar%23162!/:?] {re:classloading,xf:fml:forge:forge_method_redirector,pl:mixin:APP:soul_fire_d.mixins.json:ZombieMixin,pl:mixin:A}
	at it.crystalnest.soul_fire_d.api.FireManager.harmOrHeal(FireManager.java:811) ~[soul-fire-d-forge-1.20.2-3.4.3-beta.jar%23161!/:1.20.2-3.4.3-beta] {re:classloading}
	at it.crystalnest.soul_fire_d.api.FireManager.damageOnFire(FireManager.java:789) ~[soul-fire-d-forge-1.20.2-3.4.3-beta.jar%23161!/:1.20.2-3.4.3-beta] {re:classloading}
	at net.minecraft.world.entity.Entity.redirect$zzf002$redirectHurt(Entity.java:3684) ~[client-1.20.2-20230921.100330-srg.jar%23162!/:?] {re:classloading,pl:accesstransformer:B,pl:mixin:A}
	at net.minecraft.world.entity.Entity.m_6075_(Entity.java:459) ~[client-1.20.2-20230921.100330-srg.jar%23162!/:?] {re:classloading,pl:accesstransformer:B,pl:mixin:A}

Here you can see that, once SF successfully redirected the hurt to Forge hooks, and after The End of Herobrine mod makes the game crash.

For comparison, a crash-log without SF installed:

java.lang.StringIndexOutOfBoundsException: begin 17, end 16, length 16
	at java.lang.String.checkBoundsBeginEnd(String.java:4604) ~[?:?] {}
	at java.lang.String.substring(String.java:2707) ~[?:?] {}
	at java.lang.String.substring(String.java:2680) ~[?:?] {}
	at com.lgow.endofherobrine.config.ConfigHandler.shouldPreventPossession(ConfigHandler.java:201) ~[endofherobrine-1.20.2-1.0.8.2.jar%23157!/:1.20.2-1.0.8.2] {re:classloading}
	at com.lgow.endofherobrine.util.ModUtil.possessMob(ModUtil.java:59) ~[endofherobrine-1.20.2-1.0.8.2.jar%23157!/:1.20.2-1.0.8.2] {re:classloading}
	at com.lgow.endofherobrine.event.PossessionEvents.onMobHurt(PossessionEvents.java:28) ~[endofherobrine-1.20.2-1.0.8.2.jar%23157!/:1.20.2-1.0.8.2] {re:classloading}
	at com.lgow.endofherobrine.event.__PossessionEvents_onMobHurt_LivingHurtEvent.invoke(.dynamic) ~[endofherobrine-1.20.2-1.0.8.2.jar%23157!/:1.20.2-1.0.8.2] {re:classloading,pl:eventbus:B}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:58) ~[eventbus-6.2.0.jar%23139!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:300) ~[eventbus-6.2.0.jar%23139!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:281) ~[eventbus-6.2.0.jar%23139!/:?] {}
	at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:280) ~[forge-1.20.2-48.1.0-universal.jar%23165!/:?] {re:classloading}
	at net.minecraft.world.entity.LivingEntity.m_6475_(LivingEntity.java:1647) ~[client-1.20.2-20230921.100330-srg.jar%23160!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.entity.LivingEntity.m_6469_(LivingEntity.java:1139) ~[client-1.20.2-20230921.100330-srg.jar%23160!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.entity.monster.Zombie.m_6469_(Zombie.java:268) ~[client-1.20.2-20230921.100330-srg.jar%23160!/:?] {re:classloading,xf:fml:forge:forge_method_redirector}
	at net.minecraft.world.entity.Entity.m_6075_(Entity.java:459) ~[client-1.20.2-20230921.100330-srg.jar%23160!/:?] {re:classloading,pl:accesstransformer:B}

Same problem from the Herobrine mod. The log is basically the same, just without the redirection from SF.

I can replicate the crash consistently if I set a soul sand block on fire, spawn a Speedy Zombie on it, and then the zombie walks off the block. When this happens, the game crashes, regardless of whether SF is installed.

I suggest you open an issue for The End of Herobrine mod, if you want you can link there this issue too for more insights on the problem.

@Crystal-Spider Crystal-Spider closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug Correct behavior wontfix This will not be worked on
Projects
Development

No branches or pull requests

2 participants