pvpython crash on exit when including programmable source
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
pvpython script demonstrates crash on completion due to memory free bug, particularly when script also includes use of a python programmable filter.
How to reproduce test case:
- Start ParaView
- Sources->Programmable Source
- In script area pase: pdo = self.GetPolyDataOutput()
- Press apply button
- Press close button in "Output Messages" dialog if it appears
- File->Save State
- Save state with name pvpython_crash.pvsm
- exit
crash happens on: pvpython pvpython_crash.py but not on python pvpython_crash.py.
Crash place is after all lines in pvpython_crash.py are executed.
If comment line #12 "view.WriteImage("plot.png", "vtkPNGWriter", 1)" in pvpython_crash.py, then crash will gone.
crash place is: 705 if (!PyString_CheckExact(key) || 706 (hash = ((PyStringObject *) key)->ob_shash) == -1)
Issue at http://paraview.org/Bug/print_bug_page.php?bug_id=10506 #10506 (closed) can be related.
pvpython_crash_gdb_backtrace.txt contains gdb backtrace at crash place pvpython_crash_valgrind.txt containes valgrind output near crash place
Crash happens on more complex Programmable Filters too: for intance on http://www.paraview.org/Wiki/Python_Programmable_Filter#Generating_Data_.28Programmable_Source.29 __ environment:
CentOS release 5.8 (Final) with latest updates, x64 Python-2.7.3, built with "./configure --enable-shared && make" ParaView-3-14.1, built with "BUILD_SHARED_LIBS=ON, PARAVIEW_ENABLE_PYTHON=ON, other options are default"
SEE: attached pvpython_crash_case_29june2012.zip for test case files.