segmentation fault when unpickling an object in another Python instance
Raik Gruenberg
graik at web.de
Wed Nov 6 14:17:01 EST 2002
Hi all,
I have got some home-made class. From within the same Python interpreter
I can create, dump and load it back without any problem. But, if I try
to load it after re-starting the interpreter, I end up with a
segmentation fault.
Example (Traj is the trouble maker, Load and Dump are just wrappers for
cPickle.load and dump):
from Traj import Traj
from tools import Load, Dump
t = Traj(['../test/lig.pdb'], '../test/lig.pdb')
Dump( t, 't.t' )
-----
... NOW RESTART PYTHON ...
-----
>>> from tools import *
>>> Load( 't.t' )
Process Python segmentation fault
It's all the same regardless whether I use Python 2.2 or 2.1. Switching
to pickle.load and dump doesn't change anything either. However, only
this particular class is affected.
Given the segmentation fault, at least, some sort of Python bug must be
involved, right? Obviously, it is also somewhat the fault of this
particular class. I narrowed down the problem somewhat. But, before
bothering you with all the details, perhaps anyone knows this problem or
has some promising idea???
Thanks for any hints/suggestions!
Raik
More information about the Python-list
mailing list