Unable to allocate direct buffer memory
Kevin Rushforth
kevin.rushforth at oracle.com
Thu May 7 20:44:41 UTC 2020
This suggests that there might be a memory leak (possibly in uploading
painter which I see you are using). Is this easily reproducible?
As for the other exception:
> java.lang.RuntimeException: Requested texture dimensions (32767x1137)
> require dimensions (0x1137) that exceed maximum texture size (16384)
Are you really trying to draw into a texture that big? If not, then
either the error message is printing the wrong sizes (which is quite
possible) or else something is causing a larger than expected size to be
used.
-- Kevin
On 5/7/2020 11:51 AM, Ty Young wrote:
>
> On 5/6/20 12:39 PM, Ty Young wrote:
>> After hours of running my JavaFX application I start getting this
>> error spammed in console:
>>
>>
>> java.lang.OutOfMemoryError: Cannot reserve 149024316 bytes of direct
>> buffer memory (allocated: 149066725, limit: 209715200)
>> at java.base/java.nio.Bits.reserveMemory(Bits.java:178)
>> at
>> java.base/java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:120)
>> at java.base/java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:329)
>> at
>> javafx.graphics/com.sun.prism.impl.BufferUtil.newByteBuffer(BufferUtil.java:90)
>> at
>> javafx.graphics/com.sun.prism.impl.BufferUtil.newIntBuffer(BufferUtil.java:121)
>> at
>> javafx.graphics/com.sun.prism.impl.QueuedPixelSource.getUnusedPixels(QueuedPixelSource.java:155)
>> at
>> javafx.graphics/com.sun.javafx.tk.quantum.UploadingPainter.run(UploadingPainter.java:156)
>> at
>> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>> at
>> java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
>> at
>> javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
>> at
>> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
>> at
>> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
>> at
>> javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
>> at java.base/java.lang.Thread.run(Thread.java:832)
>>
>>
>> Ironically every single error is about allocating the exact same
>> amount of bytes.
>
>
> Anything on this? I'm also getting:
>
>
> java.lang.RuntimeException: Requested texture dimensions (32767x1137)
> require dimensions (0x1137) that exceed maximum texture size (16384)
> at
> javafx.graphics/com.sun.prism.es2.ES2RTTexture.create(ES2RTTexture.java:220)
> at
> javafx.graphics/com.sun.prism.es2.ES2ResourceFactory.createRTTexture(ES2ResourceFactory.java:165)
> at
> javafx.graphics/com.sun.javafx.tk.quantum.UploadingPainter.run(UploadingPainter.java:124)
> at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at
> java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
> at javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
> at
> javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
> at java.base/java.lang.Thread.run(Thread.java:832)
>
>
> spammed alternatively.
>
More information about the openjfx-dev
mailing list