[Paraview] pvpython WriteImage output corrupted

Taylor, Erin M. Erin.Taylor at jhuapl.edu
Mon Apr 15 13:47:03 EDT 2013


Today I reinstalled a local version of OSMesa (7.8.2) and rebuilt ParaView
pointing to this new installation of OSMesa, and the rendering output
using on-screen rendering (X) from WriteImage now works!  There must have
been a conflict with versions of GL files (?) that was causing corrupted
output.  

On the other hand, when I try to use off-screen rendering, the script
still bombs, but has the error:

pvbatch: main/renderbuffer.c:1924: _mesa_add_renderbuffer: Assertion
'bufferName == BUFFER_DEPTH || bufferName == BUFFER_STENCIL ||
fb->Attachment[bufferName].Renderbuffer == ((void *)0)' failed.

This is an improvement that I can get some WriteImage() output to save
properly now, but I would in the end like to be able to get off-screen
rendering to work in order to run the script in a non X environment.

Thanks,
Erin



On 4/15/13 10:17 AM, "Taylor, Erin M." <Erin.Taylor at jhuapl.edu> wrote:

>For what it's worth, I've isolated the seg fault for off screen rendering
>using pdb.
>
>I call pvbatch --use-offscreen-rendering simpleTest.py  (I have paraview
>built using OSMesa support)
>
>And pdb shows the seg fault during Render() is coming from
>servermanager.py(346)__ConvertArgumentsAndCall()
>retVal = func(*newArgs)
>
>The simpleTest.py script contains the following:
>
>from paraview.simple import *
>import pdb
>s = sphere()
>Show(s)
>pdb.set_trace()
>Render()
>WriteImage("testimage.png")
>
>
>
>Erin
>
>
>
>
>On 4/15/13 9:30 AM, "Taylor, Erin M." <Erin.Taylor at jhuapl.edu> wrote:
>
>>I have tried setting the view.UseOffscreenRendringForScreenshots to 0
>>with
>>no luck.  Still the same corrupted image output.
>>
>>And I am making a series of images in a loop also.  I am updating the
>>same
>>view, however, not deleting and recreating a new one.  I wonder if that
>>would work.
>>
>>Also, in the last few days I've built paraview from source with OSMesa
>>support and tried using offscreen rendering, but that results in a seg
>>fault at Render().  I must not have it set up properly.  I followed the
>>instructions for build with OSMesa support, and it compiled and built
>>successfully, but haven't had luck getting the script to run with
>>offscreen rendering yet.
>>
>>Erin
>>
>>
>>
>>
>>On 4/15/13 9:19 AM, "Masquelet, Matthieu (GE Global Research)"
>><masquelet at ge.com> wrote:
>>
>>>That does not seem to help. On the other hand, I've personally had
>>>success by adding a pause (time.sleep(0.5)) in my loop after each
>>>Delete(view). Does that help you pinpoint the issue? Note that I use
>>>on-screen rendering regardless as I cannot build paraview with OpenMesa
>>>on my system at this point.
>>>
>>>Thanks in advance,
>>>
>>>Matthieu
>>>
>>>-----Original Message-----
>>>From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
>>>Sent: Friday, April 12, 2013 6:38 PM
>>>To: Masquelet, Matthieu (GE Global Research)
>>>Cc: Taylor, Erin M.; ParaView
>>>Subject: Re: [Paraview] pvpython WriteImage output corrupted
>>>
>>>I wonder if has something to do with the offscreen rendering. Try the
>>>following before Writeimage():
>>>
>>>view.UseOffscreenRenderingForScreenshots = 0
>>>
>>>Does that help?
>>>
>>>Utkarsh
>>>
>>>
>>>On Thu, Apr 11, 2013 at 2:37 PM, Masquelet, Matthieu (GE Global
>>>Research) <masquelet at ge.com> wrote:
>>>> I have experienced similar issues to a lesser level. Say if I'm
>>>>looping
>>>>over 20 files to generate snapshots for a movie, sometimes, 1 or 2 of
>>>>these will be corrupted in a fashion similar to what is reported here.
>>>>Also using 3.98.1 on Linux 64-bit, writing png files.
>>>>
>>>> Hope this helps,
>>>>
>>>> Matthieu
>>>>
>>>> -----Original Message-----
>>>> From: paraview-bounces at paraview.org
>>>>[mailto:paraview-bounces at paraview.org] On Behalf Of Taylor, Erin M.
>>>> Sent: Thursday, April 11, 2013 11:11 AM
>>>> To: Taylor, Erin M.; ParaView
>>>> Subject: Re: [Paraview] pvpython WriteImage output corrupted
>>>>
>>>> I should also add that I can output images from the ParaView GUI in
>>>>the
>>>>linux machine with no problems.  It's just pvpython WriteImage output
>>>>that is corrupted.
>>>>
>>>>
>>>>
>>>> On 4/11/13 11:08 AM, "Taylor, Erin M." <Erin.Taylor at jhuapl.edu> wrote:
>>>>
>>>>>Hi all,
>>>>>
>>>>>I have a pvpython script that I've been developing and running
>>>>>successfully on Mac OSX 10.6.8.  It renders a csv data set as points,
>>>>>then
>>>>>saves an image to file.    It basically boils down to this:
>>>>>
>>>>>cr = CSVReader()
>>>>>cr.FileName = filename
>>>>>cr.UpdatePipeline()
>>>>>tp = TableToPoints(cr)
>>>>>tp.XColumn = 'x'
>>>>>tp.YColumn = 'y'
>>>>>tp.ZColumn = 'z'
>>>>>tp.UpdatePipeline()
>>>>>
>>>>>Render()
>>>>>view = GetRenderView()
>>>>>WriteImage(image_path, view, Magnification = 2)
>>>>>
>>>>>
>>>>>This works on the mac using pvpython.  However when I try to run the
>>>>>same script on a 64 bit linux machine (same version of paraview,
>>>>>3.98.1), the image that is output from WriteImage is corrupted.  By
>>>>>that I mean the image is a mess of black and white noise.  Sometimes
>>>>>the images have a portion of the script output rendered correctly in a
>>>>>tile of the image.  I should note that the image is rendered properly
>>>>>in the view window on this linux machine, it is just the saved output
>>>>>that is corrupted.  I have tried .png and .jpg image output with the
>>>>>same result.
>>>>>
>>>>>I appreciate any ideas anyone might have on the cause of this!
>>>>>
>>>>>Many thanks,
>>>>>
>>>>>Erin
>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>Powered by www.kitware.com
>>>>>
>>>>>Visit other Kitware open-source projects at
>>>>>http://www.kitware.com/opensource/opensource.html
>>>>>
>>>>>Please keep messages on-topic and check the ParaView Wiki at:
>>>>>http://paraview.org/Wiki/ParaView
>>>>>
>>>>>Follow this link to subscribe/unsubscribe:
>>>>>http://www.paraview.org/mailman/listinfo/paraview
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>> http://paraview.org/Wiki/ParaView
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>> http://paraview.org/Wiki/ParaView
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.paraview.org/mailman/listinfo/paraview
>>
>>_______________________________________________
>>Powered by www.kitware.com
>>
>>Visit other Kitware open-source projects at
>>http://www.kitware.com/opensource/opensource.html
>>
>>Please keep messages on-topic and check the ParaView Wiki at:
>>http://paraview.org/Wiki/ParaView
>>
>>Follow this link to subscribe/unsubscribe:
>>http://www.paraview.org/mailman/listinfo/paraview
>



More information about the ParaView mailing list