Re: [visad] Display bug found in VisAD: Geometry Disappears

Hi Bill,

Thanks for the suggested fix.

I have tried to programmatically zoom the display in the test harness, without luck in addressing the symptoms of the bug.

On your suggestion, I tried simply updating the projection matrix with its current value:

    private void runTestFix(Display display) throws Exception {
        Thread.sleep(2000);
ProjectionControl projectionControl = ((DisplayImplJ3D)display).getProjectionControl();
        double[] matrix = projectionControl.getMatrix();
        projectionControl.setMatrix(matrix);
    }

I also tried a progressive zoom, and a progressive zoom with a reset, both of which had no effect on the bug:

    private void runTestFix(Display display) throws Exception {
        Thread.sleep(2000);
ProjectionControl projectionControl = ((DisplayImplJ3D)display).getProjectionControl();
        double[] matrix = projectionControl.getMatrix();
        double [] base = {matrix[0], matrix[5], matrix[10]};
        for (int i = 0; i < 4; i++) {
            matrix[0] += 0.25;
            matrix[5] += 0.25;
            matrix[10] += 0.25;
            projectionControl.setMatrix(matrix);
        }
        // reset
        matrix[0] = base[0];
        matrix[5] = base[1];
        matrix[10] = base[2];
        projectionControl.setMatrix(matrix);
    }

A virtual desktop change will force a re-draw that will address the symptom, causing the missing geometry to be displayed again.

Interestingly, a zoom in our operational application does cause the geometry to be displayed most of the time for most types of geometry, although was contingent on the amount of zoom (and I presume the number of triggered internal display change events, or similar).


Sincerely,

Dr Jason Brownlee
Software Engineer
Australian Bureau of Meteorology




On 04/20/2010 10:54 PM, hiding@xxxxxxxxx wrote:
Jason,

Thanks for your very clear statement of the problem.
I no longer work on VisAD, but one part of your message
caught my eye:

Analysis shows the geometry is still in the scene graph,
and is live. Minimizing, resizing, further add/remove data
references, and forced doAction on the display do no
correct the bug. Major operations on the display that
force a full re-draw (switching virtual desktops on Linux,
zoom operation in our application) will cause the
geometry to be displayed again.
If this bug proves to be difficult to track down, or is even
a bug in Java3D, one work around would be, whenever data
is added to or removed from a display, to trigger a delayed
(say, after 0.5 second) redraw. My memory of Java3D is a
bit shaky, but this might be done by setting the
projection matrix (to the same value it currently has).

Good luck,
Bill





  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: