Debugging a UI refresh problem (not dirtyopts related it seems)
hjohn at xs4all.nl
Tue Jun 12 21:16:48 PDT 2012
I'm having a problem that started when I upgraded from JavaFX 2.1 to
2.2b11 -- I want to submit a bug report for it, but having trouble
reproducing it outside my main code.
Basically, what is happening is that during navigation between different
parts of the application, sometimes the screen is not being redrawn
properly (for some background info, the screen in my app consists of a
screen filling background picture, with on top of this a big list with
Basically, what I'm seeing is this:
Step 1: StackPane with 2 children (background picture, and overlaid on
top of that a List with names)
Step 2: StackPane with same background picture, but no controls over
laid... (the background picture is doing a 5 second fade out/in
animation because every screen has its own picture, so redrawing is
happening a lot)
Now, if I press cursor up/down, then the list suddenly appears, which
makes me think it is a redraw issue (this also means that the control
had focus, but is not drawn).
In between the two steps a lot of code happens in my app, but the
crucial part is that at some point the old List is removed (from step 1)
and then replaced (in the same StackPane) with a new, different, List.
No exceptions or anything else out of the ordinary happens, the new
child is simply not drawn (or perhaps sized incorrectly, rendering it
invisible -- or perhaps drawn in the wrong order appearing behind the BG
picture (although it is the last child in the StackPane)). As said,
moving the cursor makes it appear -- and it did work with JavaFX 2.1.
Note that my Lists donot have any kind of "hover" highlighting effects
or any other animations (unlike the standard JavaFX lists), so there's a
good chance that if JavaFX did not decide to draw my List the first time
when it was added to the StackPane that nothing will trigger it to be
drawn until the cursor up/down happens...
Any ideas on how to best debug this?
I've already tried setting dirtyopts to false... anything else I can
try? It is fairly easy to reproduce in my app.
More information about the openjfx-dev