From: Michael D. <md...@st...> - 2007-09-05 15:48:29
|
Thanks. This patch looks good -- apologies for my sloppy confusion of Python/C++ deletes. I just committed this patch (r3790) with one exception: as your comment suggests, when get_image is called and image == NULL, it throws and exception. Cheers, Mike Paul Kienzle wrote: > On Wed, Sep 05, 2007 at 07:13:27AM -0400, Michael Droettboom wrote: >> Jouni K. Seppänen wrote: >>> Paul Kienzle <pki...@ni...> writes: >>> >>> [segfaults] >>>> Is there something in the last couple of weeks which might cause this? >>> Some changes in font handling caused segfaults for me, and it turned out >>> to be a bug in an old version of freetype: >>> >>> http://article.gmane.org/gmane.comp.python.matplotlib.general/10062 >>> >>> Try running python under gdb, or using strace/truss/ktrace to see what >>> is happening right before the segfault. >> I'm not able to reproduce anything amiss on my Linux box. > > I'm able to eliminate the problem by setting image=NULL after deleting it. > > I did some mods to the refcount handling so that it consistently uses > XINC/XDEC for images and INC/DEC for glyphs. > > I added in INCREF to get_glyph(); you don't seem to call it so it didn't > show up as an error without. > > See attached patch. Let me know if I should post it to svn. > > - Paul > > |