问题描述:

This question already has an answer here:

  • What is a NullPointerException, and how do I fix it?

    12 answers

网友答案:

It's difficult to find the cause of the NPE because we do not have the whole source.

It looks like WorldManager.init() is not called before RoomManager.tick() and WorldManager.render() are called. You should put a breakpoint in WorldManager.init() to test whether is is called before the crash.

网友答案:

I solved it, it wasn't feeding into the main init() method in another class. I did manage to make some of my code more efficient though so I guess something good came out of this in the end :)

相关阅读:
Top