Re: [matplotlib-devel] backend_driver errors

2007-09-05 Thread Michael Droettboom
It's certainly possible my text rotation changes have caused this.  I did all 
my testing on Linux, and didn't see any problems there.

It it the text_rotation.py example that segfaults for you or something else?

I'll have to look into this further when I get in to work.

Cheers,
Mike

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] backend_driver errors

2007-09-05 Thread Jouni K . Seppänen
Paul Kienzle <[EMAIL PROTECTED]> 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.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] backend_driver errors

2007-09-05 Thread Michael Droettboom
Jouni K. Seppänen wrote:
> Paul Kienzle <[EMAIL PROTECTED]> 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 would try Jouni's suggestion, and if that doesn't work, please try 
going back to revision 3762, which is before I made a number of changes 
to the memory management of font buffers.  If that works, but HEAD 
doesn't a traceback from gdb would be useful.

Cheers,
Mike



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] backend_driver errors

2007-09-05 Thread Manuel Metz
Don't know whether this is related, but I now get the following error:

File 
"/py.src/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py", 
line 669, in draw_tex
 w, h, bl = self.get_text_width_height_baseline(s, prop, ismath)
AttributeError: RendererPS instance has no attribute 
'get_text_width_height_baseline'

with the the latest svn trunk ...

Manuel

Paul Kienzle wrote:
> In checking the mathtext rotation feature I found that the graph displayed
> fine, but python segfault'd shortly after displaying it.  Most (all) examples
> are failing for me for svn r3778, even after rebuilding and reinstalling
> everything.
> 
> Is there something in the last couple of weeks which might cause this?
> 
> Running backend_drivers, the Agg plots are fine.  
> None of the PS plots are viewable with Preview.app.  
> I don't have an svg viewer handy.
> 
> I'm running macpython 2.5 fat binary build on OS X 10.4 with wx 2.8.
> 
> Anyone else having problems with it?
> 
>   - Paul
> 
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

-- 
---
   Manuel Metz    [EMAIL PROTECTED]
   Argelander Institut fuer Astronomie
   Auf dem Huegel 71 (room 3.06)
   D - 53121 Bonn

   E-Mail: [EMAIL PROTECTED]
   Web:www.astro.uni-bonn.de/~mmetz
   Phone:  (+49) 228 / 73-3660
   Fax:(+49) 228 / 73-3672
---

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] backend_driver errors

2007-09-05 Thread Michael Droettboom
I don't think it's related.  But definitely a bug...  I forgot to test 
my baseline code with text.usetex turned on.

I just submitted a fix in r3781.

Cheers,
Mike

Manuel Metz wrote:
> Don't know whether this is related, but I now get the following error:
> 
> File 
> "/py.src/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py", 
> line 669, in draw_tex
>  w, h, bl = self.get_text_width_height_baseline(s, prop, ismath)
> AttributeError: RendererPS instance has no attribute 
> 'get_text_width_height_baseline'
> 
> with the the latest svn trunk ...
> 
> Manuel
> 
> Paul Kienzle wrote:
>> In checking the mathtext rotation feature I found that the graph displayed
>> fine, but python segfault'd shortly after displaying it.  Most (all) examples
>> are failing for me for svn r3778, even after rebuilding and reinstalling
>> everything.
>>
>> Is there something in the last couple of weeks which might cause this?
>>
>> Running backend_drivers, the Agg plots are fine.  
>> None of the PS plots are viewable with Preview.app.  
>> I don't have an svg viewer handy.
>>
>> I'm running macpython 2.5 fat binary build on OS X 10.4 with wx 2.8.
>>
>> Anyone else having problems with it?
>>
>>  - Paul
>>
>> -
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>> ___
>> Matplotlib-devel mailing list
>> Matplotlib-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] backend_driver errors

2007-09-05 Thread Paul Kienzle
On Wed, Sep 05, 2007 at 01:40:02PM +0300, Jouni K. Seppänen wrote:
> Paul Kienzle <[EMAIL PROTECTED]> 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.

Running gdb first:

 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_INVALID_ADDRESS at address: 0x65c4a402
 0x65c4a402 in ?? ()
 (gdb) bt
 #0  0x65c4a402 in ?? ()
 #1  0x0265c5e1 in FT_Glyph_Get_CBox (glyph=0x54463a3a, bbox_mode=1634552114, 
acbox=0x6567) at /Users/pkienzle/Packages/freetype-2.3.5/src/base/ftglyph.c:534
 Previous frame inner to this frame (corrupt stack?)

So the problem seems to be in freetype.

The link above says:

 Looks like a freetype bug: the following code segfaults when linked
 against libfreetype.6.3.10 but not when linked against
 libfreetype.6.3.16. Freetype has some code to read dfont files, which
 apparently had a bug in the older version, and this is triggered by the
 new code that reads in all font files.

I don't understand why it is referring to 6.3.16 when 2.3.5 was released
in July 2007, unless 6.3.16 means May 16, 2006.

- Paul

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] backend_driver errors

2007-09-05 Thread Jouni K . Seppänen
Paul Kienzle <[EMAIL PROTECTED]> writes:

>  Looks like a freetype bug: the following code segfaults when linked
>  against libfreetype.6.3.10 but not when linked against
>  libfreetype.6.3.16.
>
> I don't understand why it is referring to 6.3.16 when 2.3.5 was released
> in July 2007, unless 6.3.16 means May 16, 2006.

Oh, I was referring to the version numbers in the filenames (is it
called "soversion"?). I think libfreetype.6.3.16.dylib is a file from
Freetype 2.3.5.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] backend_driver errors

2007-09-05 Thread Paul Kienzle
On Wed, Sep 05, 2007 at 07:13:27AM -0400, Michael Droettboom wrote:
> Jouni K. Seppänen wrote:
> > Paul Kienzle <[EMAIL PROTECTED]> 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

Index: src/ft2font.cpp
===
--- src/ft2font.cpp (revision 3785)
+++ src/ft2font.cpp (working copy)
@@ -743,8 +743,7 @@
 {
   _VERBOSE("FT2Font::~FT2Font");
 
-  if(image)
-Py::_XDECREF(image);
+  Py_XDECREF(image);
   FT_Done_Face( face );
 
   for (size_t i=0; i-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] backend_driver errors

2007-09-05 Thread Michael Droettboom
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 <[EMAIL PROTECTED]> 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
> 
> 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] examples errors

2007-09-05 Thread Paul Kienzle
I went through the demo list again today.  Here are some problems:

$ python fonts_demo.py 
Traceback (most recent call last):
  File "fonts_demo.py", line 31, in 
font.set_name('Script MT')
AttributeError: 'FontProperties' object has no attribute 'set_name'

I'm getting segfaults for the following on wxagg for os x:

  annotation_demo
  polar_*
  transoffset

The polar demos work for pdf but not agg from backend_driver.py

- Paul

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel