当前位置: 动力学知识库 > 问答 > 编程问答 >

nullpointerexception - Java 2 NPE Errors

问题描述:

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 :)

分享给朋友:
您可能感兴趣的文章:
随机阅读: