Hi.
There's an segmentation fault with the following Python code (example from manual v0.2):
matrix = newMatrix("m-test", 10, 20)
matrix.recalculate()
I think, the bug is connected with following code (file "PythonScript.cpp"):
bool PythonScript::compile(bool for_eval)
[...]
} else if(Context->inherits("Matrix")) {
[...]
PyObject *ret = PyRun_String(
"def cell(*arg):\n"
"\ttry: return self.cell(arg[0],arg[1])\n"
"\texcept(IndexError): return self.cell(i,j)\n",
Py_file_input, localDict, localDict);
It is no problem to start python code within a table which gets into Context->inherits("Table"). At this point, I couldn't understand the python/SIP/C++?-mixed code.
The backtrace is attached. Maybe it is faulty because of the "CRC mismatches".
I've seen similar problems with other cases in which SciDAVis executes a Python script which calls a SciDAVis function that tries to run some other Python code. Not sure whether it's possible to make that work reliably. (I don't think either the Context->inherits("Matrix") block or the CRC mismatch warning has anything to do with this).
Knut
P.S.: Very good bug report; erything one might ask for is included. :-)
I can't assess this one. I don't know Python.
This is no longer a bug, Try attached script. It runs without problem with current version.