Re: continued threading issues

Hi Stuart,

I doubt that hacking the ThreadPool to create just one
thread will work. We have had lots of trouble with
offscreen rendering over the years. To track down the
cause of this hang, I'd run in jdb (haven't done so in
years) and when the systems hangs, enter "where all" to
see where all the threads are and why they are all hung
(deadlock or whatever).

Good luck,

On Wed, 2 Aug 2006, Stuart Maclean wrote:

> I am using visad in an offscreen mode, inside a web application
> environment (Tomcat 5.5 is container).  Yet again I am having threading
> issues in that sometimes visad appears to lock up.
> I create a DisplayImplJ2D, add scalar maps, then add some data.  I then
> always call
> BufferedImage bi = displayImplJ2D.getImage( true );
> I note that in certain situations this call hangs.
> I note that the 'true' parameter forces a retransformation and redraw of
> the 'scene'.  If I experiment with a false value, it can lead incomplete
> graphics, ie Data objects not yet drawn.
> This lack of understanding of the thread model has been my most
> frustrating bugbear using Visad. As I see it, I will have one thread per
> DisplayImpl (since the VisADCanvasJ2D created for each display starts
> its own thread), plus 5 threads in the ThreadPool.  Are there any others
> ?  Should I be using more calls to disableAction/enableAction and trying
> to coordinate a 'finished image' by listening for DisplayEvents of type
> On a somewhat related note, I am better off using one DisplayImpl
> object, at least one per 'user' (== user agent) and then toggling
> 'layers' of data on and off using DataRenderers so that I get an image
> containing just one Data object drawn, or should I use a separate
> DisplayImp object for each Data object (examples of Data for my app are
> coastline, bathymetry contours, model grid contours, etc)
> I am trying to build a browser based UI system with visad producing
> BufferedImages on the server which I then convert to gif/png for browser
> consumption.  If I can only track down/understand the fail-safe method
> for producing the BufferedImage objects.
> I am tempted to hack the ThreadPool to create just one thread and see
> how that goes.
> Any help very gratefully appreciated.
> Stuart
> ==============================================================================
> To unsubscribe visad, visit:
> ==============================================================================

To unsubscribe visad, visit:

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