On 5/7/20 3:44 PM, Kevin Rushforth wrote:
This suggests that there might be a memory leak (possibly in uploading painter which I see you are using). Is this easily reproducible?


Easily? No. I seem to get either(AKA never both) only after hours of having the application running. Nothing seems to break either, making it very strange. I don't remember getting these exceptions in JavaFX 13, just warnings about texture size(which I think others have reported here too).


Although, I should say, I'm using Project Panama's Foreign Memory Access builds and those can corrupt memory if used incorrectly. That said, given that the texture size issue was reported here before in JavaFX 13 and before IIRC, I'm not so sure that is the issue.



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.


Uh, I use Integer.MAX_VALUE for prefered width/height, not Short.MAX_VALUE. I don't know where 32767(Short.MAX_VALUE) is coming from, I never explicitly request those dimensions.


Could the screen being locked and the screen being off have to do with this?



-- 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.


Reply via email to