crash on matplotlib.matlab import on win32 - solution and question...

I continued investigating the crash occuring on my

    > laptop, and found a "solution" :slight_smile: The problem occur
    > precisely in font_manager.py, in the function
    > createFontDict. In this function, there is a loop over a
    > fontfiles list, that for me is made of 353 files. This
    > loop works ok for 221 fontfiles, then crash... Now maybe
    > this is a lot of font files compared to typical windows
    > install, hence the crash on my system? At least I am sure
    > this is a difference between the other WinXP and Win2000
    > laptop I tested, explaining why only mine did crash...I
    > am now confident this is the origin of my Laptop problem,
    > not some strange Voodoo malediction :wink: Why this occur
    > with numarray and not numeric is maybe voodoo-related,
    > though ;-)). During this Loop, special default font
    > files are found, and renamed serif, sans-serif,
    > cursive...in fact multiple occurrence of each default
    > font is found (3 monospace for example)...Again, I do not
    > understand fully the routine yet but maybe this is a
    > problem, (especially as a comment before the default font
    > attribution mention thet this algorithm need improvement
    > :wink: ) I guess adding multiple fonts in the fontdict under
    > the same name, will induce a destruction of the previous
    > font stored with this key/name...now if prop contains a
    > numerix array, this can explain the different behavior of
    > numarray/numeric :slight_smile: Now if I stop the loop before this
    > deadly 221th font, from matplotlib.matlab import *
    > complete and I am able to plot in a TkAgg window my
    > sin(x) :slight_smile: After that, this dictionary seems pickled in a
    > cache and this routine is never run again, explaining
    > maybe why this behavior was never noted: maybe it does
    > not occur often, and once the loop has completed you are
    > safe.

    > I am ready to do more testing if you need more info about
    > this, but I feel from now on maybe somebody with better
    > knowledge of the matplotlib internals will be faster than
    > me to locate the problem...So if I can still do
    > something, please tell me...

I doubt that it is related to the number of fonts, but your hunch that
it is related to having multiple fonts that match the same attribute
set sounds more likely. It would be interesting on the line before
the crash to print

  fontdict.has_key(key)

where d is the dict in question and key is the dictionary key, to see
if in fact it is the replacement of a font in the dictionary that is
triggering the bug. Ie, does the crash happen if and only if the dict
already has the key. If so, a temporary workaround would be to do

  if fontdict.has_key(key): continue

but I would like to get the ultimate bug fixed because these tend to
come back to haunt you. Actually, it may be harder than this because
if I recall correctly, fontdict is a dict of dicts of dicts... Paul
may be able to offer some guidance here - he wrote the font_manager
module. Though the blame for memory management rests squarely on my
shoulders, in ft2font.cpp.

Another thing that might be helpful is if you could zip up your font
dirs and send them to me, I could try and replicate the bug on my
system. If this file is too large to email, you can upload it at
http://nitace.bsd.uchicago.edu:8080/files/share.

Why you see this on the numarray build and not the other build is
beyond me - fonts have nothing to do with numerix!

Thanks for your investigations.

JDH

I doubt that it is related to the number of fonts, but your hunch that
it is related to having multiple fonts that match the same attribute
set sounds more likely. It would be interesting on the line before the
crash to print

  fontdict.has_key(key)

where d is the dict in question and key is the dictionary key, to see if
in fact it is the replacement of a font in the dictionary that is
triggering the bug. Ie, does the crash happen if and only if the dict
already has the key. If so, a temporary workaround would be to do

  if fontdict.has_key(key): continue

Hum, I checked the routine a little bit more and it seems this in fact
is already done: there is an auxiliary dict that exist for this purpose:
not to add in the main font dict 2 times the same font...so maybe this
is not the origin of the problem, I now have another idea of the origin
of the problem, wich I think is related to my laptop, see below

Another thing that might be helpful is if you could zip up your font
dirs and send them to me, I could try and replicate the bug on my
system. If this file is too large to email, you can upload it at
http://nitace.bsd.uchicago.edu:8080/files/share.

I tried to upload my font directory, but I did not manage to do it,
maybe the website does not accept a 20 Mb file? Or there is simply too
much trafic, I could try again later if needed...

But what I have done is add some comments to check what happen exactly
in the loop, and check which font file causes the crash:
Here is the transcript:
C:\Python23>python
Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.

from matplotlib.matlab import *

importing numerix
importing mlab
  mlab - done import division from future
  mlab - import sys
  mlab - import numerix
  mlab - import numerix*
  mlab - import cbook
