From: Gregory L. <gre...@ff...> - 2004-06-25 19:15:40
|
I continued investigating the crash occuring on my laptop, and found a "solution" :-) 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 ;-) 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 ;-) ) 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 :-) 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) :-) 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... BTW, the matplotlib I tested is 0.60b but I had the same crash with the previous non-beta version , so I guess the problem is the same... Best regards, Greg. |