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

SMT on Windows 8 - init exception #169

Open amyro opened 10 years ago

amyro commented 10 years ago

Hello,

i try to implement a multitouch app on a windows 8 computer with processing and java. I played around with the Simple Multi-Touch Toolkit (SMT) which seems like a good library :). Unfortunately i don't get the windows touch backend working. It crashes already at the init method: SMT.init(this, TouchSource.WM_TOUCH); It says "TuioClient: failed to connect to port 3333" followed by a NullPointerException Caused by: java.lang.NullPointerException at vialab.SMT.SMT.runWinTouchTuioServer(SMT.java:1236)

Processing is working fine. I added the SMT, TUIO, slf4j and jbox2d jar files to my project and installed the Visual C++ Redistributables like mentioned on the website. TouchSource.MOUSE is the only touch source my test application is working for.

Can you tell me what i'm missing or what could be the reason for this? Sorry btw if this issue-website wasn't the right place to ask this question. I couldn't find a SMT-specific forum or something like that. Thanks a lot for you help!

kiwistrongis commented 10 years ago

Hi, here's fine, but there's also smt's subreddit, if you're into that sort of thing.

I don't have windows 8, but there's another issue ( #170 ) about WM_TOUCH that might be related. I'm looking into it now. In the meantime, if you could post the stack trace, that'd be nice. :)

kiwistrongis commented 10 years ago

So I couldn't reproduce the other issue. I don't have windows 8 easily available right now, but I'll look into getting a virtual machine or something set up. The code that handles touch source setup has been redone, however. Maybe I've unknowingly fixed it? What kinda touch monitor are you using?

amyro commented 10 years ago

Hey thanks for your quick reply. I work with the acer aspire r7 you can check the specs here http://us.acer.com/ac/en/US/content/model-datasheet/NX.M9UAA.002

I'm at home already so i can't check your update or send the stack trace but i will do this tomorrow!

amyro commented 10 years ago

Hello again, i tried to test your code update from yesterday but somehow i can't manage to create the SMT.jar file. If i start the makefile i get the following error: javac -cp src:bin:lib/:lib/processing/ -d bin -source 1.6 -target 1.6 -Xlint:-deprecation -Xlint:-options src/vialab/SMT/Zone.java src\vialab\SMT\Zone.java:43: error: package org.jbox2d.collision.shapes does not exist import org.jbox2d.collision.shapes.PolygonShape; I tried to import the whole source to my project but that didn't work either.

As i've seen in the other issue thread it seams to work on Windows 8 in general so there must be another problem with my computer somehow. Anyways here is the complete stack trace for my problem:

Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException at vialab.SMT.SMT.runWinTouchTuioServer(SMT.java:1236) at vialab.SMT.SMT.init(SMT.java:338) at vialab.SMT.SMT.init(SMT.java:224) at Sandbox.setup(Sandbox.java:19) at processing.core.PApplet.handleDraw(PApplet.java:2281) at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:799) at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:588) at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:572) at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1034) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:909) at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065) at javax.media.opengl.Threading.invoke(Threading.java:193) at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483) at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:537) 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) Already called beginDraw() TuioClient: failed to connect to port 3333 Exception in thread "Animation Thread" java.lang.RuntimeException: java.lang.NullPointerException at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58) at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:100) at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:205) at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172) at javax.media.opengl.Threading.invoke(Threading.java:191) at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483) at processing.opengl.PJOGL.requestDraw(PJOGL.java:626) at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1598) at processing.core.PApplet.run(PApplet.java:2177) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at vialab.SMT.SMT.runWinTouchTuioServer(SMT.java:1236) at vialab.SMT.SMT.init(SMT.java:338) at vialab.SMT.SMT.init(SMT.java:224) at Sandbox.setup(Sandbox.java:19) at processing.core.PApplet.handleDraw(PApplet.java:2281) at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:799) at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:588) at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:572) at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1034) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:909) at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065) at java.awt.event.InvocationEvent.dispatch(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.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)

Thanks a lot for your effort!

kiwistrongis commented 10 years ago

Okay, so there's two problems with you compiling yourself:

So I could help you get around these problems, or you could just use this build i just made. I don't think this'll fix the problem, though, and it is a pre-release build, so don't rely too much on it.

Now, back to the problem: I think I remember getting this before when using a different touch monitor (an acer model). I'll try it on that later today, then get back to you.

amyro commented 10 years ago

dependancy jars are all there but maybe not found because of the classpath thing. I just tried your build and it didn't fix the problem..

kiwistrongis commented 10 years ago

Well I tried it on my acer touch monitor on win7, and it was working just fine... I'm working on getting a windows 8 vm set up so I can the monitor with it. Have you made sure you have the latest drivers and the like?

kiwistrongis commented 10 years ago

By the way, this doesn't look like a driver issue, but it's really hard for me to nail down where the NullPointerException came from without being able to reproduce it.

amyro commented 10 years ago

Dirvers are all up to date... if there is anything i can do to help just tell me. Atm i have no idea where to start searching for the problem

kiwistrongis commented 10 years ago

Okay, so I'm a bit stumped myself atm. It feels like the required resources are not being extracted from the jar properly, somehow translating into a NullPointerException. Is there any chance you're somewhere in Toronto? It'd be a lot easier for me to figure out what's going on if I could actually work on the machine that's causing this. I live in Toronto, so the trip wouldn't be a big deal. No guarantees I can do this, though. I have to check with my bosses first though, lol. I think they'd be concerned about me spending to much time on this. I'll ask them at our meeting today. By the way, can I ask how you heard of SMT?

amyro commented 10 years ago

Hehe sorry to disappoint you but i'm from Germany... Little too far to drop by. Is there a way to include the library as a source folder to my project? This way it might be easier to find where the error occurs? I'm working with processing and so looked for a multitouch library on their website. Thats how i heard from SMT ;)

kiwistrongis commented 10 years ago

Aha, I'm from Germany too... but just born there. So much for that idea. Are you using processing with eclipse/java?

I'm thinking that I'm gonna make a bunch of changes to the code to make more debug statements. Are you okay with me sending you a bunch of builds to try?

amyro commented 10 years ago

Yes i'm using processing with eclipse/java and yes i'm ok with you sending me some builds to try. I'll send you my e-mail adress. I guess that's better from here on..

kiwistrongis commented 10 years ago

Alrighty, email vialab.smt@gmail.com. I'll respond with my personal email.