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

NullPointerException when calling SMT.init( this, TouchSource.TUIO_DEVICE); #225

Open damanzano opened 9 years ago

damanzano commented 9 years ago

I'm using SMT in eclipse with all the processing libraries included. In my PApplet setup method i'm getting a NullPointerException when i try to initialize the SMT.

public void setup() { size(displayWidth, displayHeight, SMT.RENDERER); SMT.init( this, TouchSource.TUIO_DEVICE); }

Here is the full execption stack: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at vialab.SMT.util.SystemAdapter.connect(SystemAdapter.java:70) at vialab.SMT.util.SystemAdapter.(SystemAdapter.java:58) at vialab.SMT.SMT.init(SMT.java:232) at vialab.SMT.SMT.init(SMT.java:197) at Bus_Route_Simulator_v1_4.setup(Bus_Route_Simulator_v1_4.java:50) at processing.core.PApplet.handleDraw(PApplet.java:2281) at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:799) at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665) at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649) at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994) at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300) 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(RepaintArea.java:276) at sun.awt.RepaintArea.paint(RepaintArea.java:241) at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263) at java.awt.Component.dispatchEventImpl(Component.java:4852) at java.awt.Component.dispatchEvent(Component.java:4604) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:676) at java.awt.EventQueue$2.run(EventQueue.java:674) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97) at java.awt.EventQueue$3.run(EventQueue.java:690) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) at java.awt.EventQueue.dispatchEvent(EventQueue.java:687) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Already called beginDraw()

kiwistrongis commented 9 years ago

Hi there :).

I'm guessing that you're using the Processing 3.0 prereleases, right? If so, I'm sorry, but we simply don't support Processing 3.0 yet. The main problem at the moment is Processing's move away from java.awt. However, since Processing 3.0's first beta was just released yesterday ( August 6th ), we'll definitely be looking at updating for compatibility soon. In the meantime, the latest Processing release we support is 2.2.1.

damanzano commented 9 years ago

Hi thanks for your answer, i'm not using Processing 3.0 yet. I got thar error using Processing 2.2.1 as a library from an eclipse project