[Paraview] Uninitialized pointer in pqPythonShell::pqImplementation

OSHIMA Takuya oshima at eng.niigata-u.ac.jp
Sun Oct 14 03:58:57 EDT 2007


Hi,

I tried the latest CVS of ParaView3 built with MSVC++ and encountered
a crash after selecting Tools->Python Shell. A bit of debugging
indicates it's because in ParaView3/Qt/Python/pqPythonShell.cxx

vtkPVPythonInteractiveInterpretor* Interpreter

in struct pqPythonShell::pqImplementation is not initialized in ctor
so if it has an uninitialized non-null value

   if (this->Interpreter)

at line 95 and hence the subsequent line 104 of pqPythonShell.cxx

      this->Interpreter->MakeCurrent();

are executed against a non-allocated object. I'm not sure if this is
the correct fix but changing line 54 from

    : Console(Parent)

to

    : Console(Parent), Interpreter(NULL)

fixed the problem for me.

Regards,
Takuy OSHIMA


More information about the ParaView mailing list