EchoPet

EchoPet

882k Downloads

Server Crash org.bukkit.Location.checkFinite

oloflarsson opened this issue ยท 3 comments

commented

Original Spigot Issue: https://hub.spigotmc.org/jira/browse/SPIGOT-621

---- Minecraft Crash Report ----
// Oh - I know what I did wrong!

Time: 2/20/15 9:15 AM
Description: Ticking entity

java.lang.IllegalArgumentException: x must be finite
    at org.bukkit.Location.checkFinite(Location.java:607)
    at org.bukkit.Location.setX(Location.java:95)
    at org.bukkit.Location.<init>(Location.java:46)
    at org.bukkit.craftbukkit.v1_8_R1.entity.CraftEntity.getLocation(CraftEntity.java:184)
    at com.dsh105.echopet.libs.dsh105.GeometryUtil.getNearbyEntities(GeometryUtil.java:117)
    at com.dsh105.echopet.libs.dsh105.GeometryUtil.getNearbyPlayers(GeometryUtil.java:145)
    at com.dsh105.echopet.libs.dsh105.particle.ParticleBuilder.show(ParticleBuilder.java:94)
    at com.dsh105.echopet.api.pet.Pet.removePet(Pet.java:209)
    at com.dsh105.echopet.api.PetManager.removePet(PetManager.java:327)
    at com.dsh105.echopet.compat.nms.v1_8_R1.entity.EntityPet.onLive(EntityPet.java:290)
    at com.dsh105.echopet.compat.nms.v1_8_R1.entity.EntityPet.s_(EntityPet.java:444)
    at net.minecraft.server.v1_8_R1.World.entityJoinedWorld(World.java:1590)
    at net.minecraft.server.v1_8_R1.World.g(World.java:1565)
    at net.minecraft.server.v1_8_R1.World.tickEntities(World.java:1412)
    at net.minecraft.server.v1_8_R1.WorldServer.tickEntities(WorldServer.java:576)
    at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:772)
    at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316)
    at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:634)
    at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:537)
    at java.lang.Thread.run(Thread.java:745)
commented

I'm curious as to how your server survived prior to that error with an entity at an invalid position. Judging by that error, any calculation that involves retrieving the location of said entity (in this case, an iteration over those nearby) will cause this error to be thrown. I suggest you remove the entity externally (not in-game), as this isn't an EchoPet issue.

commented

How can you be sure this is not an EchoPet issue?
In fact EchoPet is an NPC plugin of sorts and Citizens that is also an NPC plugin also suffers from this issue?

Maybe there is a mistake that can easily be made when creating an NPC plugin that both you and the Citizens author have made?

commented

Any plugin retrieving the location of that particular entity will crash the server. It is unlikely that the entity was a pet; the error occurred during a search for nearby entities (GeometryUtil). The Citizens error was also the result of a similar function (instead retrieving nearby entities in order to send a packet).

The only way this can be fixed is if the entity is removed from the invalid position externally.