vialab / SMT

Simple Multi-Touch (SMT) Toolkit
http://vialab.science.uoit.ca/smt
GNU General Public License v3.0
43 stars 18 forks source link

Exported sketches do not run #185

Open kosowski opened 10 years ago

kosowski commented 10 years ago

Exporting any of the example sketches result in an exe file that hungs upon launch, leaving a blank screen. Same result wether java is embedded or not.

I'm running windows 8 64 bits on a multitouch all-in-one and Processing 2.1.1 32 bits.

This could be a hint: When importing any example and libs into Eclipse, I always get the following error:

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: processing/app/Base at vialab.SMT.SMT.checkProcessingVersion(SMT.java:467) at vialab.SMT.SMT.init(SMT.java:198) at vialab.SMT.SMT.init(SMT.java:179) at TouchObject.setup(TouchObject.java:31) at processing.core.PApplet.handleDraw(PApplet.java:2281) at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862) at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:652) at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:636) at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1284) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1106) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:981) at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1295) at javax.media.opengl.Threading.invoke(Threading.java:193) at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541) at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:595) at sun.awt.RepaintArea.paintComponent(Unknown Source) at sun.awt.RepaintArea.paint(Unknown Source) at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: processing.app.Base at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)

kiwistrongis commented 10 years ago

See issue #186 for the probable cause for the NoClassDefFoundError issue. Importing pde.jar will fix it. pde.jar should just be at lib/pde.jar in your processing install.

Regarding the first issue, I'm fairly sure it's caused by #186, but not 100% sure. I'm working on other things right now, but I'll check it out in the next week or two.

kosowski commented 10 years ago

Thanks, that fixed the issue.

In the meantime I bypassed the version control method and found a new error when it tries to load the TouchHook.dll. The file was in the temp folder where it was being found (C:\User\xxx\AppData....) but still had a socket exception when trying to read it. Puting the dll and exe form Touch2Tuio in the project folder fixed that, the library started succesfully but received no touch event.

Going back to the compiled library and including the pde.jar made it work nicely in Eclipse. Thanks.

kiwistrongis commented 10 years ago

I haven't done any work on the Touch2Tuio stuff. If you're not using windows native touch, you can disable ( remove it from the touch sources list in SMT.init() ) to avoid the error.

kosowski commented 10 years ago

Unfortunately I'm using windows native touch events. Anyway, I think these problems are my fault for not being able to setup the project incluiding SMT's source correctly.

kiwistrongis commented 10 years ago

Not completely true. Ideally the project should compile okay immediately after cloning, and exported sketches should work immediately with any of our examples, immediately after installing form the processing library install menu. If that's not the case, it's not your fault.