Weird server crash. Something to do with zombie horses?

Discussion in 'Plugin Development' started by thok13, Feb 19, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    thok13

    Here's the error log:
    http://pastebin.com/xAh5gjCs

    This has happened two times today. The error reports are almost exactly the same. Both times it's zombie horse, but not the same horse.

    The only part that really makes sense is the following:
    Code:java
    1. at java.util.HashMap$HashIterator.nextEntry(HashMap.java:926)
    2. at java.util.HashMap$KeyIterator.next(HashMap.java:960)
    3. at net.minecraft.server.v1_7_R1.EntityLiving.removeAllEffects(EntityLiving.java:440)
    4. at net.minecraft.server.v1_7_R1.EntityLiving.C(EntityLiving.java:232)
    5. at net.minecraft.server.v1_7_R1.EntityInsentient.C(EntityInsentient.java:111)
    6. at net.minecraft.server.v1_7_R1.Entity.h(Entity.java:238)
    7. at net.minecraft.server.v1_7_R1.EntityLiving.h(EntityLiving.java:1265)
    8. at net.minecraft.server.v1_7_R1.EntityInsentient.h(EntityInsentient.java:150)
    9. at net.minecraft.server.v1_7_R1.EntityHorse.h(EntityHorse.java:748)
    10. at net.minecraft.server.v1_7_R1.World.entityJoinedWorld(World.java:1338)
    11. at net.minecraft.server.v1_7_R1.World.playerJoinedWorld(World.java:1319)
    12. at net.minecraft.server.v1_7_R1.World.tickEntities(World.java:1207)
    13. at net.minecraft.server.v1_7_R1.WorldServer.tickEntities(WorldServer.java:480)
    14. at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:637)
    15. at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250)
    16. at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545)
    17. at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457)
    18. at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)

    I guess that means the entities potion effects were modified while being accessed from another thread?

    One of my plugins allows players to create zombie horses by poisoning normal horses, so could this be a problem? I can post the code for this if you think it's the problem.
     
  2. Offline

    SourceForums

    thok13
    Yes, to me it seems that way too. What exactly is the name of the plugin that you're using? Is it up to date? Have you tried asking this on their forums?
     
  3. Offline

    thok13

    It's a plugin that I wrote.
     
  4. Offline

    SourceForums

    thok13
    In that case, I think this thread should be moved to Plugin Developments. I've reported it so please wait for an administrator to move the thread.
     
  5. Offline

    Necrodoom

    Moved to correct section.
    Please provide code of plugin.
     
  6. Offline

    thok13

    Here's the horse part:
    Code:java
    1. @EventHandler
    2. public void OnEntityDamageEvent(EntityDamageEvent e)
    3. {
    4. if(e.getEntityType() == EntityType.HORSE)
    5. {
    6. Horse h = (Horse)e.getEntity();
    7. if(e.getCause() == DamageCause.POISON)
    8. {
    9. h.removePotionEffect(PotionEffectType.POISON);
    10. h.setHealth(h.getMaxHealth());
    11. h.setVariant(Variant.UNDEAD_HORSE);
    12. e.setCancelled(true);
    13. }
    14. }
    15. }
     
  7. Offline

    SourceForums

    thok13
    I can't see any large problems with that code. Are there any other codes affecting the horses and the undead ones?
     
Thread Status:
Not open for further replies.

Share This Page