importing cm
importing _matlab_helpers
importing mlab - again
importing axes
  -axes:done importing __future
  -axes:importing math,sys
  -axes:importing numerix
  -axes:importing mlab
  -axes:importing artist
  -axes:importing axis
    axis:imported numerix
    axis:imported matplotlib
    axis:imported patches
    axis:imported ticker
    axis:imported ticker again
    axis:imported transforms
    axis:importing font_mananger
mid -font mngr 2
mid -font mngr 3
->creating list of font path
->creating list of font dictionary
-> import cPickle or pickle
importing cPickle as pickle
pickle.load of file C:\Python23\share\matplotlib\.ttffont.cache
pickle.load failed
in createFontDict
1 / 353 : C:\Python23\share\matplotlib\cmex10.ttf -> adding in dict
2 / 353 : C:\Python23\share\matplotlib\cmmi10.ttf -> adding in dict
3 / 353 : C:\Python23\share\matplotlib\cmr10.ttf -> adding in dict
4 / 353 : C:\Python23\share\matplotlib\VeraMono.ttf -> adding in dict
5 / 353 : C:\Python23\share\matplotlib\cmsy10.ttf -> adding in dict
6 / 353 : C:\Python23\share\matplotlib\VeraSeBd.ttf -> adding in dict
7 / 353 : C:\Python23\share\matplotlib\cmtt10.ttf -> adding in dict
8 / 353 : C:\Python23\share\matplotlib\Vera.ttf -> adding in dict
9 / 353 : C:\Python23\share\matplotlib\VeraBI.ttf -> adding in dict
10 / 353 : C:\Python23\share\matplotlib\VeraSe.ttf -> adding in dict
11 / 353 : C:\Python23\share\matplotlib\VeraMoIt.ttf -> adding in dict
12 / 353 : C:\Python23\share\matplotlib\VeraBd.ttf -> adding in dict
13 / 353 : C:\Python23\share\matplotlib\VeraMoBd.ttf -> adding in dict
14 / 353 : C:\Python23\share\matplotlib\VeraIt.ttf -> adding in dict
15 / 353 : C:\Python23\share\matplotlib\VeraMoBI.ttf -> adding in dict
16 / 353 : c:\windows\fonts\upcii.ttf -> adding in dict
17 / 353 : c:\windows\fonts\cordiab.ttf -> adding in dict
18 / 353 : C:\WINDOWS\Fonts\UPCFBI.TTF -> adding in dict
19 / 353 : C:\WINDOWS\Fonts\UPCJB.TTF -> adding in dict
20 / 353 : c:\windows\fonts\angsab.ttf -> adding in dict
21 / 353 : c:\windows\fonts\browai.ttf -> adding in dict
22 / 353 : C:\WINDOWS\Fonts\raavi.ttf -> adding in dict
23 / 353 : c:\windows\fonts\micross.ttf -> adding in dict
24 / 353 : C:\WINDOWS\Fonts\lvnm.ttf -> adding in dict
25 / 353 : c:\windows\fonts\times.ttf -> adding in dict
26 / 353 : c:\windows\fonts\wingdng2.ttf -> adding in dict
27 / 353 : C:\WINDOWS\Fonts\tradbdo.ttf -> adding in dict
28 / 353 : c:\windows\fonts\upcji.ttf -> adding in dict
29 / 353 : C:\WINDOWS\Fonts\ANTQUAI.TTF -> adding in dict
30 / 353 : c:\windows\fonts\trebucbd.ttf -> adding in dict
31 / 353 : c:\windows\fonts\arialnb.ttf -> adding in dict
32 / 353 : C:\WINDOWS\Fonts\BROWAUB.TTF -> adding in dict
33 / 353 : c:\windows\fonts\outlook.ttf -> adding in dict
34 / 353 : c:\windows\fonts\couri.ttf -> adding in dict
35 / 353 : c:\windows\fonts\browau.ttf -> adding in dict
36 / 353 : c:\windows\fonts\angsaz.ttf -> adding in dict
37 / 353 : c:\windows\fonts\cordiauz.ttf -> adding in dict
38 / 353 : C:\WINDOWS\Fonts\simpfxo.ttf -> adding in dict
39 / 353 : c:\windows\fonts\verdana.ttf -> adding in dict
40 / 353 : c:\windows\fonts\arial.ttf -> adding in dict
41 / 353 : c:\windows\fonts\arialn.ttf -> adding in dict
42 / 353 : C:\WINDOWS\Fonts\georgiaz.ttf -> adding in dict
43 / 353 : C:\WINDOWS\Fonts\eucsymb.ttf -> adding in dict
44 / 353 : C:\WINDOWS\Fonts\ANGSAB.TTF -> adding in dict
45 / 353 : C:\WINDOWS\Fonts\micross.ttf -> adding in dict
46 / 353 : c:\windows\fonts\tahoma.ttf -> adding in dict
47 / 353 : c:\windows\fonts\gothicb.ttf -> adding in dict
48 / 353 : c:\windows\fonts\l_10646.ttf -> adding in dict
49 / 353 : c:\windows\fonts\andlso.ttf -> adding in dict
50 / 353 : c:\windows\fonts\trebucbi.ttf -> adding in dict
51 / 353 : c:\windows\fonts\mriamfx.ttf -> adding in dict
52 / 353 : C:\WINDOWS\Fonts\arialbd.ttf -> adding in dict
53 / 353 : C:\WINDOWS\Fonts\ANGSAZ.TTF -> adding in dict
54 / 353 : C:\WINDOWS\Fonts\trebucbd.ttf -> adding in dict
55 / 353 : C:\WINDOWS\Fonts\davidbd.ttf -> adding in dict
56 / 353 : c:\windows\fonts\framd.ttf -> adding in dict
57 / 353 : c:\windows\fonts\eumat2.ttf -> adding in dict
58 / 353 : C:\WINDOWS\Fonts\cour.ttf -> adding in dict
59 / 353 : C:\WINDOWS\Fonts\verdanaz.ttf -> adding in dict
60 / 353 : C:\WINDOWS\Fonts\marlett.ttf -> adding in dict
61 / 353 : c:\windows\fonts\browauz.ttf -> adding in dict
62 / 353 : c:\windows\fonts\bookosb.ttf -> adding in dict
63 / 353 : c:\windows\fonts\euclid.ttf -> adding in dict
64 / 353 : C:\WINDOWS\Fonts\david.ttf -> adding in dict
65 / 353 : c:\windows\fonts\ariali.ttf -> adding in dict
66 / 353 : c:\windows\fonts\upcdbi.ttf -> adding in dict
67 / 353 : c:\windows\fonts\cordiai.ttf -> adding in dict
68 / 353 : C:\WINDOWS\Fonts\BROWAB.TTF -> adding in dict
69 / 353 : C:\WINDOWS\Fonts\rodtr.ttf -> adding in dict
70 / 353 : c:\windows\fonts\upcjl.ttf -> adding in dict
71 / 353 : c:\windows\fonts\simpo.ttf -> adding in dict
72 / 353 : C:\WINDOWS\Fonts\ANGSAUI.TTF -> adding in dict
73 / 353 : c:\windows\fonts\palai.ttf -> adding in dict
74 / 353 : C:\WINDOWS\Fonts\georgia.ttf -> adding in dict
75 / 353 : c:\windows\fonts\impact.ttf -> adding in dict
76 / 353 : C:\WINDOWS\Fonts\CORDIAUI.TTF -> adding in dict
77 / 353 : C:\WINDOWS\Fonts\ARIALNBI.TTF -> adding in dict
78 / 353 : C:\WINDOWS\Fonts\OUTLOOK.TTF -> adding in dict
79 / 353 : c:\windows\fonts\wingding.ttf -> adding in dict
80 / 353 : c:\windows\fonts\cordia.ttf -> adding in dict
81 / 353 : c:\windows\fonts\arialni.ttf -> adding in dict
82 / 353 : c:\windows\fonts\euextra.ttf -> adding in dict
83 / 353 : C:\WINDOWS\Fonts\lucon.ttf -> adding in dict
84 / 353 : C:\WINDOWS\Fonts\mriamfx.ttf -> adding in dict
85 / 353 : C:\WINDOWS\Fonts\euextrab.ttf -> adding in dict
86 / 353 : c:\windows\fonts\upcjb.ttf -> adding in dict
87 / 353 : c:\program files\common files\microsoft
shared\equation\mtextra.ttf -> adding in dict
88 / 353 : C:\WINDOWS\Fonts\ahronbd.ttf -> adding in dict
89 / 353 : c:\windows\fonts\gothici.ttf -> adding in dict
90 / 353 : c:\windows\fonts\davidbd.ttf -> adding in dict
91 / 353 : c:\windows\fonts\comicbd.ttf -> adding in dict
92 / 353 : C:\WINDOWS\Fonts\UPCKB.TTF -> adding in dict
93 / 353 : c:\windows\fonts\arbli___.ttf -> adding in dict
94 / 353 : C:\WINDOWS\Fonts\georgiab.ttf -> adding in dict
95 / 353 : C:\WINDOWS\Fonts\GOTHICI.TTF -> adding in dict
96 / 353 : C:\WINDOWS\Fonts\UPCIB.TTF -> adding in dict
97 / 353 : C:\WINDOWS\Fonts\palai.ttf -> adding in dict
98 / 353 : C:\WINDOWS\Fonts\ARIALNB.TTF -> adding in dict
99 / 353 : c:\windows\fonts\tahomabd.ttf -> adding in dict
100 / 353 : C:\WINDOWS\Fonts\mriam.ttf -> adding in dict
101 / 353 : C:\WINDOWS\Fonts\comic.ttf -> adding in dict
102 / 353 : c:\windows\fonts\angsa.ttf -> adding in dict
103 / 353 : c:\windows\fonts\simpfxo.ttf -> adding in dict
104 / 353 : c:\windows\fonts\mangal.ttf -> adding in dict
105 / 353 : c:\windows\fonts\georgiai.ttf -> adding in dict
106 / 353 : c:\windows\fonts\upclb.ttf -> adding in dict
107 / 353 : c:\windows\fonts\comic.ttf -> adding in dict
108 / 353 : C:\WINDOWS\Fonts\ARBLI___.TTF -> adding in dict
109 / 353 : C:\WINDOWS\Fonts\ANTQUABI.TTF -> adding in dict
110 / 353 : c:\windows\fonts\pala.ttf -> adding in dict
111 / 353 : C:\WINDOWS\Fonts\nrkis.ttf -> adding in dict
112 / 353 : C:\WINDOWS\Fonts\GARA.TTF -> adding in dict
113 / 353 : C:\WINDOWS\Fonts\l_10646.ttf -> adding in dict
114 / 353 : c:\windows\fonts\lucon.ttf -> adding in dict
115 / 353 : c:\windows\fonts\arialbd.ttf -> adding in dict
116 / 353 : C:\WINDOWS\Fonts\artrbdo.ttf -> adding in dict
117 / 353 : c:\windows\fonts\estre.ttf -> adding in dict
118 / 353 : c:\windows\fonts\palab.ttf -> adding in dict
119 / 353 : C:\WINDOWS\Fonts\trado.ttf -> adding in dict
120 / 353 : C:\WINDOWS\Fonts\GOTHICBI.TTF -> adding in dict
121 / 353 : C:\WINDOWS\Fonts\CORDIA.TTF -> adding in dict
122 / 353 : c:\windows\fonts\cour.ttf -> adding in dict
123 / 353 : c:\windows\fonts\verdanaz.ttf -> adding in dict
124 / 353 : C:\WINDOWS\Fonts\rod.ttf -> adding in dict
125 / 353 : c:\windows\fonts\artro.ttf -> adding in dict
126 / 353 : C:\WINDOWS\Fonts\BROWAZ.TTF -> adding in dict
127 / 353 : C:\WINDOWS\Fonts\BOOKOSB.TTF -> adding in dict
128 / 353 : c:\windows\fonts\rod.ttf -> adding in dict
129 / 353 : c:\windows\fonts\cordiaz.ttf -> adding in dict
130 / 353 : c:\windows\fonts\tradbdo.ttf -> adding in dict
131 / 353 : c:\windows\fonts\upcjbi.ttf -> adding in dict
132 / 353 : C:\WINDOWS\Fonts\webdings.ttf -> adding in dict
133 / 353 : C:\WINDOWS\Fonts\ANGSAI.TTF -> adding in dict
134 / 353 : C:\WINDOWS\Fonts\UPCJI.TTF -> adding in dict
135 / 353 : C:\WINDOWS\Fonts\timesbd.ttf -> adding in dict
136 / 353 : c:\windows\fonts\upclbi.ttf -> adding in dict
137 / 353 : C:\WINDOWS\Fonts\UPCDBI.TTF -> adding in dict
138 / 353 : c:\windows\fonts\frank.ttf -> adding in dict
139 / 353 : C:\WINDOWS\Fonts\ANTQUAB.TTF -> adding in dict
140 / 353 : C:\WINDOWS\Fonts\CORDIAZ.TTF -> adding in dict
141 / 353 : C:\WINDOWS\Fonts\ARIALNI.TTF -> adding in dict
142 / 353 : c:\windows\fonts\antquabi.ttf -> adding in dict
143 / 353 : c:\windows\fonts\upcdb.ttf -> adding in dict
144 / 353 : C:\WINDOWS\Fonts\UPCLI.TTF -> adding in dict
145 / 353 : C:\WINDOWS\Fonts\courbi.ttf -> adding in dict
146 / 353 : C:\WINDOWS\Fonts\CORDIAUB.TTF -> adding in dict
147 / 353 : C:\WINDOWS\Fonts\GARABD.TTF -> adding in dict
148 / 353 : c:\windows\fonts\verdanab.ttf -> adding in dict
149 / 353 : c:\windows\fonts\angsau.ttf -> adding in dict
150 / 353 : c:\windows\fonts\courbi.ttf -> adding in dict
151 / 353 : c:\windows\fonts\ariblk.ttf -> adding in dict
152 / 353 : C:\WINDOWS\Fonts\UPCEBI.TTF -> adding in dict
153 / 353 : c:\windows\fonts\georgiab.ttf -> adding in dict
154 / 353 : c:\windows\fonts\wingdng3.ttf -> adding in dict
155 / 353 : C:\WINDOWS\Fonts\UPCKL.TTF -> adding in dict
156 / 353 : c:\windows\fonts\browab.ttf -> adding in dict
157 / 353 : C:\WINDOWS\Fonts\andlso.ttf -> adding in dict
158 / 353 : c:\windows\fonts\bookosbi.ttf -> adding in dict
159 / 353 : c:\windows\fonts\angsaub.ttf -> adding in dict
160 / 353 : c:\windows\fonts\upcei.ttf -> adding in dict
161 / 353 : c:\windows\fonts\upckb.ttf -> adding in dict
162 / 353 : C:\WINDOWS\Fonts\fences.ttf -> adding in dict
163 / 353 : C:\WINDOWS\Fonts\tunga.ttf -> adding in dict
164 / 353 : c:\windows\fonts\eumat2b.ttf -> adding in dict
165 / 353 : C:\WINDOWS\Fonts\BROWAUI.TTF -> adding in dict
166 / 353 : C:\WINDOWS\Fonts\wingding.ttf -> adding in dict
167 / 353 : C:\WINDOWS\Fonts\mtextra.ttf -> adding in dict
168 / 353 : c:\windows\fonts\simpbdo.ttf -> adding in dict
169 / 353 : c:\windows\fonts\davidtr.ttf -> adding in dict
170 / 353 : C:\WINDOWS\Fonts\WINGDNG2.TTF -> adding in dict
171 / 353 : C:\WINDOWS\Fonts\mvboli.ttf -> adding in dict
172 / 353 : C:\WINDOWS\Fonts\UPCJBI.TTF -> adding in dict
173 / 353 : c:\windows\fonts\browa.ttf -> adding in dict
174 / 353 : c:\windows\fonts\artrbdo.ttf -> adding in dict
175 / 353 : c:\windows\fonts\eucsym.ttf -> adding in dict
176 / 353 : C:\WINDOWS\Fonts\verdana.ttf -> adding in dict
177 / 353 : c:\windows\fonts\euclidi.ttf -> adding in dict
178 / 353 : c:\windows\fonts\bkant.ttf -> adding in dict
179 / 353 : c:\windows\fonts\upcll.ttf -> adding in dict
180 / 353 : C:\WINDOWS\Fonts\UPCDI.TTF -> adding in dict
181 / 353 : C:\WINDOWS\Fonts\verdanai.ttf -> adding in dict
182 / 353 : c:\windows\fonts\arialnbi.ttf -> adding in dict
183 / 353 : C:\WINDOWS\Fonts\eufrak.ttf -> adding in dict
184 / 353 : c:\windows\fonts\cordiaub.ttf -> adding in dict
185 / 353 : c:\windows\fonts\arialbi.ttf -> adding in dict
186 / 353 : c:\windows\fonts\eucsymb.ttf -> adding in dict
187 / 353 : c:\windows\fonts\upcdi.ttf -> adding in dict
188 / 353 : c:\windows\fonts\garabd.ttf -> adding in dict
189 / 353 : C:\WINDOWS\Fonts\eumat2b.ttf -> adding in dict
190 / 353 : C:\WINDOWS\Fonts\CORDIAU.TTF -> adding in dict
191 / 353 : c:\windows\fonts\angsauz.ttf -> adding in dict
192 / 353 : C:\WINDOWS\Fonts\BOOKOSBI.TTF -> adding in dict
193 / 353 : c:\windows\fonts\timesi.ttf -> adding in dict
194 / 353 : C:\WINDOWS\Fonts\pala.ttf -> adding in dict
195 / 353 : c:\windows\fonts\upcfl.ttf -> adding in dict
196 / 353 : C:\WINDOWS\Fonts\CORDIAUZ.TTF -> adding in dict
197 / 353 : C:\WINDOWS\Fonts\UPCLL.TTF -> adding in dict
198 / 353 : C:\WINDOWS\Fonts\simpo.ttf -> adding in dict
199 / 353 : C:\WINDOWS\Fonts\BROWAUZ.TTF -> adding in dict
200 / 353 : c:\windows\fonts\verdanai.ttf -> adding in dict
201 / 353 : C:\WINDOWS\Fonts\trebuc.ttf -> adding in dict
202 / 353 : C:\WINDOWS\Fonts\timesi.ttf -> adding in dict
203 / 353 : C:\WINDOWS\Fonts\ARIALN.TTF -> adding in dict
204 / 353 : c:\windows\fonts\trebuc.ttf -> adding in dict
205 / 353 : c:\windows\fonts\trado.ttf -> adding in dict
206 / 353 : C:\WINDOWS\Fonts\eucsymbi.ttf -> adding in dict
207 / 353 : C:\WINDOWS\Fonts\times.ttf -> adding in dict
208 / 353 : c:\windows\fonts\trebucit.ttf -> adding in dict
209 / 353 : c:\windows\fonts\angsai.ttf -> adding in dict
210 / 353 : c:\windows\fonts\upcfb.ttf -> adding in dict
211 / 353 : c:\windows\fonts\courbd.ttf -> adding in dict
212 / 353 : C:\WINDOWS\Fonts\framd.ttf -> adding in dict
213 / 353 : c:\windows\fonts\symbol.ttf -> adding in dict
214 / 353 : C:\WINDOWS\Fonts\MTCORSVA.TTF -> adding in dict
215 / 353 : C:\WINDOWS\Fonts\palab.ttf -> adding in dict
216 / 353 : c:\windows\fonts\timesbi.ttf -> adding in dict
217 / 353 : c:\windows\fonts\sylfaen.ttf -> adding in dict
218 / 353 : C:\WINDOWS\Fonts\UPCEL.TTF -> adding in dict
219 / 353 : C:\WINDOWS\Fonts\BROWAU.TTF -> adding in dict
220 / 353 : c:\windows\fonts\eumat1b.ttf -> adding in dict
221 / 353 : c:\windows\fonts\tunga.ttf -> adding in dict
222 / 353 : C:\WINDOWS\Fonts\BATANG.TTF -> adding in dict
Assertion failed: ob_refcnt == 0, file CXX/cxx_extensions.cxx, line 1031

