Exception in thread "Animation Thread" java.lang.NullPointerException

edited August 2016 in Kinect

Hello everyone, I'm trying to get some code working on a Raspberry Pi using the freenect libraries and a Kinect V1 (from an Xbox 360). I'm trying to get the example programs in OpenKinect-for-Processing working. They all die though with something like this. I have a freshly compiled version of freenect (libfreenect v0.5.3 Voyager) on the Pi and Processing 3.2 (3.1.2 has the exact same problems though). The freenect libraries work fine though. All the test programs like freenect-glview work fine so this is some problem getting Processing to work with the freenect libs. I'm doing this work for pay for a client (I have my own business as a Pi and Arduino consultant) so at this point I just need to get something working. I'm considering junking freenect and trying to get OpenNi working but I understand that stuff is more complex and could be even more time-consuming to get working. Any one have any ideas? Here's the debug output for RGBDepthTest.pde. All the other example programs die the same way:

Edit: forgot to add yesterday that all this happens on attempting:

kinect = new Kinect(this);

for all the test programs. It's not even getting as far as trying kinect.initDevice(); When I use the debugger I can see that any code up to this point is working fine. Processing just doesn't seem to want to create a kinect object. After that we see the Animation Thread exception...

Aug 19, 2016 9:54:10 PM processing.mode.java.debug.LineBreakpoint attach WARNING: no location found for line RGBDepthTest.pde:19 -> RGBDepthTest.java:38 32 linux Found path: /home/pi/sketchbook/libraries/openkinect_processing/library/v1/linux/ Loaded freenect from /home/pi/kinect/processing-3.2/libfreenect.so Exception in thread "Animation Thread" java.lang.NullPointerException at org.openkinect.freenect.Freenect.createContext(Unknown Source) at org.openkinect.processing.Kinect.<init>(Unknown Source) at RGBDepthTest.setup(RGBDepthTest.java:39) at processing.core.PApplet.handleDraw(PApplet.java:2384) at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1540) at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316) Aug 19, 2016 9:55:46 PM processing.mode.java.Debugger log INFO: closing runtime Aug 19, 2016 9:55:46 PM processing.mode.java.Debugger log INFO: *** VM Event: VMDisconnectEvent: 0 Aug 19, 2016 9:55:46 PM processing.mode.java.Debugger$VMEventReader run INFO: VMEventReader quit on VM disconnect

Sign In or Register to comment.