Re: [Pyobjc-dev] Pickling OC_PythonFloat causes a crash
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2006-05-19 14:34:12
|
On 19-mei-2006, at 16:19, Luc Heinrich wrote: > On 19 mai 06, at 13:14, Luc Heinrich wrote: > >> I just spent two days tracking down a weird (and bad) crash in my >> PyObjC application, which turns out to be a problem of pickling >> (using cPickle, fwiw) an instance of what I thought was a python >> float but which actually is a objc._pythonify.OC_PythonFloat. > > Here's a contrived example to reproduce the crash: > > from cPickle import dumps > from PyObjCTools import Conversion > from Foundation import NSMutableDictionary > > d = NSMutableDictionary.alloc().init() > d.setObject_forKey_(42.0, "answer") > d = Conversion.pythonCollectionFromPropertyList(d) > > p = dumps(d) # <--- BOOOOOOM, segfault! I get the same crash (both using python 2.3.5 and the latest-and- greated version of 2.5a). This is likely to be a bug in python itself, I'll have a look. Ronald |