NullPointerExceptions when updating images
Kirill.Prazdnikov at oracle.com
Wed Dec 21 08:07:51 PST 2011
I tried to reproduce it,
I commented out "new char[400M]" and after that,
the test runs up to 125000 iterations without any issues
I see another issue: the test continues to run even after window closed.
How much does it takes to get NPE with default memory settings (and
without new 400M) ?
BTW: for performance issues i recommend you working with TYPE_INT_ARGB
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.
> NullPointerException seen in rendering loop. This stops the screen
> updating after running for a minute or so.
> (in javafx 2.0.1)
> (in javafx 2.0.2)
> at com.sun.prism.impl.BaseGraphics.drawTextureVO(BaseGraphics.java:365)
> ...See attachments for full trace.
> - 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