How to read stack-traces, and troubleshoot your own plugins (by yourself)

Discussion in 'Plugin Development' started by DrBoweNur, Aug 20, 2011.

  1. Offline

    Vinceguy1

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I knew how, but i never knew that it told you the error, i just looked at the line and class, this makes it 10 times easier!
  2. Offline

    kezz101

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    No jokes. I actually enjoy debugging now. @DrBowe you are my saviour [cake]
    hammale likes this.
  3. Offline

    jacklin213

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    wow i love this tut. now i can find out what problems are in my plugins
    +1
    tyzoid likes this.
  4. Offline

    DuhAsianOne

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Code:
    15:22:41 [SEVERE] Could not pass event EntityDeathEvent to ZombieSurvival
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:332)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62)
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:477)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:462)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(C
    raftEventFactory.java:299)
    How do I go look for the JavaPluginLoader.java?
  5. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı Moderator BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That would be looking at the wrong part of the trace. Look below it for the reason it fired.
  6. Offline

    LimitedWard

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Pro tip: if you right click where the line numbers should be in Eclipse (the left margin), an option will appear for you to enable line numbers.
    Darky1126 likes this.
  7. Offline

    Mrchasez

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    In an error like this
    http://pastie.org/5126066

    How do you know where to look?

    This post has been edited 1 time. It was last edited by Mrchasez Oct 28, 2012.
  8. Offline

    Gravity BukkitDev Team Lead Moderator BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  9. Offline

    Mrchasez

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I mean, for this type of error is it usually the first line?
  10. Offline

    Gravity BukkitDev Team Lead Moderator BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You just really have to think about the logic; usually near the top is the best place to start but in your PerformanceTweaks.java file, it calls ChunkPersistance.java, and that top line is the terminating point where (typically) the issue is caused.
  11. Offline

    Mrchasez

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    For this:
    http://pastie.org/5128337

    Is: at me.plugin.ptweaks.ChunkPersistance.onEnable(ChunkPersistance.java:85)

    And: at me.plugin.ptweaks.PerformanceTweaks.onEnable(PerformanceTweaks.java:56)

    Right?
  12. Offline

    Gravity BukkitDev Team Lead Moderator BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The second one calls the first one, so yes.
  13. Offline

    Nerdfuryz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Very very useful information! Thank you so much for this.

Share This Page