[FIXED] java.lang.NullPointerException - how to fix this?

Started by DarkPeter, October 19, 2011, 15:48:16

Previous topic - Next topic

DarkPeter

Hi,
previously I programmed games in NetBeans. Than I changed an application to Eclipse. I installed LWJGL and copy (from NetBeans to Eclipse) my code, but after run my game, Eclipse displays error:
QuoteException in thread "main" java.lang.NullPointerException
   at org.lwjgl.MemoryUtil.getAddress(MemoryUtil.java:126)
   at org.lwjgl.openal.ALC11.alcCaptureOpenDevice(ALC11.java:96)
   at org.lwjgl.test.openal.ALCCaptureTest.execute(ALCCaptureTest.java:92)
   at org.lwjgl.test.openal.ALCCaptureTest.main(ALCCaptureTest.java:151)
Do you know how to fix this error? What I should do?
Sorry for mistakes in English. I do not speak English very well.

roadkillguy

That kind of error is caused when you try to call a function or access data from a null pointer (a class that is null).  It's 100% code specific, so we'll need to see some code.

The following code would throw a java.lang.NullPointerException:

QuoteClass myclass = null;

myclass.doSomething();

Matzon

confirmin... something with spasis utf8 changes is breaking alc, which is encoding the return string

Matzon

right, so the generator doesn't like passing in NULL to MemoryUtil.getAddress(buffer) :) need to do a 'long address = buffer == null ? 0 : MemoryUtil.getAddress(buffer);' thingy ...
Unless someone looks into this soon - I wont be able to until tonight.

Matzon

fixed in nightly - not a generator issue, just the utf8 changes