[Zope-dev] Strange Problem with a Product using SWIG Python Proxy Classes

Dieter Maurer dieter@handshake.de
Fri, 3 Jan 2003 20:33:00 +0100


Sean Gillies wrote at 2003-1-2 12:52 -0700:
 > My question concerns the use of SWIG Python proxy classes in a
 > Zope Product.  In the ZDG and elsewhere, I have seen the statement
 > that if an object is pickleable, it can be used as a persistent
 > object in a Zope Product.  In my experience, my SWIG Python proxy
 > classes are pickleable, can be stored in a ZODB, the Product that
 > uses them can be installed in Zope, instances of the Product
 > classes can be added and work, but on a restart of Zope, the
 > instances of my Product classes are broken and will cause Zope
 > to segfault on any attempt to access the proxy class.  I am
 > using Python 2.1.3 with threads and the thread stack size patch
 > built on OS X 10.2 and Zope 2.6.0.  I've had no other problems
 > with Python or Zope on this machine until I began developing this
 > new Product.
Sounds like an "unpickling" problem.

For security reasons, "unpickling" is quite restricted.
Objects must have special declarations to be "unpicklable".

Try to unpickle your objects and see whether this produces any errors.


Dieter