On Sun, Jul 1, 2012 at 11:48 AM, Kai Sterker <kai.ster...@gmail.com> wrote:
> http://bugs.python.org/issue15236 > > Now we'll have to wait and see. Turns out it is our fault after all. Problems with Python reference counting. However, reporting the issue was quite helpful in getting some valuable information about where to look. I've made some changes and I would believe the problem to be gone (though it's hard to say with something that happens infrequently). Here's some stuff that I have learned in the exercise: * Py_None needs to be INCREF'd before storing it in a tuple/list (like everything else). * PyTuple_SET_ITEM should only be used on empty tuples, but not to replace existing elements. * For every call into the Python C API, take good notice whether methods return a new or borrowed reference, and whether they might steal the reference you're passing to them. This proved to be a useful and quite exhaustive article on the matter: http://edcjones.tripod.com/refcount.html Please let me know if the issue still comes up after the changes I've made. Kai _______________________________________________ Adonthell-devel mailing list Adonthell-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/adonthell-devel