Re: [Paraview] ParaView Seg Faults when running Animation in a Programmable Filter

2015-01-30 Thread Omid Mahabadi
After a lot of debugging, it turns out the issue is with the SetCells
function of the vtk unstructured grid. Below are the bits of my
Programmable Filter code that are relevant to the seg fault:

output  = self.GetOutputDataObject(0)

cellArray   = vtk.vtkCellArray()
cellTypes   = []

# Create a polygon to display the selected points
polygon = vtk.vtkPolygon()
polygon.GetPoints().DeepCopy(pointArray)
polygon.GetPointIds().SetNumberOfIds(len(coordinates))
for i in range(len(coordinates)):
  polygon.GetPointIds().SetId(i, coordinates[i][0])

# Add the polygon to a list of Cells
cellArray.InsertNextCell(polygon)
cellTypes.append(vtk.VTK_POLYGON)

# Get the cell containing a given cell  add it to the cellArray
selectedCell  = input.GetCell(cellID)  
cellArray.InsertNextCell(selectedCell)
cellTypes.append(vtk.VTK_TETRA)

# SetCells of the output with only the selected analyzed cells
output.SetCells(cellTypes, cellArray)

The last line above seg faults on one of my computers but not on the
other one, both using Linux Mint 15 OS, and similar versions of
ParaView. Any thoughts?


On 15-01-28 07:27 PM, Omid Mahabadi wrote:
 Hi,
 I've been experiencing a very weird seg faults in various versions of
 ParaView (4.1.x, 4.2.0, 4.3.x) when running an animation (streaming
 over time) of my Programmable Filter. I'm not even sure this is a
 ParaView issue, but I'll still share my story in case someone has any
 insights that they can kindly share.

 My Programmable Filter code works fine for the Current time step,
 regardless at which time step I run it (i.e., hit the Apply button of
 the Programmable Filter). However, when I hit the Play button to loop
 over time steps (which appends some information to a CSV file),
 ParaView seg faults after reaching the /3rd time step/. The filter has
 been working for some time and this started to happen all of a sudden,
 without any system update.

 It may be related to a weird combination of hardware, software, and
 drivers. My script works fine on a desktop computer I have but it seg
 faults on my main workstation, which has an AMD/ATI Radeon R9 280x GPU
 running on Linux Mint 15, 64-bit. When I completely removed the AMD
 drivers, it still seg faulted but after reaching the /6th time step/
 after the current one. Then, I launched an Ubuntu 14.04 LTS 64-bit,
 live on a USB flash drive. The script in Programmable Filter worked
 perfectly fine. As a result, I installed the OS, but it acted up
 exactly as the Linux Mint installation.

 The input files are massive vtk unstructured grids (about 800 MB
 each). I created smaller files, but unfortunately I couldn't reproduce
 the error. But I'm fairly sure that the files are not corrupted. As
 such, I can't send out the files that cause the issue. I also
 monitored the memory usage using free -h command while Playing. Here's
 the output for the -/+ buffers/cache line:

  total   used   free
 -/+ buffers/cache:   7.2G   8.4G (Opening the .vtu files)
 -/+ buffers/cache:   7.2G   8.4G
 -/+ buffers/cache:   7.4G   8.2G
 -/+ buffers/cache:   7.6G   8.0G
 -/+ buffers/cache:   7.6G   8.0G
 -/+ buffers/cache:   7.6G   8.0G
 -/+ buffers/cache:   7.9G   7.7G
 -/+ buffers/cache:   8.3G   7.4G
 -/+ buffers/cache:   8.5G   7.1G
 -/+ buffers/cache:   8.6G   7.0G
 -/+ buffers/cache:   8.5G   7.1G
 -/+ buffers/cache:   8.5G   7.1G
 -/+ buffers/cache:   8.5G   7.1G
 -/+ buffers/cache:   8.5G   7.1G
 -/+ buffers/cache:   8.6G   7.0G
 -/+ buffers/cache:   8.9G   6.7G
 -/+ buffers/cache:   9.1G   6.5G
 -/+ buffers/cache:   9.3G   6.3G
 -/+ buffers/cache:   9.4G   6.2G (Seg faults here)
 -/+ buffers/cache:   7.0G   8.6G

 As you can see, my system still had a lot of free memory when the seg
 fault happened and I haven't done anything explicitly to limit memory
 usage by a single process.

 Looking at syslog, this is the error message for the seg fault:

 kernel: [77995.911073] paraview[22483]: segfault at 7f3c8e0398ac
 ip 7f3a47ebe169 sp 7fff9106ab50 error 4 in
 fglrx_dri.so[7f3a479e9000+21e9000]


 Am I missing something here? Is there any other debugging steps I
 should take? Any insights or help will be hugely appreciated.

 Thank you,
 Omid



 ___
 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

 Search the list archives at: http://markmail.org/search/?q=ParaView

 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/mailman/listinfo/paraview

