1

I have developed one JavaFX touchscreen application with screen size 800x480 which runs fine on RPi 3 with the Raspberry Pi 7" Touchscreen Display in the default resolution (800x480). Now I am trying to run it on RPi4 for the same touchscreen (800x480) and encountering the following exception every time I run the JAR file:

Exception in thread "JavaFX Application Thread" java.nio.BufferOverflowException
    at java.nio.DirectIntBufferU.put(DirectIntBufferU.java:331)
    at com.sun.glass.ui.monocle.Framebuffer.composePixels(Framebuffer.java:168)
    at com.sun.glass.ui.monocle.FBDevScreen.uploadPixels(FBDevScreen.java:199)
    at com.sun.glass.ui.monocle.MonocleView._uploadPixels(MonocleView.java:98)
    at com.sun.glass.ui.View.uploadPixels(View.java:771)
    at com.sun.prism.PresentableState.uploadPixels(PresentableState.java:295)
    at com.sun.javafx.tk.quantum.SceneState.access$001(SceneState.java:40)
    at com.sun.javafx.tk.quantum.SceneState.lambda$uploadPixels$0(SceneState.java:123)
    at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:93)
    at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:52)
    at java.lang.Thread.run(Thread.java:748)

What could be the cause?

My setup:

  1. Raspberry Pi 3b (running 2017-07-05-raspbian-jessie)
  2. Raspberry Pi 4b 4GB (running 2019-07-10-raspbian-buster)
  3. Raspberry Pi 7" Touchscreen Display
  4. I'm using jdk 1.8.0_221 (build 1.8.0_221-b11) and the Gluon JavaFX Embedded SDK(8.0.72) on both RPi.
  5. Both RPi boot to the CLI (auto login)
  6. On the RPi4, I'm launching the application using the following command:

    sudo java –Dprism.order=sw -jar AMS.jar

1
  • Please don't post pictures of text. Instead paste the text direct into the question. – Ingo Nov 16 '19 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.