We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm getting a no such method error when trying to run simple open ni in processing 3.0a9. This happens when I call
context = new SimpleOpenNI(this);
I assume this is because PApplet has been jettisoned? Putting opengl as my renderer gave me a bit more verbose information. Not sure exactly where to file this issue, since the simpleopenni google code page is no longer active.
java.lang.RuntimeException: java.lang.NoSuchMethodError: processing.core.PApplet.registerDispose(Ljava/lang/Object;)V
at processing.opengl.PSurfaceJOGL$2.run(PSurfaceJOGL.java:312)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: processing.core.PApplet.registerDispose(Ljava/lang/Object;)V
at SimpleOpenNI.SimpleOpenNI.initEnv(SimpleOpenNI.java:383)
at SimpleOpenNI.SimpleOpenNI.<init>(SimpleOpenNI.java:255)
at kinectExample.setup(kinectExample.java:25)
at processing.core.PApplet.handleDraw(PApplet.java:1958)
at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:566)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:691)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:673)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:442)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1277)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1131)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:680)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:77)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:451)
at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Answers
Sorry I cannot answer, and apologises for somewhat hijacking your thread, but this is a similar error to one I have been getting with a completely project. I am wondering of this has anything to do with a Java update? Or a Processing update? Is it an OpenGL issue? - there are plenty of jogamp.opengl errors in there. Anyone have ANY insight into this?
void
anymore! \m/void
won't work anymore for P3! :-SThanks @GoToLoop - and would this be a straightforward process by any chance?
Most probably you're gonna need to request the library's author to recompile his/her library for Processing 3. I don't have any experience in compiling libraries on my own. X_X
@GoToLoop - I will see if I can find the author(s). The library is no longer supported, but is still a great tool. I guess your original answer applied to the original question by @aferriss - recompile the library.
I'm afraid it's not enough:
NoSuchMethodError: processing.core.PApplet.registerDispose(Ljava/lang/Object;)V
registerDispose() was deprecated in Processing 2 and finally removed in Processing 3! 8-|
registerDispose() & other similar methods were superseded by registerMethod().
In short, besides recompilation, that library's source code needs to replace such methods for the most updated registerMethod(). 3:-O
How hard would it be to take the SimpleOpenNI source and recompile for Processing 3.0 on your own?
It looks like they have the source available: https://code.google.com/p/simple-openni/source/checkout
I am admittedly a noob but would this be as simple as opening the source in Xcode or Eclipse and compiling for Processing 3.0? Or maybe JavaScript?
Pardon my ignorance if I am being so :)
I have compiled SimpleOpenNI against openNI2 on OSX and it is working with Processing 3.
From the source alexdw5 suggests I needed to change a couple of things.
1) replace parent.registerDispose(this) with parent.registerMethod("dispose", this) everywhere in trunk/SimpleOpenNI-2.0/src/p5_src/SimpleOpenNI.java
2) strip all comments (lines starting with # that are not compiler directives like #include) from trunk/SimpleOpenNI-2.0/src/SimpleOpenNIMain.i
3) modify trunk/SimpleOpenNI-2.0/buildOsx.sh to point to the right libraries, includes and architectures. Relevant chunks (which you'd have to tailor for yourself) are:
... and commenting out doc copy (because I disable build of the doc in the next part)
4) hack CMakeLists.txt a bit to and avoid some errors in javadoc creation. The end of trunk/SimpleOpenNI-2.0/CMakeLists.txt now looks like this:
I hope this helps somebody, let me know any questions ;)
I do not have a src folder in SimpleOpenNI. I am using processing 3 and Mac OS Sierra.
SimpleOpenNI Repository
I updated the SimpleOpenNi and I can use it with Processing 3, also with Processing 2
https://github.com/totovr/SimpleOpenni