Hey everyone, I’m using LibGDX to make an Android game and came across this problem today while debugging my game via eclipse. The game seems to lock up, although no errors are thrown that I can see - the OpenGL thread is suspended due to an NPE in GLSurfaceView. I haven’t created this class, I’m assuming it’s from LibGDX. The NPE occurs on line 1244 of this class, which is:
sGLThreadManager.threadExiting(this);
The full method is:
public void run() {
setName("GLThread " + getId());
if (LOG_THREADS) {
Log.i("GLThread", "starting tid=" + getId());
}
try {
guardedRun();
} catch (InterruptedException e) {
// fall thru and exit normally
} finally {
sGLThreadManager.threadExiting(this);
}
}
I’ll take a quick screen shot of the error as it looks in Eclipse:
(Bit big to link directly)
I’m really stumped by this, any help would be greatly appreciated!
EDIT: So yeah, as usual it WAS an npe in my code, not LibGDX. Not that logcat made this obvious mind you. So I’ve traced it back and I’ve come across a new problem (yay):
Comparing strings doesn’t seem to be working on my andoird device. As in, two strings are equal when run on the desktop, but not equal on android. Why? Oh Android, why hath thou forsaken me?