rtyler / py-yajl

py-yajl provides Python bindings for the Yajl JSON encoder/decoder library
http://rtyler.github.com/py-yajl
74 stars 18 forks source link

Seeing "Fatal Python Error- dellocating None" #6

Closed indigoviolet closed 14 years ago

indigoviolet commented 14 years ago

This claims that it could be because of incorrect DECREF or deallocation of Py_None. http://mail.python.org/pipermail/python-list/2006-October/1078114.html

I can try to narrow things down further (but this was in a large dataset and I don't want to do it right now) if you need me to.

rtyler commented 14 years ago

Do you have a sample JSON dataset that I can use to reproduce this?

Additionally, was this on .loads or on .dumps?

Thanks :)

indigoviolet commented 14 years ago

Definitely .loads. I'll try to get a sample dataset, not sure how easy it is narrow it down.

indigoviolet commented 14 years ago

Let's hope this works-

Here's a test script and some data that causes this error when I run it:

http://dl.dropbox.com/u/772095/test.py http://dl.dropbox.com/u/772095/data (33MB)

The error isn't on a specific value (I don't think), since it fails reproducibly after a certain number of lines in the data file, but not if I try to subset those lines from the file.

Here's what the output looks like when I run

python test.py < data:

.... 309000 310000 311000 312000 313000 314000 315000 316000 317000 318000 319000 320000 321000 Fatal Python error: deallocating None zsh: abort python test.py < data

Python 2.6 (r26:66714, Apr 2 2009, 13:18:58) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2

uname -a Linux xxx.xxx.xxx.com 2.6.20-39 #1 SMP Mon Mar 16 20:33:46 PDT 2009 x86_64 x86_64 x86_64 GNU/Linux

rtyler commented 14 years ago

Well fancy that, I have a machine that looks eerily similar. I'll add this to my queue for the evening and see if I can cut a 0.3.1 release by morning :)

rtyler commented 14 years ago

Fixed in SHA: 0d324ad4a8909add4f729be4e68bdfb2a2035514

Thanks for the bug report, I'm going to add this to my set of tests

indigoviolet commented 14 years ago

that was very quick, thank you for the bugfix