[Numpy-discussion] segfault when pickling PyObject arrays

Tavis Rudd tavis at calrudd.com
Tue Jun 5 14:36:03 EDT 2001


Paul,
I just installed 20.1.0b1 and got the same segfault.
I'm using Suse 6.4

Note that if I dump it and load it from a single process it 
works fine.  The error only occurs when I try to load it 
from a separate process.

Tavis

On Tuesday 05 June 2001 11:14, Paul F. Dubois wrote:
> Travis:
> Works for me ....using either dump or dumps, load or
> loads I used Numeric 20.1.0b1 / Python 2.1 / RedHat 6.2


> On Tue, 05 Jun 2001, Tavis Rudd wrote:
> > Hi,
> > I've been having difficultly pickling arrays with the
> > type PyObject using Numeric.  I haven't tried it with
> > MA but I assume the same problem exists.
> >
> > This script works
> > =====================================
> > from cPickle import dump, load
> > from Numeric import array, PyObject
> >
> > def pickleIt(obj, fileName):
> >     fp = open(fileName, 'w')
> >     dump(obj, fp)
> >     fp.close
> >
> > def loadIt(fileName):
> >     fp = open(fileName, 'r')
> >     obj = load(fp)
> >     fp.close()
> >     return obj
> >
> > a = array(['abc', 'def', 'ghi'], PyObject)
> > pickleIt(a, 'test.pickle')
> >
> > This script segfaults
> > ====================================
> > #  ... same imports and func defs as above
> > b = loadIt()
> > print b
> >
> > ====================================
> >
> > I first noticed this when trying to pickle arrays
> > constructed from lists of mx.DateTime objects.
> >
> > Numeric 19.1.0
> > Python 2.1 final
> > Linux 2.2.18
> >
> > Is this a reproduceable bug or something unique to my
> > setup?
> > Tavis
> >
> > _______________________________________________
> > Numpy-discussion mailing list
> > Numpy-discussion at lists.sourceforge.net
> > http://lists.sourceforge.net/lists/listinfo/numpy-discu
> >ssion
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/numpy-discuss
>ion




More information about the NumPy-Discussion mailing list