B4J Question How my greatmother can kill B4J on a PI ?

CR95

Active Member
Licensed User
After several investigations, I summmarize the issue as follows :
In a B4J UI program, I create a B4XImageView and I load it with "Load(File.DirAssets, "1984 06 GreatMother.JPG").
Under Windows, It works well.
Under Raspberry, the "LoadFile...." line kills the job with :
B4X:
java.lang.NullPointerException: Cannot invoke "com.sun.prism.sw.SWArgbPreTexture.getDataNoClone()" because "swTex" is null
    at javafx.graphics/com.sun.prism.sw.SWGraphics.drawTexture(SWGraphics.java:717)
    at javafx.graphics/com.sun.prism.sw.SWGraphics.drawTexture(SWGraphics.java:696)
    at javafx.graphics/com.sun.prism.sw.SWGraphics.drawTexture(SWGraphics.java:679)
    at javafx.graphics/com.sun.javafx.sg.prism.NGImageView.renderContent(NGImageView.java:123)
    at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
    at javafx.graphics/com.sun.javafx.sg.prism.NGImageView.doRender(NGImageView.java:103)
    at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
    at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
    at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:579)
    at javafx.graphics/com.sun.javafx.sg.prism.NGNode.renderForClip(NGNode.java:2313)
    at javafx.graphics/com.sun.javafx.sg.prism.NGNode.renderRectClip(NGNode.java:2207)
    at javafx.graphics/com.sun.javafx.sg.prism.NGNode.renderClip(NGNode.java:2233)
    at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2066)
    at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
    at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
    at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:579)
    at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
    at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
    at javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:480)
    at javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:321)
    at javafx.graphics/com.sun.javafx.tk.quantum.UploadingPainter.run(UploadingPainter.java:143)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    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:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)
    at java.base/java.lang.Thread.run(Thread.java:840)

I guess this is coming either from a bad installation of Java (I am using Liberica Full Java 17 version under Dietpi), either form a corrupted JPEG file.
Any idea ?

If it is a corrupted file (But my Greatmother image is correctly showed with other packages like Picture Manager or Paint....), is there a way to detect it ?

I cannot join MyGreatMother picture (too large) !
 

Sandman

Expert
Licensed User
Longtime User
I have a vague memory that dirasset files are made to have lower case names when compiling. For Windows this wouldn't matter, but Linux considers lower case different from upper case. So take a look inside your compiled jar and see what the case is, and make sure you adjust the code to request the correct name.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Liberica Full Java 17 version - under Linux and under Windows also Liberica?
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
@CR95
There is a use to prepare for you an small app example to test by forum team under Linux variants...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…