-- 
Omid Mahabadi, 

[Paraview] ParaView Seg Faults when running Animation in a Programmable Filter

2015-01-28 Thread Omid Mahabadi
Hi,
I've been experiencing a very weird seg faults in various versions of
ParaView (4.1.x, 4.2.0, 4.3.x) when running an animation (streaming over
time) of my Programmable Filter. I'm not even sure this is a ParaView
issue, but I'll still share my story in case someone has any insights
that they can kindly share.

My Programmable Filter code works fine for the Current time step,
regardless at which time step I run it (i.e., hit the Apply button of
the Programmable Filter). However, when I hit the Play button to loop
over time steps (which appends some information to a CSV file), ParaView
seg faults after reaching the /3rd time step/. The filter has been
working for some time and this started to happen all of a sudden,
without any system update.

It may be related to a weird combination of hardware, software, and
drivers. My script works fine on a desktop computer I have but it seg
faults on my main workstation, which has an AMD/ATI Radeon R9 280x GPU
running on Linux Mint 15, 64-bit. When I completely removed the AMD
drivers, it still seg faulted but after reaching the /6th time step/
after the current one. Then, I launched an Ubuntu 14.04 LTS 64-bit, live
on a USB flash drive. The script in Programmable Filter worked perfectly
fine. As a result, I installed the OS, but it acted up exactly as the
Linux Mint installation.

The input files are massive vtk unstructured grids (about 800 MB each).
I created smaller files, but unfortunately I couldn't reproduce the
error. But I'm fairly sure that the files are not corrupted. As such, I
can't send out the files that cause the issue. I also monitored the
memory usage using free -h command while Playing. Here's the output for
the -/+ buffers/cache line:

 total   used   free
-/+ buffers/cache:   7.2G   8.4G (Opening the .vtu files)
-/+ buffers/cache:   7.2G   8.4G
-/+ buffers/cache:   7.4G   8.2G
-/+ buffers/cache:   7.6G   8.0G
-/+ buffers/cache:   7.6G   8.0G
-/+ buffers/cache:   7.6G   8.0G
-/+ buffers/cache:   7.9G   7.7G
-/+ buffers/cache:   8.3G   7.4G
-/+ buffers/cache:   8.5G   7.1G
-/+ buffers/cache:   8.6G   7.0G
-/+ buffers/cache:   8.5G   7.1G
-/+ buffers/cache:   8.5G   7.1G
-/+ buffers/cache:   8.5G   7.1G
-/+ buffers/cache:   8.5G   7.1G
-/+ buffers/cache:   8.6G   7.0G
-/+ buffers/cache:   8.9G   6.7G
-/+ buffers/cache:   9.1G   6.5G
-/+ buffers/cache:   9.3G   6.3G
-/+ buffers/cache:   9.4G   6.2G (Seg faults here)
-/+ buffers/cache:   7.0G   8.6G

As you can see, my system still had a lot of free memory when the seg
fault happened and I haven't done anything explicitly to limit memory
usage by a single process.

Looking at syslog, this is the error message for the seg fault:

kernel: [77995.911073] paraview[22483]: segfault at 7f3c8e0398ac ip
7f3a47ebe169 sp 7fff9106ab50 error 4 in
fglrx_dri.so[7f3a479e9000+21e9000]


Am I missing something here? Is there any other debugging steps I should
take? Any insights or help will be hugely appreciated.

Thank you,
Omid

___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview