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

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

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


    From what I see, it means that the code tried to pass a function that doesn't exist, but it compiled because the library had the function.

    First thing I'd do is to check that you are compiling against the same version of bukkit that you are running. If you find that both versions are the same, you may want to check your build process to make sure everything is built cleanly (ie no stale class files are getting into the jar instead of an updated on). And then double check bukkit versions again.
  2. Offline



    It works fine if i remove the scheduler...

    and I've used it on build #1000
    but it wont work on #1060
  3. If i remember correctly, its Bukkit.getServer().getScheduler(). That would explain the error. Ive no idea why your code compiles correctly, though ;)
  4. Offline


    @Bone008 ahh, Thanks, that fixed it :D
  5. Offline


    Bukkit implements Server recently. His craftbukkit is outdated.
  6. Oh right, i missed that. Must be after the latest RB, sine it seems to be the latest commit on github.
    Learned something again ;)
  7. Offline


    You might want to add that most code editors have a "go to line" feature that can be found if you scan through the menus. I know that Eclipse's is Navigate -> go to line OR ctrl + L
    Might be useful :)

    EDIT: for mac users (like me), it's Command + L
  8. Offline


    My stack trace is being cut off (it just says "13 more"). How do I show the whole thing?
  9. Offline



    And NetBeans' is ctrl+G, although I'm not sure what it would be for mac if NetBeans works for mac.
  10. Offline


    Wow, this is so helpful! Usually if I get an error like this I look through the code for ages trying to find whats wrong!

    Thanks for posting this!
  11. Offline


    When it says that, it is implying that it continues from the previous stack.

    Say I had some exception called StupidException because something threw AnotherException and it wasn't caught right (or something like that). The stack trace would read like:

    There was a StupidException at:
    Class (line)
    Class (line)
    Caused By: AnotherException
    Class (line)
    2 more

    When you read that, you should realize that since StupidException was caused by AnotherException, the stack traces would contain the same class-line pairs after a certain point. Once you see that, go back up to the previous exception mentioned in the single trace and continue from there to keep going :p
  12. Offline


    sticky? I use it quite often.
  13. Offline


    Mind moving this to the Resources section? It gets virtually no attention in this section without me bumping (which I refuse to do...except for now I guess), and it's probably better suited for that section anyways.
  14. Offline


    @DrBoweNur I think your topic is in the right place currently. I'm sorry it doesn't get enough attention (because it's a really good tutorial) but I do have a bit of a solution:

    Put it on the wiki : )

    If you link the page up to the Developers Portal it'll receive much more attention than it currently does :)

  15. Offline


    Noted. I'll get started on that :)
  16. Offline


    This is actually a great tutorial. I've removed the "Read First" and stickied it.
    glen3b, mrZcr4fter and tyzoid like this.
  17. Offline


    That works too, seeing as I've never made a wiki post before. Thanks!
    mrZcr4fter likes this.
  18. Offline


    i think you heard this a thousand times, but thank you very much. You made my life much easyer. Ohh and really great drawing-skills, i couldnt do it better.
  19. Offline


    Hey thanks, now I can directly tell devs "Hey, there's an error on line x in!", like a boss. :D
  20. Offline


    ...And that is one of the most helpful things in the world to a dev.
    I honestly believe anyone who uses plugins from should first be required to read this and learn how to report errors correctly. Not that you cant tell just by a description of whats wrong, but its so much more helpful, if there is a console error, that a user actually knows what it is.
  21. Offline


    I wasn't being sarcastic, I read it carefully and it's really helpful. I always wanted to know what stacktraces mean since I also think about learning a little java and writing plugins (I already finished a little in-game calculator ;)).
    Thank you.
  22. Offline


    I never said you were being sarcastic, in fact I was complimenting you for learning it.
    Seeing as you have written plugins you probably know, then, how helpful it is ;)
  23. @sayaad You used Java 7, try compiling with Java 6 :)
    EDIT: Oh, nevermind, you got it :p
  24. Offline


    Excellent article! I've been using stack traces for years now and it always frustrates me whenever someone posts: "Plugin is broken, fix it", without a stack trace or any other information!

    Also: *brohoof*
    DrBowe likes this.
  25. Offline


    I found this just a little bit after I asked what a stack trace was and where i could get it :s
  26. Offline


    Thanks! Would have spammed forever if I hadn't seen this! Helped me get my code working!
  27. Offline


    Thanks so much this really helped me out, although I havent posted stack errors and asking for help, I have posted asking how to fix certain errors while checking armour which did show up in the server log :D
  28. Offline


    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!
  29. Offline


    No jokes. I actually enjoy debugging now. DrBowe you are my saviour [cake]
    hammale likes this.
  30. Offline


    wow i love this tut. now i can find out what problems are in my plugins
    tyzoid likes this.
Thread Status:
Not open for further replies.

Share This Page