NullPointerExceptions when updating images
adam at adamish.com
Wed Dec 21 07:25:35 PST 2011
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)
...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
- 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