Debugging a UI refresh problem (not dirtyopts related it seems)

John Hendrikx hjohn at xs4all.nl
Thu Jun 14 11:38:05 PDT 2012


Hi Richard,

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 :))

--John

     0.065  | Prism pipeline init order: d3d 
j2d                                                                          
-- com.sun.prism.impl.PrismSettings.checkSettings(PrismSettings.java:216)
     0.066  | Using t2k for text 
rasterization                                                                            
-- com.sun.prism.impl.PrismSettings.checkSettings(PrismSettings.java:217)
     0.066  | Not using dirty region 
optimizations                                                                        
-- com.sun.prism.impl.PrismSettings.checkSettings(PrismSettings.java:221)
     0.066  | Prism pipeline name = 
com.sun.prism.d3d.D3DPipeline                                                         
-- com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:148)
     0.067  | Loading D3D native library 
...                                                                              
-- com.sun.prism.d3d.D3DPipeline$1.run(D3DPipeline.java:29)
     0.069  |     
succeeded.                                                                                                 
-- com.sun.prism.d3d.D3DPipeline$1.run(D3DPipeline.java:33)
     0.134  | Direct3D initialization 
succeeded                                                                           
-- com.sun.prism.d3d.D3DPipeline.<clinit>(D3DPipeline.java:40)
     0.136  | (X) Got class = class 
com.sun.prism.d3d.D3DPipeline                                                         
-- com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:152)
     0.137  | Initialized prism pipeline: 
com.sun.prism.d3d.D3DPipeline                                                   
-- com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:159)
     0.185  | OS 
Information:                                                                                             
-- com.sun.prism.d3d.D3DPipeline.printDriverInformation(D3DPipeline.java:87)
     0.185  |     Windows 7 build 
7601                                                                                       
-- com.sun.prism.d3d.D3DPipeline.printDriverInformation(D3DPipeline.java:88)
     0.185  | D3D Driver 
Information:                                                                                     
-- com.sun.prism.d3d.D3DPipeline.printDriverInformation(D3DPipeline.java:89)
     0.185  |     NVIDIA GeForce GTX 550 
Ti                                                                                  
-- com.sun.prism.d3d.D3DPipeline.printDriverInformation(D3DPipeline.java:90)
     0.185  |     
\\.\DISPLAY3                                                                                               
-- com.sun.prism.d3d.D3DPipeline.printDriverInformation(D3DPipeline.java:91)
     0.186  |     Driver nvd3dum.dll, version 
8.17.12.8562                                                                   
-- com.sun.prism.d3d.D3DPipeline.printDriverInformation(D3DPipeline.java:92)
     0.186  |     Pixel Shader version 
3.0                                                                                   
-- com.sun.prism.d3d.D3DPipeline.printDriverInformation(D3DPipeline.java:93)
     0.187  |     Device : ven_10DE, dev_1244, 
subsys_83C21043                                                               
-- com.sun.prism.d3d.D3DPipeline.printDriverInformation(D3DPipeline.java:94)
     0.220  | javafx.runtime.version: 
2.2.0-beta-b11                                                                      
-- hs.mediasystem.FrontEnd.start(FrontEnd.java:75)
     1.401  | -> RESIZE: 2187154536045615 w: 1440 h: 
860                                                                  -- 
com.sun.javafx.tk.quantum.GlassViewEventHandler.handleViewEvent(GlassViewEventHandler.java:444)
     1.411  | ProgramController.registerService() - registering new 
service: 
hs.mediasystem.screens.SubtitleDownloadService at 8e4e40                -- 
hs.mediasystem.screens.ProgramController.registerWorker(ProgramController.java:430)
     1.413  | ProgramController.registerService() - registering new 
service: hs.mediasystem.screens.GroupWorker at 2e9f9e    -- 
hs.mediasystem.screens.ProgramController.registerWorker(ProgramController.java:430)
     1.659 *| Database up to date at version 
11                                                                           
-- hs.mediasystem.db.DatabaseUpdater.updateDatabase(DatabaseUpdater.java:43)
     1.663 *| Navigator.navigateTo() - Destination('Home'; 
modal=false)                                                   -- 
hs.mediasystem.screens.Navigator.navigateTo(Navigator.java:71)
     1.702  | RESIZE: 2187154837492176 w: 1920 h: 
1200                                                                    
-- 
com.sun.javafx.tk.quantum.GlassViewEventHandler.handleViewEvent(GlassViewEventHandler.java:444)
     1.915  | new 
alphas                                                                                                  
-- 
com.sun.prism.impl.shape.OpenPiscesRasterizer.getMaskData(OpenPiscesRasterizer.java:80)
     2.201  | new 
alphas                                                                                                  
-- 
com.sun.prism.impl.shape.OpenPiscesRasterizer.getMaskData(OpenPiscesRasterizer.java:80)


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.
>
> Richard
>
>
> 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 mailing list