Weird display problem

Hi all,

I'd like to understand a little more about how DisplayImpl's do their
threading.

I am adding layers - that is a (scalarmap, datareference) - to the
display in batches. In terms of my application a model is made up of a
number of layers. Models get added or removed, and as this happens each
layer also gets added and removed.

The strange behaviour that I am getting is some data is becoming
inaccessible. If I add the layers for one model, I am able to toggle
them on and off with renderer.toggle(). Which is great. However, if I
add a second model, the new layers cannot be toggled until I remove the
first model.

Which is odd. So, I am suspicious that there is a deadlock or thread
conflict occurring which is preventing the data from displaying, but I
don't understand the execution logic of DisplayImpl nearly well enough.
My procedure for adding a model is to loop over the list of layers, and
add each one to the display. There is also some GUI logic in there, but
I can replicate the error even with the GUI stuff stripped out. VisAD is
definately getting the data and the scalarmaps, because I am printing
out Dispay.getMapVector() and getting results. And, as soon as I remove
the reference to all the layers from the new model, the data appears all
of a sudden.

I'm totally baffled, and can't see why this might be occurring. Is there
anything I should be aware of in terms of having multiple renderers
floating around, or some common problems that people run into with VisAD
threading?

Sorry if this is all very vague, but like I said, I'm baffled. As far as
my code is concerned, adding a new model is as simple as adding some
more layers - models are a concept that VisAD is not aware of! So, why
would it work for multiple layers in one model?


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