Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on resize #1

Open
nooone opened this issue Jul 4, 2014 · 6 comments
Open

Exception on resize #1

nooone opened this issue Jul 4, 2014 · 6 comments

Comments

@nooone
Copy link

nooone commented Jul 4, 2014

First of all thanks for publishing this! It really worked out of the box, but there seem to be a few bugs and unfortunately I have no clue how to solve those.

When resizing the window, I get the following error:

java.lang.IllegalArgumentException: Upload requires 1251840 elements, but only 743280 elements remain in the buffer
at com.sun.prism.impl.BaseTexture.checkUpdateParams(Unknown Source)
at com.sun.prism.d3d.D3DTexture.update(Unknown Source)
at com.sun.prism.impl.BaseTexture.update(Unknown Source)
at com.sun.prism.impl.BaseResourceFactory.getCachedTexture(Unknown Source)
at com.sun.javafx.sg.prism.NGImageView.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGImageView.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.renderForClip(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.renderRectClip(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.renderClip(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.renderForClip(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.renderRectClip(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.renderClip(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.tk.quantum.ViewPainter.doPaint(Unknown Source)
at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(Unknown Source)
at com.sun.javafx.tk.quantum.PresentingPainter.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at com.sun.javafx.tk.RenderJob.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

The ImageView backed by libgdx still works after that, but most of the times, it breaks the rest of the UI. Any ideas?

@Trixt0r
Copy link
Owner

Trixt0r commented Jul 4, 2014

Hmmm... I guess this depends on the graphics card, you are using.
I only tested it with an AMD Radeon HD 6850. Which are you using?

@nooone
Copy link
Author

nooone commented Jul 4, 2014

I'm using a nVidia GeForce GT 540M.

@macbury
Copy link

macbury commented Nov 4, 2014

+1 i have GeForce GTX 660M

@kerberjg
Copy link

kerberjg commented Jun 9, 2016

Sorry to bump such an old issue, but I'm having it as well on my Macbook Pro 13" (Retina, Late 2014) on my Intel Iris Pro graphics card.

It seems to be an issue caused by the underlying libraries, check out this issue for more information: Spasi/LWJGL-FX#8

@kerberjg
Copy link

kerberjg commented Jun 9, 2016

As far as I understand, this problem is being caused by JavaFX not being able to keep up with very high rendering rates which can happen when you either don't lock your framerate in your GDX app or while resizing the window, which causes it to re-render.

@reverofevil
Copy link

reverofevil commented Jun 5, 2017

Same problem on GTX 950M, Windows 8.1 when resizing:

java.lang.IllegalArgumentException: Upload requires 2421096 elements, but only 657540 elements remain in the buffer
	at com.sun.prism.impl.BaseTexture.checkUpdateParams(BaseTexture.java:385)
	at com.sun.prism.d3d.D3DTexture.update(D3DTexture.java:138)
	at com.sun.prism.impl.BaseTexture.update(BaseTexture.java:321)
	at com.sun.prism.impl.BaseResourceFactory.createTexture(BaseResourceFactory.java:247)
	at com.sun.prism.impl.BaseResourceFactory.getCachedTexture(BaseResourceFactory.java:218)
	at com.sun.prism.impl.BaseResourceFactory.getCachedTexture(BaseResourceFactory.java:152)
	at com.sun.javafx.sg.prism.NGImageView.renderContent(NGImageView.java:121)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
	at com.sun.javafx.sg.prism.NGImageView.doRender(NGImageView.java:103)
	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:576)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:576)
	at com.sun.javafx.sg.prism.NGNode.renderForClip(NGNode.java:2294)
	at com.sun.javafx.sg.prism.NGNode.renderRectClip(NGNode.java:2188)
	at com.sun.javafx.sg.prism.NGNode.renderClip(NGNode.java:2214)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2047)
	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:576)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:576)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
	at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:477)
	at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:323)
	at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:91)
	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:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
	at java.lang.Thread.run(Thread.java:745)

Search came to this issue where this bug is said to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants