Debugging a UI refresh problem (not dirtyopts related it seems)
hjohn at xs4all.nl
Thu Jun 14 11:38:05 PDT 2012
The verbose options works, below is the output, dirtyopts seems to be
false (3rd line).
I've noticed that it is definitely related to whether or not any
"animation" action occurs after switching a Child of the StackPane... if
there is any kind of action happening (like an image being loaded, or a
scrollTo command triggering a slight bit of scrolling) then it redraws
properly... and it was hard to reproduce it because of that.
However, I've now noticed that when I go back and forth between the same
screens, and the 2nd time I return to the same view (when all Images are
cached and the UI can react even faster) then the chance of the bug
happening is much much bigger (like 90%). Apparently because no changes
in layout or node values are occuring after the initial one... thus if
the initial drawing was somehow missed, I end up with an empty screen
until I do something that triggers a change. I'm not convinced that it
might not be my fault somehow, but it doesn't occur in 2.1.
So, it seems that under certain conditions, removing a child from a
StackPane and replacing it with a similar child (which is practically
static) results in it not being drawn. I'll see if I can strip it down
far enough to make it reproducable in a stand-alone program in the
weekend -- it is easy enough to reproduce in the main program (not like
my scroll wheel bug :))
0.065 | Prism pipeline init order: d3d
0.066 | Using t2k for text
0.066 | Not using dirty region
0.066 | Prism pipeline name =
0.067 | Loading D3D native library
0.134 | Direct3D initialization
0.136 | (X) Got class = class
0.137 | Initialized prism pipeline:
0.185 | OS
0.185 | Windows 7 build
0.185 | D3D Driver
0.185 | NVIDIA GeForce GTX 550
0.186 | Driver nvd3dum.dll, version
0.186 | Pixel Shader version
0.187 | Device : ven_10DE, dev_1244,
0.220 | javafx.runtime.version:
1.401 | -> RESIZE: 2187154536045615 w: 1440 h:
1.411 | ProgramController.registerService() - registering new
hs.mediasystem.screens.SubtitleDownloadService at 8e4e40 --
1.413 | ProgramController.registerService() - registering new
service: hs.mediasystem.screens.GroupWorker at 2e9f9e --
1.659 *| Database up to date at version
1.663 *| Navigator.navigateTo() - Destination('Home';
1.702 | RESIZE: 2187154837492176 w: 1920 h:
1.915 | new
2.201 | new
On 14/06/2012 20:13, Richard Bair wrote:
> Hi John,
> I'm not sure. If you are confident you are running with dirty opts turned off and you're seeing the problem, then it isn't immediately obvious to me what the issue could be. I believe there is a prism.verbose flag or some such which if you set will repeat out all the settings you are currently using, and then you can check that dirty opts is actually being disabled correctly.
> On Jun 12, 2012, at 9:16 PM, John Hendrikx wrote:
>> Hi List,
>> 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 images/text).
>> 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