I have the same problem. Is way to close SimpleOpenNI context and intialize it again in another PApplet, but in the same application?
My programs starts and I have to options to pick from: record or play. Both of them are PApplets. This one which I choose as first always run without problem, but when I try to pick another(after disposing first JFrame and destroy PApplet) I have error:
Exception in thread "Animation Thread" java.lang.NullPointerException
at menu_processing.RecordSketchKinect.setup(RecordSketchKinect.java:52)
at processing.core.PApplet.handleDraw(PApplet.java:2361)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:240)
at processing.core.PApplet.run(PApplet.java:2256)
at java.lang.Thread.run(Unknown Source)
Anyone can help?
Thanks in advance