Fontcache problem on windows

Hi

today after upgrading to the latest svn (r4880 compiled with mingw) and deleting fontManager.cache I got the following message and a crash

c:\python\>python
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylab
Assertion failed: ob_refcnt == 0, file CXX\cxx_extensions.cxx, line 1128

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

restoring my old fontManager.cache I can successfully use matplotlib.

c:\python\>python
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylab
>>>

I tried backdating matplotlib 40 revisions and got the same result. So it is not a new problem.

Any one else seeing this?

/J�rgen

I haven't seen this issue. It may just be a dirty compilation problem. Often distutils doesn't rebuild enough. Try removing the build directory and then build/install.

If that's not the case, we'll need to track down which font is tripping it up. Set "verbose.level" to "debug-annoying" and then send us the output.

Cheers,
Mike

J�rgen Stenarson wrote:

···

Hi

today after upgrading to the latest svn (r4880 compiled with mingw) and deleting fontManager.cache I got the following message and a crash

c:\python\>python
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylab
Assertion failed: ob_refcnt == 0, file CXX\cxx_extensions.cxx, line 1128

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

restoring my old fontManager.cache I can successfully use matplotlib.

c:\python\>python
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylab
>>>

I tried backdating matplotlib 40 revisions and got the same result. So it is not a new problem.

Any one else seeing this?

/J�rgen

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Michael Droettboom skrev:

I haven't seen this issue. It may just be a dirty compilation problem. Often distutils doesn't rebuild enough. Try removing the build directory and then build/install.

If that's not the case, we'll need to track down which font is tripping it up. Set "verbose.level" to "debug-annoying" and then send us the output.

I get the crash on font orlando.ttf. If I delete this font there is no crash.

/J�rgen

Is the font freely available, and if so, can you provide a link? I'd like to find a workaround if possible -- one shouldn't have to remove fonts just to run matplotlib.

Cheers,
Mike

J�rgen Stenarson wrote:

···

Michael Droettboom skrev:

I haven't seen this issue. It may just be a dirty compilation problem. Often distutils doesn't rebuild enough. Try removing the build directory and then build/install.

If that's not the case, we'll need to track down which font is tripping it up. Set "verbose.level" to "debug-annoying" and then send us the output.

I get the crash on font orlando.ttf. If I delete this font there is no crash.

/J�rgen

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Michael Droettboom skrev:

Is the font freely available, and if so, can you provide a link? I'd like to find a workaround if possible -- one shouldn't have to remove fonts just to run matplotlib.

You can download it from <Handwriting Font: ORLANDO (TRUE TPYE) - Tradebit;

I did a md5sum on the orlando font I had and it was the same. The zipfile from download also contained a bold version which I didn't have before. But both versions cause the same problem.

/J�rgen

Thanks. Unfortunately, I'm not able to reproduce any problems with the font on Linux (see attached). I suspect the problem may be Windows-specific, but I have no way of knowing at the moment. I'll have to try this at home (no Windows at work), or maybe one of the other Windows gurus on this list wants to take it up.

Cheers,
Mike

J�rgen Stenarson wrote:

···

Michael Droettboom skrev:

Is the font freely available, and if so, can you provide a link? I'd like to find a workaround if possible -- one shouldn't have to remove fonts just to run matplotlib.

You can download it from <Handwriting Font: ORLANDO (TRUE TPYE) - Tradebit;

I did a md5sum on the orlando font I had and it was the same. The zipfile from download also contained a bold version which I didn't have before. But both versions cause the same problem.

/J�rgen

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Michael Droettboom wrote:

or maybe one of the other Windows gurus on this list wants to take it up.

I shouldn't have said "other". I don't consider myself a guru of much of anything :wink:

Cheers,
Mike

Michael Droettboom skrev:

Thanks. Unfortunately, I'm not able to reproduce any problems with the font on Linux (see attached). I suspect the problem may be Windows-specific, but I have no way of knowing at the moment. I'll have to try this at home (no Windows at work), or maybe one of the other Windows gurus on this list wants to take it up.

Could it be that the static compile libraries needs to be updated? I rely on the precompiled versions.

/J�rgen

It's possible -- the version of freetype in the win32_static.tar.gz package is 2.1.7. I have 2.1.9 on my (working) Linux box. Perhaps something between those point releases fixes this bug. But it could be a lot of other things, too.

I'm going to file a bug for this so it doesn't get lost.

Cheers,
Mike

J�rgen Stenarson wrote:

···

Michael Droettboom skrev:

Thanks. Unfortunately, I'm not able to reproduce any problems with the font on Linux (see attached). I suspect the problem may be Windows-specific, but I have no way of knowing at the moment. I'll have to try this at home (no Windows at work), or maybe one of the other Windows gurus on this list wants to take it up.

Could it be that the static compile libraries needs to be updated? I rely on the precompiled versions.

/J�rgen

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Michael Droettboom skrev:

It's possible -- the version of freetype in the win32_static.tar.gz package is 2.1.7. I have 2.1.9 on my (working) Linux box. Perhaps something between those point releases fixes this bug. But it could be a lot of other things, too.

I'm going to file a bug for this so it doesn't get lost.

Great, in the meantime I'll just remove the orlando font, I don't use it anyway.

I have also stumbled on another font related crash. If I run the examples/font_table_ttf.py with a non-existing font name I get the crash. I have attached the output with debug-annoying set. As you can see from the output the crash message is the same.

/J�rgen

debug.txt (2.65 KB)

Interesting.

Perhaps anything that throws an exception in the FT2Font constructor (which a bad font or a missing font would both do), is throwing off the reference count for the object and failing that assertion, rather than passing the exception back to Python. Only a theory.

What version of gcc are you using under mingw?

Cheers,
Mike

J�rgen Stenarson wrote:

···

Michael Droettboom skrev:

It's possible -- the version of freetype in the win32_static.tar.gz package is 2.1.7. I have 2.1.9 on my (working) Linux box. Perhaps something between those point releases fixes this bug. But it could be a lot of other things, too.

I'm going to file a bug for this so it doesn't get lost.

Great, in the meantime I'll just remove the orlando font, I don't use it anyway.

I have also stumbled on another font related crash. If I run the examples/font_table_ttf.py with a non-existing font name I get the crash. I have attached the output with debug-annoying set. As you can see from the output the crash message is the same.

/J�rgen

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Michael Droettboom skrev:

Interesting.

Perhaps anything that throws an exception in the FT2Font constructor (which a bad font or a missing font would both do), is throwing off the reference count for the object and failing that assertion, rather than passing the exception back to Python. Only a theory.

What version of gcc are you using under mingw?

I'm using gcc 3.4.5
/J�rgen