5

I have a JavaFx application and I try to run a TestFX junit in headless mode. (in normal mode is working). In Gradle I configured the openjfx-monocle:

compile group: 'org.testfx', name: 'openjfx-monocle', version: '8u76-b04'

As arguments when I start the junit I use the following:

-Djava.awt.headless=true -Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw -Dprism.text=t2k  -Dtestfx.setup.timeout=2500 -Dheadless.geometry=1920x1080-64

My OS is Windows 7 Proffesional 64-bit, jdk is "1.8.0_152".

I tried to change the argument -Dheadless.geometry but no results. Any idea?

The error received is:

java.nio.BufferOverflowException
at java.nio.DirectIntBufferU.put(DirectIntBufferU.java:363)
at com.sun.javafx.tk.quantum.UploadingPainter.run(UploadingPainter.java:153) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
at java.lang.Thread.run(Thread.java:748)`
Michael
  • 3,093
  • 7
  • 39
  • 83
Trica
  • 53
  • 6
  • According to https://github.com/TestFX/Monocle/issues/56 "The default headless screen size is 1280x800. If you set larger dimensions, then the BufferOverflowException can appear. That is what happened to me. So I did set the same dimensions for stage as the ones that are set for the headless screen size." – Eric Duminil Nov 04 '20 at 14:15

0 Answers0