Weird error, seems to be started in Notch's code:

Discussion in 'Plugin Development' started by Everdras, Aug 3, 2011.

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


    2011-08-03 11:58:50 [SEVERE] java.lang.NullPointerException
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.EntityLiving.v(
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.EntityLiving.m_(
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.World.entityJoinedWorld(
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.WorldServer.entityJoinedWorld(
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.World.playerJoinedWorld(
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.World.cleanUp(
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.MinecraftServer.h(
    2011-08-03 11:58:50 [SEVERE]     at
    2011-08-03 11:58:50 [SEVERE]     at
    2011-08-03 11:58:50 [SEVERE] Unexpected exception
        at net.minecraft.server.EntityLiving.v(
        at net.minecraft.server.EntityLiving.m_(
        at net.minecraft.server.World.entityJoinedWorld(
        at net.minecraft.server.WorldServer.entityJoinedWorld(
        at net.minecraft.server.World.playerJoinedWorld(
        at net.minecraft.server.World.cleanUp(
        at net.minecraft.server.MinecraftServer.h(
    2011-08-03 11:58:50 [SEVERE] Exception in thread "Thread-140299"
    2011-08-03 11:58:50 [SEVERE] java.lang.NullPointerException
    2011-08-03 11:58:50 [SEVERE]     at org.bukkit.craftbukkit.entity.CraftEntity.getNearbyEntities(
    2011-08-03 11:58:50 [SEVERE]     at
    I put in a hotfix for it into my code, but after looking at the stack trace again it appears it won't help at all since the error isn't in my code at all...

    Anyone know what to make of this?
  2. Offline


    Are you trying to run non-safe API functions from your own thread?
  3. Offline


    Such as...?
    This is the Thread in question:

    Line 68 is the method that caused the exception.

    Also, this isn't a consistent bug. I've been unable to reproduce it on my own and no-one else has reported anything like it. It's just on this one server, and they say it happens whenever they have it installed. I.e. they can reproduce it.

    EDIT: As I'm looking over the code, I'm guessing getNearbyEntities() isn't safe to be run in its own thread. The same person just posted a different stack trace with a ConcurrentModificationException, which can only be from something else since in my code I have the intrinsic lock of all the variables I'm using.
  4. Offline


    Why don't you use the BukkitScheduler? That's what it's there for...
  5. Offline


    Never heard of it, I'll look at it.
  6. Offline


    I'm no expert,but i think that even though your plugin is working,it does something that crashes bukkit...still your fault! :D

    LE: Just took a quick look at the plugin..NICE! The plague....sounds cool,and it's pretty original!
  7. Offline


    Basically the format is:
    get the server some how and define it as server
    server.getScheduler.ScheduleSyncDelayedTask(plugin, new Runnable(){
    public void run(){
    insert code
  8. Offline


    Ah thanks. =)
  9. hi, did you solve this ?
  10. Offline


    I did solve this. Thanks.
Thread Status:
Not open for further replies.

Share This Page