NullPointerExceptions when updating images

Kirill.Prazdnikov kirill.prazdnikov at oracle.com
Mon Dec 26 02:52:46 PST 2011


Hi Adam,

We understand you issue and working on the solution.
Most probably it will be solved in 2.1 release.

Thanks
-Kirill

On 21-Dec-11 19:25, Adam Granger wrote:
> Hi, wondering if anyone can help with this issue I've just raised. Perhaps
> some kind of workaround? Thanks.
>
> http://javafx-jira.kenai.com/browse/RT-18645
>
> NullPointerException seen in rendering loop. This stops the screen
> updating after running for a minute or so.
>
> (in javafx 2.0.1)
> java.lang.NullPointerException
> at
> com.sun.prism.impl.BaseResourceFactory.createTexture(BaseResourceFactory.java:116)
>
> (in javafx 2.0.2)
> java.lang.NullPointerException
> at com.sun.prism.impl.BaseGraphics.drawTextureVO(BaseGraphics.java:365)
>
> ...See attachments for full trace.
>
> Details
> - Code to reproduce problem attached. Note this is a highly simplified
> version of what I'm doing - I know a moving red rectangle can be done more
> easily/robustly in native JavaFX !
> - App was run with following options "-Djavafx.verbose=true
> -Dprism.verbose=true -Xmx1200M"
> - Seems to be memory related - if I allocate a decent chunk of memory
> upfront - say 400M then problem occurs almost instantly.
> - A slightly different exception seen after upgrade to javaFX 2.0.2 =>
> Console outputs for both versions attached.
> - also attached DxDiag.exe output in case direct X related.
>
> Background (why am I doing this!)
> We need to display constantly changing pixel data at around 1280 x 400
> resolution, changing at rates of 4Hz or so.
> This was previously achieved in previous Swing systems using
> JPanel.paintComponent() + a buffered image .
> There is no "nice" way to do this in JavaFX, so updating via
> impl_fromExternalImage() is used.
> If anyone can come up with a more robust way of doing the same thing
> please let me know
>



More information about the openjfx-dev mailing list