Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RuntimeException in javafx

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am using javafx with TouchEvents (on a windows 8 tablet),

There seems to be a bug, in the java code relating to too many touch points.
It makes my application unusable once it happens, as any further touches on the screen make the same exception show up in the output, it is shown below:

Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: Too many touch points reported
at javafx.scene.Scene$ScenePeerListener.touchEventNext(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleNextTouchEvent$346(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$174/32038969.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleNextTouchEvent(Unknown Source)
at com.sun.glass.ui.View.handleNextTouchEvent(Unknown Source)
at com.sun.glass.ui.View.notifyNextTouchEvent(Unknown Source)
at com.sun.glass.ui.TouchInputSupport.notifyNextTouchEvent(Unknown Source)
at com.sun.glass.ui.win.WinGestureSupport.notifyNextTouchEvent(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$37/29531133.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at javafx.scene.Scene.processTouchEvent(Unknown Source)
at javafx.scene.Scene.access$5600(Unknown Source)
at javafx.scene.Scene$ScenePeerListener.touchEventEnd(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleEndTouchEvent$347(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$175/12964464.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleEndTouchEvent(Unknown Source)
at com.sun.glass.ui.View.handleEndTouchEvent(Unknown Source)
at com.sun.glass.ui.View.notifyEndTouchEvent(Unknown Source)
at com.sun.glass.ui.TouchInputSupport.notifyEndTouchEvent(Unknown Source)
at com.sun.glass.ui.win.WinGestureSupport.notifyEndTouchEvent(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$37/29531133.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I coded my application to work when exactly 2 touch points where applied, but it doesn't stop the exception above occurring.
Is there anything I can do, as its a shame to remove this touch ability from the app, thanks.
 
Darryl Burke
Bartender
Posts: 5149
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently this is/was a reported bug: https://community.oracle.com/thread/2604792

Are you using the latest update of JavaFX? It's possible that the bug may have been fixed.
 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks...

I already read that post, I only a few days ago installed the latest java8 jdk on my tablet, so I guess it hasn't been fixed.

I tried to catch the exception inside the touch listeners I implemented, but I guess it doesn't quite work that way.
 
Darryl Burke
Bartender
Posts: 5149
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see. The exception is thrown from ScenePeerListener.touchEventNext by these lines:Sorry, I can't see how you could handle the exception.

I'm moving this thread to the FX section where you may have more luck.
 
John Damien Smith
Ranch Hand
Posts: 299
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A related bug report: RT-34602 Touch event processing irreversibly damaged by user exception, is currently scheduled for implementation for Java 9.

Though, another related bug report RT-35570 [Touch] JVM irreversible state, Too many touch-points was closed for Java8u20 - so I guess at least some of the causes for this error have been fixed in recent JavaFX versions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic