Easy Mob Farm

Easy Mob Farm

160k Downloads

1.19.2 Server crash

ModernGamingWorld opened this issue ยท 12 comments

commented

Describe the bug
java.lang.IllegalArgumentException: bound must be positive
at java.util.Random.nextInt(Random.java:322) ~[?:?] {re:mixin}
at de.markusbordihn.easymobfarm.block.entity.MobFarmBlockEntity.processResult(MobFarmBlockEntity.java:210) ~[easy_mob_farm_1.19.2-7.0.0.jar%23749!/:7.0.0] {re:classloading}
at de.markusbordihn.easymobfarm.block.entity.MobFarmBlockEntity.serverTick(MobFarmBlockEntity.java:175) ~[easy_mob_farm_1.19.2-7.0.0.jar%23749!/:7.0.0] {re:classloading}
at net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity.m_142224_(LevelChunk.java:687) ~[server-1.19.2-20220805.130853-srg.jar%231085!/:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper.m_142224_(LevelChunk.java:780) ~[server-1.19.2-20220805.130853-srg.jar%231085!/:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.world.level.Level.m_46463_(Level.java:446) ~[server-1.19.2-20220805.130853-srg.jar%231085!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:redirector-forge.mixins.json:net.minecraft.world.level.LevelMixin,pl:mixin:APP:kubejs-common.mixins.json:LevelMixin,pl:mixin:APP:does_potato_tick.mixins.json:EntityTickInWorldMixin,pl:mixin:APP:botania_xplat.mixins.json:LevelAccessor,pl:mixin:APP:the_bumblezone.mixins.json:world.LevelMixin,pl:mixin:APP:noseenotick.mixins.json:EntityTickMixin,pl:mixin:APP:enhancedcelestials.mixins.json:MixinWorld,pl:mixin:APP:sliceanddice.mixins.json:LevelMixin,pl:mixin:APP:sereneseasons.mixins.json:MixinLevel,pl:mixin:APP:starlight.mixins.json:common.world.LevelMixin,pl:mixin:APP:canary.mixins.json:alloc.chunk_random.LevelMixin,pl:mixin:APP:canary.mixins.json:world.chunk_access.LevelMixin,pl:mixin:APP:canary.mixins.json:world.inline_block_access.LevelMixin,pl:mixin:APP:canary.mixins.json:world.inline_height.LevelMixin,pl:mixin:APP:citadel.mixins.json:LevelMixin,pl:mixin:A}
at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:331) ~[server-1.19.2-20220805.130853-srg.jar%231085!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:sandbox:chunk_level_init,xf:fml:sereneseasons:temperature_transformer,re:classloading,pl:accesstransformer:B,xf:fml:sandbox:chunk_level_init,xf:fml:sereneseasons:temperature_transformer,pl:mixin:APP:cupboard.mixins.json:ServerAddEntityMixin,pl:mixin:APP:betterendisland.mixins.json:ServerLevelMixin,pl:mixin:APP:kubejs-common.mixins.json:ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.cache_strongholds.ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:bugfix.chunk_deadlock.ServerLevelMixin,pl:mixin:APP:supplementaries-common.mixins.json:ServerLevelMixin,pl:mixin:APP:botania_xplat.mixins.json:ServerLevelMixin,pl:mixin:APP:pluto.mixins.json:fast_entity_access.ServerLevelMixin,pl:mixin:APP:wandering_trapper.mixins.json:ServerLevelMixin,pl:mixin:APP:the_bumblezone.mixins.json:world.ServerWorldMixin,pl:mixin:APP:corgilib.mixins.json:MixinServerLevel,pl:mixin:APP:ad_astra-common.mixins.json:ServerLevelMixin,pl:mixin:APP:enchantwithmob.mixins.json:ServerLevelMixin,pl:mixin:APP:bedbenefits.mixins.json:MixinServerLevel,pl:mixin:APP:ars_elemental.mixins.json:ServerLevelMixin,pl:mixin:APP:enhancedcelestials.mixins.json:MixinServerWorld,pl:mixin:APP:leavesbegone.common.mixins.json:ServerLevelMixin,pl:mixin:APP:starlight.mixins.json:common.world.ServerWorldMixin,pl:mixin:APP:immersiveengineering.mixins.json:coremods.ServerWorldMixin,pl:mixin:APP:canary.mixins.json:alloc.chunk_random.ServerLevelMixin,pl:mixin:APP:canary.mixins.json:chunk.entity_class_groups.ServerLevelAccessor,pl:mixin:APP:canary.mixins.json:entity.inactive_navigations.ServerLevelMixin,pl:mixin:APP:canary.mixins.json:profiler.ServerLevelMixin,pl:mixin:APP:citadel.mixins.json:ServerLevelMixin,pl:mixin:APP:alternate-current.mixins.json:ServerLevelMixin,pl:mixin:APP:betterdeserttemples.mixins.json:ServerLevelMixin,pl:mixin:APP:blueprint.mixins.json:ServerLevelMixin,pl:mixin:APP:mixins.fishofthieves.json:level.MixinServerLevel,pl:mixin:APP:rottencreatures-common.mixins.json:common.ServerLevelMixin,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:APP:betterendisland.mixins.json:EndergeticExpansionMixins,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:866) ~[server-1.19.2-20220805.130853-srg.jar%231085!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:A}
at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:292) ~[server-1.19.2-20220805.130853-srg.jar%231085!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:nochatreports.mixins.json:server.MixinDedicatedServer,pl:mixin:APP:blueprint.mixins.json:DedicatedServerMixin,pl:mixin:APP:tombstone.mixins.json:DedicatedServerMixin,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:806) ~[server-1.19.2-20220805.130853-srg.jar%231085!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:654) ~[server-1.19.2-20220805.130853-srg.jar%231085!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[server-1.19.2-20220805.130853-srg.jar%231085!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:A}
at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin}

