Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TuioFX vs Animation #2

Open
AldoSilvaLuna opened this issue Aug 1, 2018 · 2 comments
Open

TuioFX vs Animation #2

AldoSilvaLuna opened this issue Aug 1, 2018 · 2 comments

Comments

@AldoSilvaLuna
Copy link

Hi, first of all thank you for the great work you've done. I've been trying to use TuioFX to make a school project running on xUbuntu 16.04 with Java 8.

I managed to find 2 kinds of bugs.

The problem is that when I touch the screen the console just keeps printing non stop Exception A.
Exception B just occurs a couple of times.

This 2 bugs don't always occur, only when you touch the screen repeatedly multiple times with multiple points. I hope you guys can help me, thank you.

TuioPane.java.zip

/*

    Exception A, present when touching animation

*/

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:344)
at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:506)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
at java.lang.Thread.run(Thread.java:745)

/*

    Exception B, present when drawing

*/

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at testingmultitouch.TuioPane.lambda$start$59(TuioPane.java:74)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.event.Event.fireEvent(Event.java:198)
at org.tuiofx.internal.gesture.GestureRecognizer.fireEvent(GestureRecognizer.java:111)
at org.tuiofx.internal.gesture.GestureRecognizer.lambda$fireTouchEvent$32(GestureRecognizer.java:216)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
at java.lang.Thread.run(Thread.java:745)

@mirkofetter
Copy link
Member

Hey, thanks for reporting an issue. When testing your code, i could not reproduce the exceptions.
I got a white window with a pulsating image and when uncommenting your code, i was able to draw with all fingers. So, it did pretty much what i would expect from your code.

Anyhow, the first exceptionyou reported looks a bit like the JDK bug reported here: https://bugs.openjdk.java.net/browse/JDK-8159048. I would like to ask you to remove all TUIOFX code and check if the exception still appears. It would help to make sure first, if the bug is really related to TUIOFX. Thanks.

@AldoSilvaLuna
Copy link
Author

AldoSilvaLuna commented Sep 4, 2018

I made 5 videos to show how I get the Exceptions described.

On TuioFX BugTest1 I have the pulsating image with TuioFX activated, as soon as I touch the screen I get the Exception A. On TuioFX BugTest2 I did the same but TuioFX was not enabled, I got no errors touching the screen or with mouse events.

TuioFX BugTest1 ---> https://youtu.be/dwSOUWBPVUE
TuioFX BugTest2 ---> https://youtu.be/Cy5KgIZaki0

On TuioFX BugTest3 I commented the animation and used setOnTouchPressed, setOnTouchMoved and setOnTouchReleased to draw lines. When drawing with multiple touch points I get Exception B. On TuioFX BugTest4 I did the same but with TuioFX not enabled and did not get any Exceptions.

TuioFX BugTest3 ---> https://youtu.be/mjOhoCLxCXo
TuioFX BugTest4 ---> https://youtu.be/Fj6xPqmmK-4

On TuioFX BugTest5 I used the animation and the drawing methods and got ExceptionB, sometimes when wating long enough I get ExceptionA.

TuioFX BugTest5 ---> https://youtu.be/rOvUjE4UqxU

I did also verify the link you gave me and I am trying to apply a similar solution. Thank you for your attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants