User interface example malloc error and possible installation bug

Hi Everyone,

I compiled the latest matplotlib against python 2.5.4 on OSX Leopard
(Tcl/Tk 8.4 default installation from OSX).
It complained about not finding the freetype headers but this was
fixed by including /usr/local in the darwin list (which is by default
empty?) in setupext.py.
This might be a bug in the latest trunk, can anyone else test this on OSX?
Now when I try to run the GUI example on:
http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_tk.html
I get the following errors:

python test.py
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8:
Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Segmentation fault

Does anyone know what might be wrong here?

Kind regards,

Pim Schellart

P.S. I tried the same with a MacPython 2.6 installation and get
similar errors (see previous post).