Monocle Headless BufferOverflowException (Issue + Fix)

John Neffenger john at status6.com
Mon Apr 16 17:46:42 UTC 2018


On 02/23/2018 02:29 PM, Michael Ennen wrote:
> When doing some testing with TestFX running in headless mode
> via Monocle I came across a BufferOverflowException.

One thing to check: make sure your JavaFX Scene is not exceeding the 
screen size of the Monocle Headless platform, which is 1280 × 800 px. 
Otherwise, you'll get a BufferOverflowException like the following, 
where I exceeded the height by one pixel:

Starting application on Headless platform (1280 × 801 px) ...
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)

The maximum screen sizes for some Monocle platforms are:

   Linux:    The framebuffer size
   Headless: 1280 × 800 px
   VNC:      1024 × 600 px

You can use the "fbset" command to find or change the Linux framebuffer 
size:

$ sudo fbset

mode "1024x768-76"
     # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
     geometry 1024 768 1024 768 32
     timings 12714 128 32 16 4 128 4
     rgba 8/16,8/8,8/0,8/24
endmode

John


More information about the openjfx-dev mailing list