To Reproduce
Steps to reproduce the behavior:
Not sure as I was not the one who crashed my server

Expected behavior
A quick fix

Screenshots
If applicable, add screenshots to help explain your problem.

Debugging
Before reporting a issue please check if there is anything relevant in the crash-reports, debug.log and latest.log file.

Is the issue happening in combination with other mods? (If yes, please provide a full list)

Additional context
Add any other context about the problem here.

crash-2023-11-03_12.28.10-server.txt

commented

Thanks a lot for the reminder. My fault I forgot to push the patch live for the other versions. :(

Will push the patched versions to CurseForge and Modrinthin the next few hours.

commented

Thanks for the confirmation. The former calculation has only considered modded "unbreaking" levels up to 10. So everything higher than 10 produced a negative number which caused the crash with "java.lang.IllegalArgumentException: bound must be positive".

The new calculation consider all levels from -10000... to +10000... so there should be no issues. I will update the other versions with this fix as well, so thanks a lot for the report. ;)

When do you expect 1.20.1 to be updated? I can't enter my world anymore due to the crash. Btw awesome mod.

commented

The patch should be live for all version.

commented

Thanks for the report. The crash happens on the check for the "unbreaking" effect.

Do you know which kind of weapon was used in this case and if his has maybe a modded "unbreaking" level > 3 or so ?

commented

@MarkusBordihn I have asked the person who crashed my server to come here and say how they did it, Without this fixed by you or what not, that I can't use my server cause of it. I dont feel like resetting a server

commented
commented

Yeah, I pinged him on discord to have him respond here.

commented

Ok I just released a hot fix 7.0.1 under: https://legacy.curseforge.com/minecraft/mc-mods/easy-mob-farm/files/4838374
This should fix the specific crash in the server crash log.

commented

It was a Reliquary Mage Bane sword and yes it was overly enchanted, but I had been using unbreaking 7 on a variety of other sword types without issue for weeks prior to this crash. I think it might have been from the higher level looting or drop manipulation enchantments I had on the sword.

commented

Thanks for the confirmation. The former calculation has only considered modded "unbreaking" levels up to 10.
So everything higher than 10 produced a negative number which caused the crash with "java.lang.IllegalArgumentException: bound must be positive".

The new calculation consider all levels from -10000... to +10000... so there should be no issues.
I will update the other versions with this fix as well, so thanks a lot for the report. ;)

commented

here's another question @MarkusBordihn, is there a way to disable this below from spamming my server console.

[04.11 07:10:03] [Server] [Server thread/WARN] [Bo's Easy Mob Farm/]: Unable to store loot drop [2 sugar, 1 witch_pupil, 2 sugar] for mob farm Nanny Ogg at BlockPos{x=1028, y=42, z=-1014} for owner 8eb70dcf-d83a-4233-9fd0-990a474fd95a!

commented

Yes, there is an option called "logFullStorage" in the config file which disables the server log.
You can also disable the info chat message for the players with "informOwnerAboutFullStorage".