Issue
Am currently trying to deploy my JavaFX application which runs smoothly on windows, on my Raspberry Model B+ v1.2. Since JavaFX is not directly available on the Raspi I've performed the adaptions with Gluon as described here (however with the newest version 144): Running Javafx GUI on the Raspberry Pi
Now when I run my JFX application which is just going to show a simple window, I get the following error stack about problem with shaders (Error loading stock shader AlphaTexture_Color):
Program link log: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFactory.java:313) at com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:257) at com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:478) at com.sun.prism.impl.ps.BaseShaderGraphics.fillPrimRect(BaseShaderGraphics.java:1106) at com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(BaseShaderGraphics.java:1502) at com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectanglesDirectly(NGRegion.java:1108) at com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectangle(NGRegion.java:848) at com.sun.javafx.sg.prism.NGRegion.renderAsRectangle(NGRegion.java:751) at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:572) at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2056) at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1948) at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:477) at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:330) 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: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)
Caused by: java.lang.RuntimeException: Error creating shader program at com.sun.prism.es2.ES2Shader.createFromSource(ES2Shader.java:158) at com.sun.prism.es2.ES2Shader.createFromSource(ES2Shader.java:173) at com.sun.prism.es2.ES2ResourceFactory.createShader(ES2ResourceFactory.java:225) at com.sun.prism.shader.AlphaTexture_Color_Loader.loadShader(AlphaTexture_Color_Loader.java:47) ... 25 more
java.lang.InternalError: Error loading stock shader AlphaTexture_Color at com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFactory.java:316) at com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:257) at com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:478) at com.sun.prism.impl.ps.BaseShaderGraphics.fillPrimRect(BaseShaderGraphics.java:1106) at com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(BaseShaderGraphics.java:1502) at com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectanglesDirectly(NGRegion.java:1108) at com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectangle(NGRegion.java:848) at com.sun.javafx.sg.prism.NGRegion.renderAsRectangle(NGRegion.java:751) at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:572) at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2056) at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1948) at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:477) at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:330) 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: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)
Could it be that my raspberry is too old and doesn't support certain shaders in hardware? What else could I try?
Huge thanks in advance!
Solution
Hmpf, quite a coincidence that I found that out at all.. the issue was the VRAM! It has to be increased from 64mb to 128 or 256 on the raspberry to work. That can be done through raspi_config or the visual configuration interface.
Answered By - DragonGamer