| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0004823 | ParaView | (No Category) | public | 2007-04-09 16:23 | 2007-05-21 11:51 | ||||
| Reporter | David Karelitz | ||||||||
| Assigned To | Utkarsh Ayachit | ||||||||
| Priority | urgent | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0004823: Crash performing a collection operation on a Programmable filter | ||||||||
| Description | If you run the python script below, pvpython segfaults at the end. -------------------------------- The script: import paraview import sys import math # Connect to the "builtin" #(in-process) ParaView server ... #================================= paraview.ActiveConnection = paraview.Connect() # Create an Exodus reader to load our data ... #============================================== reader = paraview.CreateProxy("sources", "ExodusReader") reader.GetProperty("FileName").SetElement(0, "/home/dbkarel/SampleData/disk_out_ref.e") reader.UpdateVTKObjects() reader.UpdatePipeline() reader.UpdatePropertyInformation() paraview.RegisterProxy(reader, "my reader") # Create our programmable filter and set its program ... #======================================================== filter = paraview.CreateProxy("filters", "Programmable Filter") filter.GetProperty("Script").SetElement(0, """ input = self.GetUnstructuredGridInput() output = self.GetUnstructuredGridOutput() output.DeepCopy(input) """) # Connect the reader output to # the programmable filter input ... #=================================== filter.GetProperty("Input").AddProxy(reader.SMProxy, 0) filter.UpdateVTKObjects() paraview.RegisterProxy(filter, "my programmable filter") # Perform a sum operation #========================= sum = paraview.CreateProxy("filters", "MinMax") sum.SetOperation("SUM") sum.UpdateVTKObjects() # Reduce the programmable filter output # data using our "max" algorithm, # returning just the maximum error value # (instead of transferring the entire # dataset to the client) #======================================= myoutput = paraview.Fetch(filter, sum) ------------------------------------------- ------------------------------------------- Stack trace: #0 0x003977a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x02e1a7f5 in raise () from /lib/tls/libc.so.6 #2 0x02e1c199 in abort () from /lib/tls/libc.so.6 #3 0x008960d0 in Py_FatalError () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor.so #4 0x00894a1c in PyThreadState_Get () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor.so #5 0x00888b4d in PyErr_Fetch () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor.so #6 0x008b661d in instance_dealloc () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor.so #7 0x00875de7 in _PyExc_Fini () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor.so #8 0x0089726c in Py_Finalize () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor.so 0000009 0x0089bc42 in Py_Main () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor.so #10 0x00842ee6 in vtkPVPythonInterpretor::PyMain (this=0x97db160, argc=2, argv=0x986c0d0) at /home/projects/ParaView3-Trunk/ParaView3/Utilities/VTKPythonWrapping/Executable/vtkPVPythonInterpretor.cxx:270 0000011 0x080566ae in vtkPVProcessModulePythonHelper::RunGUIStart (this=0x96c4978, argc=1, argv=0x96c52e0, numServerProcs=1, myId=0) at /home/projects/ParaView3-Trunk/ParaView3/Utilities/VTKPythonWrapping/Executable/vtkPVProcessModulePythonHelper.cxx:85 #12 0x00437706 in vtkProcessModule::StartClient (this=0x96c5c58, argc=1, argv=0x96c52e0) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModule.cxx:363 #13 0x004372cd in vtkProcessModule::Start (this=0x96c5c58, argc=1, argv=0x96c52e0) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModule.cxx:310 #14 0x00441cd2 in vtkProcessModuleGUIHelper::Run (this=0x96c4978, options=0x96c47d8) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModuleGUIHelper.cxx:38 #15 0x0804e6bb in main (argc=2, argv=0xbfe30f24) at /home/projects/ParaView3-Trunk/ParaView3/Utilities/VTKPythonWrapping/Executable/vtkPythonAppInit.cxx:62 ---------------------------------- fetching reader instead of filter produces no such crash. This is standalone on RHEL4 | ||||||||
| Tags | No tags attached. | ||||||||
| Project | |||||||||
| Topic Name | |||||||||
| Type | |||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0007242) Berk Geveci (administrator) 2007-04-11 10:39 |
The reason for this is probably similar to why histogram hangs in parallel: reduction algorithms do not take empty datasets into account. |
|
(0007342) David Karelitz (reporter) 2007-04-17 10:09 |
The problem seems to be that the Programmable Filter and the ParaView Python Interpretor share the same Python Interpretor object. When the Programmable filter deletes the Python Interpretor (either at vtkPythonProgrammableFilter.cxx:55 or 75), this also appears to be deleting the python interpretor used by pvpython (or the paraview GUI python shell). A temporary fix is to comment out the delete calls. The permanent fix probably requires either determining if anything else is using the python interpretor before deleting it or not sharing the python interpretor among classes. |
|
(0007372) David Karelitz (reporter) 2007-04-18 18:32 |
Running the same script from the Python Window results in the following segfault (even with the Delete() calls commented out) Fatal Python error: ceval: tstate mix-up Program received signal SIGABRT, Aborted. [Switching to Thread -1208797472 (LWP 11735)] 0x003977a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 (gdb) where #0 0x003977a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x04ff97f5 in raise () from /lib/tls/libc.so.6 #2 0x04ffb199 in abort () from /lib/tls/libc.so.6 #3 0x004a7fb0 in Py_FatalError () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #4 0x0048a641 in eval_frame () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #5 0x0048f766 in PyEval_EvalCodeEx () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #6 0x0048e459 in eval_frame () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #7 0x0048f766 in PyEval_EvalCodeEx () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #8 0x0048e459 in eval_frame () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so 0000009 0x0048f766 in PyEval_EvalCodeEx () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #10 0x0048fa2d in PyEval_EvalCode () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so 0000011 0x004a7737 in run_node () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #12 0x004a866a in PyRun_SimpleStringFlags () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #13 0x004a86d7 in PyRun_SimpleString () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #14 0x0658f022 in vtkPVPythonInterpretor::RunSimpleString (this=0x8a83f38, script=0x8a67b00 "import paraview\nimport sys\nimport math\n\n# Connect to the \"builtin\"\n#(in-process) ParaView server ...\n#", '=' <repeats 33 times>, "\nparaview.ActiveConnection = paraview.Connect()\n\n# Create an Exod"...) at /home/projects/ParaView3-Trunk/ParaView3/Utilities/VTKPythonWrapping/Executable/vtkPVPythonInterpretor.cxx:288#15 0x04801f97 in pqPythonShell::pqImplementation::executeCommand (this=0x8a824c0, Command=@0xbfe8ca40) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Python/pqPythonShell.cxx:96 #16 0x04801614 in pqPythonShell::internalExecuteCommand (this=0x88aa4f8, command=@0xbfe8ca40) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Python/pqPythonShell.cxx:239 #17 0x048010b9 in pqPythonShell::executeScript (this=0x88aa4f8, script=@0xbfe8ca40) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Python/pqPythonShell.cxx:170 #18 0x047ff209 in pqPythonDialog::runScript (this=0x8a02fd8, files=@0xbfe8d0e0) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Python/pqPythonDialog.cxx:126 #19 0x04802557 in pqPythonDialog::qt_metacall (this=0x8a02fd8, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbfe8cfb8) at /home/projects/ParaView3-Trunk/Build-Debug/Qt/Python/moc_pqPythonDialog.cxx:71 #20 0x05881bbe in QMetaObject::activate (sender=0x87e1d88, from_signal_index=35, to_signal_index=35, argv=0xbfe8cfb8) at kernel/qobject.cpp:2938 #21 0x05881f96 in QMetaObject::activate (sender=0x87e1d88, m=0x13f1940, local_signal_index=0, argv=0xbfe8cfb8) at kernel/qobject.cpp:2981 #22 0x011a1230 in QFileDialog::filesSelected (this=0x87e1d88, _t1=@0x0) at .moc/release-shared/moc_qfiledialog.cpp:211 #23 0x011a9851 in QFileDialog::accept (this=0x87e1d88) at dialogs/qfiledialog.cpp:984 #24 0x011a605f in QFileDialogPrivate::_q_enterDirectory (this=0x8a10260, index=@0x8a08238) at dialogs/qfiledialog.cpp:1092 #25 0x011ab883 in QFileDialog::qt_metacall (this=0x87e1d88, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbfe8d708) at dialogs/qfiledialog.h:213 #26 0x05881bbe in QMetaObject::activate (sender=0x87005b0, from_signal_index=34, to_signal_index=34, argv=0xbfe8d708) at kernel/qobject.cpp:2938 #27 0x05881f96 in QMetaObject::activate (sender=0x87005b0, m=0x13f1980, local_signal_index=3, argv=0xbfe8d708) at kernel/qobject.cpp:2981 #28 0x011c1418 in QAbstractItemView::activated (this=0x87005b0, _t1=@0x0) at .moc/release-shared/moc_qabstractitemview.cpp:318 #29 0x011c15a9 in QAbstractItemView::mouseDoubleClickEvent (this=0x87005b0, event=0xbfe8ded0) at itemviews/qabstractitemview.cpp:1466 #30 0x00e656f6 in QWidget::event (this=0x87005b0, event=0xbfe8ded0) at kernel/qwidget.cpp:5700 #31 0x010f7f2e in QFrame::event (this=0x87005b0, e=0xbfe8ded0) at widgets/qframe.cpp:631 #32 0x0116a726 in QAbstractScrollArea::viewportEvent (this=0x87005b0, e=0xbfe8ded0) at widgets/qabstractscrollarea.cpp:852 #33 0x011c49f4 in QAbstractItemView::viewportEvent (this=0x87005b0, event=0xbfe8ded0) at itemviews/qabstractitemview.cpp:1275 #34 0x0116b25b in QAbstractScrollAreaFilter::eventFilter (this=0x89f7620, o=0x89ef6a8, e=0xbfe8ded0) at widgets/qabstractscrollarea_p.h:45 #35 0x00e208e0 in QApplicationPrivate::notify_helper (this=0x823f9f8, receiver=0x89ef6a8, e=0xbfe8ded0) at kernel/qapplication.cpp:3424 #36 0x00e212e6 in QApplication::notify (this=0xbfe8e8c0, receiver=0x89ef6a8, e=0xbfe8ded0) at kernel/qapplication.cpp:3131 #37 0x00e7c566 in QETWidget::translateMouseEvent (this=0x89ef6a8, event=0xbfe8e3d0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:184 #38 0x00e7b3f5 in QApplication::x11ProcessEvent (this=0xbfe8e8c0, event=0xbfe8e3d0) at kernel/qapplication_x11.cpp:2848 #39 0x00e9bca9 in x11EventSourceDispatch (s=0x8245b28, callback=0, user_data=0x0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:75 #40 0x04eef74b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #41 0x04ef11d2 in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0 #42 0x04ef16b8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #43 0x05893b9f in QEventDispatcherGlib::processEvents (this=0x8244670, flags=Cannot access memory at address 0x1 ) at kernel/qeventdispatcher_glib.cpp:361 #44 0x00e9b7b7 in QGuiEventDispatcherGlib::processEvents (this=0x8244670, flags=Cannot access memory at address 0x2dd7 ) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1633 #45 0x05871447 in QEventLoop::processEvents (this=0xbfe8e690, flags=Cannot access memory at address 0x0 ) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1633 #46 0x058715e0 in QEventLoop::exec (this=0xbfe8e690, flags={i = 0}) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1650 #47 0x05875c09 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qglobal.h:1634 #48 0x00214c80 in pqProcessModuleGUIHelper::RunGUIStart (this=0x8272d20, argc=1, argv=0x8278850) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Core/pqProcessModuleGUIHelper.cxx:189 0000049 0x01ef0586 in vtkProcessModule::StartClient (this=0x8295218, argc=1, argv=0x8278850) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModule.cxx:363 #50 0x01ef014d in vtkProcessModule::Start (this=0x8295218, argc=1, argv=0x8278850) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModule.cxx:310 #51 0x01efa98a in vtkProcessModuleGUIHelper::Run (this=0x8272d20, options=0x82bef48) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModuleGUIHelper.cxx:38 #52 0x001f22ba in pqMain::Run (app=@0xbfe8e8c0, helper=0x8272d20) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Core/pqMain.cxx:129 #53 0x0806a953 in main (argc=1, argv=0xbfe8e964) at /home/projects/ParaView3-Trunk/ParaView3/Applications/Client/main.cxx:49 |
|
(0007379) user521 2007-04-20 14:35 |
I cleaned up the programmable filter and python interpretter code today. We were not careful enough with making the correct python sub interpretter current when running scripts, finishing scripts or destructing. I've tested it on my linux build and I believe it works properly now. |
|
(0007411) David Karelitz (reporter) 2007-04-23 11:32 |
Now when I run pvpython and do "import paraview", it can't find the paraview module. This is on RHEL4 with a checkout from 9am mountain time today |
|
(0007427) user521 2007-04-24 13:35 |
Berk's change to vtkPVPythonInterpreter fixed the pathing problem. |
|
(0007581) Ken Moreland (manager) 2007-05-07 15:38 |
This problem was fixed, but appears to be broken again. Dave Kareltiz reports the following output during the crash: [dbkarel@s854578 Build]$ bin/paraview Fatal Python error: ceval: tstate mix-up Abort |
|
(0007585) David Karelitz (reporter) 2007-05-07 17:47 |
Apparently this is broken on the trunk, too. Dave Karelitz reports the following stack trace from the trunk (running within the python interpreter window in the GUI) and from running it in pvpython (down below): [dbkarel@s854578 Build-Debug]$ gdb bin/paraview GNU gdb Red Hat Linux (6.3.0.0-1.96rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run Starting program: /home/projects/ParaView3-Trunk/Build-Debug/bin/paraview [Thread debugging using libthread_db enabled] [New Thread -1209002272 (LWP 2381)] [New Thread 132807600 (LWP 2407)] Detaching after fork from child process 2408. Fatal Python error: ceval: tstate mix-up Program received signal SIGABRT, Aborted. [Switching to Thread -1209002272 (LWP 2381)] 0x003977a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 (gdb) where #0 0x003977a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x058fe7f5 in raise () from /lib/tls/libc.so.6 #2 0x05900199 in abort () from /lib/tls/libc.so.6 #3 0x0017afb0 in Py_FatalError () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #4 0x0015d641 in eval_frame () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #5 0x00162766 in PyEval_EvalCodeEx () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #6 0x00161459 in eval_frame () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #7 0x00162766 in PyEval_EvalCodeEx () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #8 0x00161459 in eval_frame () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so 0000009 0x00162766 in PyEval_EvalCodeEx () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #10 0x00162a2d in PyEval_EvalCode () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so 0000011 0x0017a737 in run_node () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #12 0x0017b66a in PyRun_SimpleStringFlags () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #13 0x0017b6d7 in PyRun_SimpleString () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libQtTesting.so #14 0x019510e4 in vtkPVPythonInterpretor::RunSimpleString (this=0x96e9008, script=0x97386b8 "import paraviewnimport sysnimport mathnn# Connect to the "builtin"n#(in-process) ParaView server ...n#", '=' <repeats 33 times>, "nparaview.ActiveConnection = paraview.Connect()nn# Create an Exod"...) at /home/projects/ParaView3-Trunk/ParaView3/Utilities/VTKPythonWrapping/Exe cutable/vtkPVPythonInterpretor.cxx:301#15 0x0075bfdb in pqPythonShell::pqImplementation::executeCommand (this=0x95a01a8, Command=@0xbfebcaa0) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Python/pqPythonShell.cxx:96 #16 0x0075b658 in pqPythonShell::internalExecuteCommand (this=0x93a43d0, command=@0xbfebcaa0) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Python/pqPythonShell.cxx:239 #17 0x0075b0fd in pqPythonShell::executeScript (this=0x93a43d0, script=@0xbfebcaa0) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Python/pqPythonShell.cxx:170 #18 0x0075924b in pqPythonDialog::runScript (this=0x94a82b0, files=@0x9701a00) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Python/pqPythonDialog.cxx:12 7 #19 0x0075c59b in pqPythonDialog::qt_metacall (this=0x94a82b0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbfebd018) at /home/projects/ParaView3-Trunk/Build-Debug/Qt/Python/moc_pqPythonDialog. cxx:71 #20 0x01e1cbbe in QMetaObject::activate (sender=0x96fa0d8, from_signal_index=35, to_signal_index=35, argv=0xbfebd018) at kernel/qobject.cpp:2938 #21 0x01e1cf96 in QMetaObject::activate (sender=0x96fa0d8, m=0x652e28, local_signal_index=0, argv=0xbfebd018) at kernel/qobject.cpp:2981 #22 0x00581eba in pqFileDialog::filesSelected (this=0x96fa0d8, _t1=@0x9701a00) at /home/projects/ParaView3-Trunk/Build-Debug/Qt/Core/moc_pqFileDialog.cxx: 116 #23 0x004e5e33 in pqFileDialog::emitFilesSelected (this=0x96fa0d8, files=@0xbfebd0a0) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Core/pqFileDialog.cxx:446 #24 0x004e6f4d in pqFileDialog::acceptInternal (this=0x96fa0d8, selected_files=@0xbfebd140) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Core/pqFileDialog.cxx:687 #25 0x004e6298 in pqFileDialog::accept (this=0x96fa0d8) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Core/pqFileDialog.cxx:486 #26 0x0146cad4 in QDialog::qt_metacall (this=0x96fa0d8, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbfebd708) at .moc/release-shared/moc_qdialog.cpp:86 #27 0x00581cd8 in pqFileDialog::qt_metacall (this=0x96fa0d8, _c=QMetaObject::InvokeMetaMethod, _id=32, _a=0xbfebd708) at /home/projects/ParaView3-Trunk/Build-Debug/Qt/Core/moc_pqFileDialog.cxx: 86 #28 0x01e1cbbe in QMetaObject::activate (sender=0x9704948, from_signal_index=29, to_signal_index=30, argv=0xbfebd708) at kernel/qobject.cpp:2938 #29 0x01e1cdcf in QMetaObject::activate (sender=0x9704948, m=0x15c3d70, from_local_signal_index=2, to_local_signal_index=3, argv=0xbfebd708) at kernel/qobject.cpp:2990 #30 0x01467774 in QAbstractButton::clicked (this=0x9704948, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:180 #31 0x0128ca52 in QAbstractButtonPrivate::emitClicked (this=0x9704960) at widgets/qabstractbutton.cpp:515 #32 0x0128cb57 in QAbstractButton::click (this=0x9704948) at widgets/qabstractbutton.cpp:941 #33 0x0136ea04 in QDialog::keyPressEvent (this=0x96fa0d8, e=0xbfebdd80) at dialogs/qdialog.cpp:507 #34 0x01036df5 in QWidget::event (this=0x96fa0d8, event=0xbfebdd80) at kernel/qwidget.cpp:5731 #35 0x00ff292d in QApplicationPrivate::notify_helper (this=0x8f10950, receiver=0x96fa0d8, e=0xbfebdd80) at kernel/qapplication.cpp:3432 #36 0x00ff3025 in QApplication::notify (this=0xbfebe860, receiver=0x9704ec8, e=0xbfebdd80) at kernel/qapplication.cpp:3060 #37 0x0103fbfb in qt_sendSpontaneousEvent (receiver=0x9704ec8, event=0xbfebdd80) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:184 #38 0x0106c227 in QKeyMapper::sendKeyEvent (keyWidget=0x9704ec8, grab=false, type=QEvent::KeyPress, code=16777220, modifiers=Cannot access memory at address 0x0 ) at kernel/qkeymapper_x11.cpp:1570 #39 0x0106c6da in QKeyMapperPrivate::translateKeyEvent (this=0x8f38320, keyWidget=0x9704ec8, event=0xbfebe370, grab=false) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1633 #40 0x0104c7c5 in QApplication::x11ProcessEvent (this=0xbfebe860, event=0xbfebe370) at kernel/qapplication_x11.cpp:2777 #41 0x0106dca9 in x11EventSourceDispatch (s=0x8f126e0, callback=0, user_data=0x0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:75 #42 0x0522974b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #43 0x0522b1d2 in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0 #44 0x0522b6b8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #45 0x01e2eb9f in QEventDispatcherGlib::processEvents (this=0x8f11240, flags=Cannot access memory at address 0x1 ) at kernel/qeventdispatcher_glib.cpp:361 #46 0x0106d7b7 in QGuiEventDispatcherGlib::processEvents (this=0x8f11240, flags=Cannot access memory at address 0x94d) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1633 #47 0x01e0c447 in QEventLoop::processEvents (this=0xbfebe630, flags=Cannot access memory at address 0x0 ) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1633 #48 0x01e0c5e0 in QEventLoop::exec (this=0xbfebe630, flags={i = 0}) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1650 0000049 0x01e10c09 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qglobal.h:1634 #50 0x00525570 in pqProcessModuleGUIHelper::RunGUIStart (this=0x8f105f8, argc=1, argv=0x8f8ae20) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Core/pqProcessModuleGUIHelpe r.cxx:189 #51 0x017ad4a2 in vtkProcessModule::StartClient (this=0x8f64630, argc=1, argv=0x8f8ae20) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModule .cxx:363 #52 0x017ad069 in vtkProcessModule::Start (this=0x8f64630, argc=1, argv=0x8f8ae20) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModule .cxx:310 #53 0x017b78de in vtkProcessModuleGUIHelper::Run (this=0x8f105f8, options=0x8f8b580) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModule GUIHelper.cxx:38 0000054 0x0050308e in pqMain::Run (app=@0xbfebe860, helper=0x8f105f8) at /home/projects/ParaView3-Trunk/ParaView3/Qt/Core/pqMain.cxx:129 0000055 0x0806adef in main (argc=1, argv=0xbfebe904) at /home/projects/ParaView3-Trunk/ParaView3/Applications/Client/main.cxx:62 ------------------------------------------------------------------------ --------- Running from pvpython: [dbkarel@s854578 Build-Debug]$ gdb bin/pvpython GNU gdb Red Hat Linux (6.3.0.0-1.96rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run ~/test.py Starting program: /home/projects/ParaView3-Trunk/Build-Debug/bin/pvpython ~/test.py [Thread debugging using libthread_db enabled] [New Thread -1219451168 (LWP 2425)] Process PExodusReader [...........] applying operation Process PythonProgrammableFilter [...........] Process ReductionFilter [...........] Process MinMax [...........] Process ReductionFilter [...........] Process ClientServerMoveData [........... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1219451168 (LWP 2425)] 0x003045f2 in PyDict_GetItem () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor .so (gdb) where #0 0x003045f2 in PyDict_GetItem () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor .so #1 0x002ffca9 in PyFrame_New () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor .so #2 0x002b6e93 in PyEval_EvalCodeEx () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor .so #3 0x002b777d in PyEval_EvalCode () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor .so #4 0x002d0967 in run_node () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor .so #5 0x002d189a in PyRun_SimpleStringFlags () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor .so #6 0x002d1907 in PyRun_SimpleString () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor .so #7 0x0027e0e4 in vtkPVPythonInterpretor::RunSimpleString (this=0x8c0c5d0, script=0x8b6b86c "self = 0n") at /home/projects/ParaView3-Trunk/ParaView3/Utilities/VTKPythonWrapping/Exe cutable/vtkPVPythonInterpretor.cxx:301#8 0x042d5d49 in vtkPythonProgrammableFilter::UnRegister (this=0x8bbe540, o=0x0) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Filters/vtkPythonProgra mmableFilter.cxx:81 0000009 0x00df7c03 in vtkSmartPointerBase::~vtkSmartPointerBase () at /home/projects/ParaView3-Trunk/ParaView3/VTK/Common/vtkVariant.cxx:62 #10 0x05a0b0ba in ~pair (this=0x8c79b40) at /usr/lib/gcc/i386-redhat-linux/3.4.5/../../../../include/c++/3.4.5/bits/ stl_map.h:339 0000011 0x05a0c55a in std::_Destroy<std::pair<vtkSmartPointerBase const, _object*> > (__pointer=0x8c79b40) at /usr/lib/gcc/i386-redhat-linux/3.4.5/../../../../include/c++/3.4.5/bits/ stl_construct.h:107 #12 0x05a0bbd4 in std::_Rb_tree<vtkSmartPointerBase, std::pair<vtkSmartPointerBase const, _object*>, std::_Select1st<std::pair<vtkSmartPointerBase const, _object*> >, std::less<vtkSmartPointerBase>, std::allocator<std::pair<vtkSmartPointerBase const, _object*> > >::destroy_node (this=0x89b45c8, __p=0x8c79b30) at /usr/lib/gcc/i386-redhat-linux/3.4.5/../../../../include/c++/3.4.5/bits/ stl_tree.h:389 #13 0x05a0b3ef in std::_Rb_tree<vtkSmartPointerBase, std::pair<vtkSmartPointerBase const, _object*>, std::_Select1st<std::pair<vtkSmartPointerBase const, _object*> >, std::less<vtkSmartPointerBase>, std::allocator<std::pair<vtkSmartPointerBase const, _object*> > >::_M_erase (this=0x89b45c8, __x=0x8c79b30) at /usr/lib/gcc/i386-redhat-linux/3.4.5/../../../../include/c++/3.4.5/bits/ stl_tree.h:1068 #14 0x05a0acc4 in ~_Rb_tree (this=0x89b45c8) at /usr/lib/gcc/i386-redhat-linux/3.4.5/../../../../include/c++/3.4.5/bits/ stl_tree.h:567 #15 0x05a0ab58 in ~map (this=0x89b45c8) at /home/projects/ParaView3-Trunk/ParaView3/VTK/Common/vtkPythonUtil.cxx:79 #16 0x05a06372 in ~vtkPythonUtil (this=0x89d3f88) at /home/projects/ParaView3-Trunk/ParaView3/VTK/Common/vtkPythonUtil.cxx:79 #17 0x05a063e3 in vtkPythonHashDelete () at /home/projects/ParaView3-Trunk/ParaView3/VTK/Common/vtkPythonUtil.cxx:86 #18 0x002d23f9 in Py_Finalize () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor .so #19 0x002d6d52 in Py_Main () from /home/projects/ParaView3-Trunk/Build-Debug/bin/libvtkPVPythonInterpretor .so #20 0x0027dfa7 in vtkPVPythonInterpretor::PyMain (this=0x89d39d8, argc=2, argv=0x8a23860) at /home/projects/ParaView3-Trunk/ParaView3/Utilities/VTKPythonWrapping/Exe cutable/vtkPVPythonInterpretor.cxx:283#21 0x080566ea in vtkPVProcessModulePythonHelper::RunGUIStart (this=0x885fac8, argc=1, argv=0x8860500, numServerProcs=1, myId=0) at /home/projects/ParaView3-Trunk/ParaView3/Utilities/VTKPythonWrapping/Exe cutable/vtkPVProcessModulePythonHelper.cxx:85 #22 0x019fd4a2 in vtkProcessModule::StartClient (this=0x8860e18, argc=1, argv=0x8860500) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModule .cxx:363 #23 0x019fd069 in vtkProcessModule::Start (this=0x8860e18, argc=1, argv=0x8860500) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModule .cxx:310 #24 0x01a078de in vtkProcessModuleGUIHelper::Run (this=0x885fac8, options=0x885f928) at /home/projects/ParaView3-Trunk/ParaView3/Servers/Common/vtkProcessModule GUIHelper.cxx:38 #25 0x0804e6f7 in main (argc=2, argv=0xbfed0da4) at /home/projects/ParaView3-Trunk/ParaView3/Utilities/VTKPythonWrapping/Exe cutable/vtkPythonAppInit.cxx:62 |
|
(0007670) Utkarsh Ayachit (administrator) 2007-05-17 13:00 |
The issue arose because of multithreading. When testing with python was enabled, we have an interpretor initialized in a separate thread. This requires that we use correct locking mechaism for python to work correctly. Fixed that. /cvsroot/ParaView3/ParaView3/Utilities/VTKPythonWrapping/Executable/vtkPVPythonInterpretor.h,v <-- vtkPVPythonInterpretor.h new revision: 1.5; previous revision: 1.4 /cvsroot/ParaView3/ParaView3/Utilities/VTKPythonWrapping/Executable/vtkPVPythonInterpretor.cxx,v <-- vtkPVPythonInterpretor.cxx new revision: 1.17; previous revision: 1.16 /cvsroot/ParaView3/ParaView3/Qt/Testing/pqPythonEventSource.cxx,v <-- pqPythonEventSource.cxx new revision: 1.22; previous revision: 1.21 /cvsroot/ParaView3/ParaView3/Qt/Python/pqPythonShell.cxx,v <-- pqPythonShell.cxx new revision: 1.9; previous revision: 1.8 |
|
(0007671) Utkarsh Ayachit (administrator) 2007-05-17 13:01 |
I wasn't able to reproduce this bug for pvpython. With the new changes also, the pvpython seems to work fine. Can someone please verify that? |
|
(0007672) 2007-05-17 14:01 |
/cvsroot/ParaView3/ParaView3/Servers/Filters/vtkPythonProgrammableFilter.cxx,v <-- vtkPythonProgrammableFilter.cxx new revision: 1.21; previous revision: 1.20 |
|
(0007673) Utkarsh Ayachit (administrator) 2007-05-17 14:01 |
/cvsroot/ParaView3/ParaView3/Servers/Filters/vtkPythonProgrammableFilter.cxx,v <-- vtkPythonProgrammableFilter.cxx new revision: 1.21; previous revision: 1.20 |
|
(0007674) David Karelitz (reporter) 2007-05-17 14:04 |
This is still broken. If you run the following script, which is the script from the first comment run twice, it segfaults. The programmable filter also gives a python error the second time it\'s created even though the same script worked the first time around. I\'ll attach a stack trace once my debug build finishes ----------------------------------------- import paraview import sys import math # Connect to the \"builtin\" #(in-process) ParaView server ... #================================= paraview.ActiveConnection = paraview.Connect() # Create an Exodus reader to load our data ... #============================================== reader = paraview.CreateProxy(\"sources\", \"ExodusReader\") reader.GetProperty(\"FileName\").SetElement(0, \"/home/dbkarel/SampleData/disk_out_ref.e\") reader.UpdateVTKObjects() reader.UpdatePipeline() reader.UpdatePropertyInformation() paraview.RegisterProxy(reader, \"my reader\") # Create our programmable filter and set its program ... #======================================================== filter = paraview.CreateProxy(\"filters\", \"Programmable Filter\") filter.GetProperty(\"Script\").SetElement(0, \"\"\" input = self.GetUnstructuredGridInput() output = self.GetUnstructuredGridOutput() output.DeepCopy(input) |
|
(0007675) David Karelitz (reporter) 2007-05-17 14:04 |
bug tracker ate my cut and paste. script is: import paraview import sys import math # Connect to the "builtin" #(in-process) ParaView server ... #================================= paraview.ActiveConnection = paraview.Connect() # Create an Exodus reader to load our data ... #============================================== reader = paraview.CreateProxy("sources", "ExodusReader") reader.GetProperty("FileName").SetElement(0, "/home/dbkarel/SampleData/disk_out_ref.e") reader.UpdateVTKObjects() reader.UpdatePipeline() reader.UpdatePropertyInformation() paraview.RegisterProxy(reader, "my reader") # Create our programmable filter and set its program ... #======================================================== filter = paraview.CreateProxy("filters", "Programmable Filter") filter.GetProperty("Script").SetElement(0, """ input = self.GetUnstructuredGridInput() output = self.GetUnstructuredGridOutput() output.DeepCopy(input) """) # Connect the reader output to # the programmable filter input ... #=================================== filter.GetProperty("Input").AddProxy(reader.SMProxy, 0) filter.UpdateVTKObjects() paraview.RegisterProxy(filter, "my programmable filter") # Perform a sum operation #========================= sum = paraview.CreateProxy("filters", "MinMax") sum.SetOperation("SUM") sum.UpdateVTKObjects() # Reduce the programmable filter output # data using our "max" algorithm, # returning just the maximum error value # (instead of transferring the entire # dataset to the client) #======================================= myoutput = paraview.Fetch(filter, sum) #---------------Now repeat-------------- # Create an Exodus reader to load our data ... #============================================== reader = paraview.CreateProxy("sources", "ExodusReader") reader.GetProperty("FileName").SetElement(0, "/home/dbkarel/SampleData/disk_out_ref.e") reader.UpdateVTKObjects() reader.UpdatePipeline() reader.UpdatePropertyInformation() paraview.RegisterProxy(reader, "my reader") # Create our programmable filter and set its program ... #======================================================== filter = paraview.CreateProxy("filters", "Programmable Filter") filter.GetProperty("Script").SetElement(0, """ input = self.GetUnstructuredGridInput() output = self.GetUnstructuredGridOutput() output.DeepCopy(input) """) # Connect the reader output to # the programmable filter input ... #=================================== filter.GetProperty("Input").AddProxy(reader.SMProxy, 0) filter.UpdateVTKObjects() paraview.RegisterProxy(filter, "my programmable filter") # Perform a sum operation #========================= sum = paraview.CreateProxy("filters", "MinMax") sum.SetOperation("SUM") sum.UpdateVTKObjects() # Reduce the programmable filter output # data using our "max" algorithm, # returning just the maximum error value # (instead of transferring the entire # dataset to the client) #======================================= myoutput = paraview.Fetch(filter, sum) |
|
(0007676) Utkarsh Ayachit (administrator) 2007-05-17 14:14 |
I had forgotten to commit a file this morning, I've did that a short while ago, that may have been causing the failure. I ran the script multiple times and it worked just fine for me. However note that calling paraview.Connect() in a python script run through the python shell in the qt client is hazardous since it leads to multiple server connection (which may explain the segfault). When running a script thru the python shell in the Qt client, one does not need to do connect at all, the paraview.ActiveConnection is initialized by default the connection the client is currently connected to. |
|
(0007677) David Karelitz (reporter) 2007-05-17 14:15 |
Looks to be fixed after the programmable filter fix was checked in |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2011-06-16 13:10 | Zack Galbreath | Category | => (No Category) |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |