Menu

#187 segfault with matrix.recalculate()

next
open
nobody
None
2critical
2018-07-07
2010-10-03
Dominik K.
No

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".

Discussion

  • Dominik K.

    Dominik K. - 2010-10-03
     
  • Knut Franke

    Knut Franke - 2010-10-08

    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. :-)

     
  • High Performance Coder

    • Group: current_stable --> 1.D1
     
  • High Performance Coder

    I can't assess this one. I don't know Python.

     
  • High Performance Coder

    • Priority: 5 --> normal
     
  • High Performance Coder

    • Priority: normal --> 4normal
     
  • High Performance Coder

    • Group: 1.D1 --> 1.D3
     
  • High Performance Coder

    • Group: 1.D3 --> 1.D5
     
  • High Performance Coder

    • Group: 1.D5 --> next
     
  • High Performance Coder

    • Priority: 4normal --> 2critical
     
  • gbm

    gbm - 2018-07-07

    This is no longer a bug, Try attached script. It runs without problem with current version.

     

Log in to post a comment.

MongoDB Logo MongoDB