Re: [idvdevelopers] DisplayImplJ2D getImage method waits infinitely

  • To: "A.Kursat KURTAR" <akk512@xxxxxxxxx>
  • Subject: Re: [idvdevelopers] DisplayImplJ2D getImage method waits infinitely
  • From: Jeff McWhirter <jeffmc@xxxxxxxxxxxxxxxx>
  • Date: Tue, 22 Jul 2008 09:18:29 -0600
Hi Kursat,

I am trying to get the image of the rendered maps from the display. When I call the 
"getImage()" method of "DisplayImplJ2D", the thread waits infinitely. I think a 
deadlock state occurs inside. How can get the image of the display? Thanks in advance...

We've had problems with lock ups during image capture. I haven't tried any image captures using the visad 2D facilities, just the 3D.

When we are in interactive mode (as opposed to batch mode) we use the Robot class (http://java.sun.com/j2se/1.3/docs/api/java/awt/Robot.html) to do a screen capture. This allows us to capture more than the DisplayImpl (e.g., multiple displays in the same window) However, the robot capture is wysiwig - if there are other windows occluding the window you want captured you'll get what is shown on the screen.

As to the lock up - there is a possibility for the capture thread to wait indefinitely using VisADCanvasJ3D. I haven't looked into this fully. One thing you can do when you are hung up is to do a stack trace dump - this will show you where exactly you are stalled. (To do a stack trace: On Unixes do a kill -3 of the jvm process. On windows do a control-break in the command window)

-Jeff





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