segmentation fault when unpickling an object in another Python instance
Terry Reedy
tjreedy at udel.edu
Wed Nov 6 14:56:28 EST 2002
"Raik Gruenberg" <graik at web.de> wrote in message
news:3DC96AAD.9090503 at web.de...
> 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?
Yes, it remains Guido intention that CPython never seg fault.
> 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???
There have been some known problems with CPickle and some patches, but
in the absence of keyword searching of the SourceForge database, I
won't guess as to specifics and relation to your problem. You may be
asked for minimum example that exhibits problem.
TJR
More information about the Python-list
mailing list