Hi,
I'm trying to use the ParaView (latest git version) python API from
within pure python and I'm running into an issue. The script I'm testing
runs the sphere animation example from the PV wiki, and while the
animation shows fine, the script crashes at completion on both Ubuntu
12.04 and OSX 10.8.4, with slightly different error reporting.
Everything works fine if I use pvpython (both with and without wrapper
script), but I don't see why pure python should be a problem. I've
attached the wrapper script I use to setup the environment (taken from
suggestions on PV wiki) and the script I'm testing. Below, I've shown
the errors seen. Has anyone seen this before? Is there some extra setup
bit that pvpython is doing that isn't being taken care of by the wrapper
script?
Thanks,
M
--
Dr. Michael Reuter
Data Analaysis and Visualization Group
Neutron Data Analysis and Visualization Division
Oak Ridge National Laboratory
Office: 1-865-241-7216
Fax: 1-865-574-6080
Email:reute...@ornl.gov
On Ubuntu, I usually see the following error:
*** glibc detected *** python: corrupted double-linked list:
0x0000000003064250 ***
Occasionally, I'll get:
*** glibc detected *** python: double free or corruption (!prev):
0x0000000003cd12a0 ***
and a long error report.
On OSX, I see:
Process: Python [15280]
Path:
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: org.python.python
Version: 2.7.2 (2.7.2)
Build Info: python-60004000000000~1
Code Type: X86-64 (Native)
Parent Process: bash [15279]
User ID: 677015263
PlugIn Path: /Users/USER/*/libvtkCommonCore-pv4.0.1.dylib
PlugIn Identifier: libvtkCommonCore-pv4.0.1.dylib
PlugIn Version: ??? (0)
Date/Time: 2013-08-01 13:11:24.981 -0400
OS Version: Mac OS X 10.8.4 (12E55)
Report Version: 10
Anonymous UUID: 123754A7-EABF-1F59-0E0A-7B623674EB9C
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libvtkCommonCore-pv4.0.1.dylib0x000000010e0de9e6
vtkSmartPointerBase::~vtkSmartPointerBase() + 22
1 libvtkPVServerManagerCore-pv4.0.1.dylib0x0000000110385a4c
std::_Rb_tree<std::string, std::pair<std::string const,
vtkSmartPointer<vtkDataObject> >, std::_Select1st<std::pair<std::string
const, vtkSmartPointer<vtkDataObject> > >, std::less<std::string>,
std::allocator<std::pair<std::string const,
vtkSmartPointer<vtkDataObject> > >
>::_M_erase(std::_Rb_tree_node<std::pair<std::string const,
vtkSmartPointer<vtkDataObject> > >*) + 108
2 libvtkPVServerManagerCore-pv4.0.1.dylib0x000000011038414c
vtkSMDataTypeDomain::~vtkSMDataTypeDomain() + 172
3 libvtkPVServerManagerCore-pv4.0.1.dylib0x000000011038406f
vtkSMDataTypeDomain::~vtkSMDataTypeDomain() + 15
… clipped for brevity
#!/bin/bash
paraview_libs=${HOME}/build/ParaView-git/lib
paraview_python=${paraview_libs}/site-packages
export LD_LIBRARY_PATH=${paraview_libs}
export PYTHONPATH=${paraview_libs}:${paraview_python}
$@
from paraview.simple import *
Sphere()
Show()
Render()
# Get the application-wide animation scene
scene = GetAnimationScene()
#scene.NumberOfFrames = 100
#scene.PlayMode = 'Real Time'
#scene.Duration = 5
# Get the animation track for animating "StartTheta" on the active source.
# GetAnimationTrack() creates a new track if none exists.
cue = GetAnimationTrack("StartTheta")
# Create 2 keyframes for the StartTheta track
keyf0 = CompositeKeyFrame()
keyf0.Interpolation = 'Ramp'
# At time = 0, value = 0
keyf0.KeyTime = 0
keyf0.KeyValues = [0]
keyf1 = CompositeKeyFrame()
# At time = 1.0, value = 200
keyf1.KeyTime = 1.0
keyf1.KeyValues = [200]
# Add keyframes.
cue.KeyFrames = [keyf0, keyf1]
scene.Play()
_______________________________________________
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