As you see, it crashes on BATANG.TTF, and this font file is not shown in
the font manager and is huge (15 Mb while typical ones are aroung 100
Kb). I have to check if this is a valid font file (a priori no, but
could be an asian font)...So now my guess is that adding a non-valid
font (or strange one) cause an error in one of the routines that parses
font files, or exceed some size somewhere, causing an unclean exit..I
will check what happen if I remove this singular file, and check if this
is really a font or not...
I will give the info as soon as I have it, but for now it seems this is
not a real bug, at most a lack of robustness when some strange files
with TTF extensions are present in the font directories...so not sure it
is worth considering, as it is more a question of my windows font
directory beeing corrupted :slight_smile:

Best regards, and thanks for your king help!

Greg.

Ok, I did the test, removed this strange file (not a valid TTF file,
checked that too) and everything work nicely now with 0.60b.
If you want to reproduce this behavior (cannot call it a bug anymore, it
is really my fault having a corrupted font directory), it is sufficient
to create a non-font file in the Font directory, with TTF extension (a
copy in a dos prompt is necessary, file explorer try to install the
"font" on drag&drop), remove the font cache to force a rescanning, and
the crash occur (using numarray, I still do not know why it worked with
numeric...All I can say is that a non-valid ttf file cause a crash on
matplotlib+numarray...)
I do not know if nvestigating this is worthy, as nobody should have a
non-valid ttf file in the font directory anyway, but maybe this will
make the TTF scanning code more robust?

Thanks for your help and sorry crying "Bug, bug" without real reason :-/

Best regards,

Greg.