|
From: <md...@us...> - 2010-06-10 13:48:41
|
Revision: 8405
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8405&view=rev
Author: mdboom
Date: 2010-06-10 13:48:31 +0000 (Thu, 10 Jun 2010)
Log Message:
-----------
[3011582] stix_fonts_demo.py assert error
When matplotlib is compiled without -DNDEBUG, we get this error on one of the example:
$ python stix_fonts_demo.py
python2.6: CXX/cxx_extensions.cxx:1320: virtual Py::PythonExtensionBase::~PythonExtensionBase(): Assertion `ob_refcnt == 0' failed.
Aborted
Modified Paths:
--------------
trunk/matplotlib/src/ft2font.cpp
Modified: trunk/matplotlib/src/ft2font.cpp
===================================================================
--- trunk/matplotlib/src/ft2font.cpp 2010-06-10 01:59:13 UTC (rev 8404)
+++ trunk/matplotlib/src/ft2font.cpp 2010-06-10 13:48:31 UTC (rev 8405)
@@ -686,25 +686,28 @@
int error = FT_New_Face( _ft2Library, facefile.c_str(), 0, &face );
-
if (error == FT_Err_Unknown_File_Format ) {
std::ostringstream s;
s << "Could not load facefile " << facefile << "; Unknown_File_Format" << std::endl;
+ ob_refcnt--;
throw Py::RuntimeError(s.str());
}
else if (error == FT_Err_Cannot_Open_Resource) {
std::ostringstream s;
s << "Could not open facefile " << facefile << "; Cannot_Open_Resource" << std::endl;
+ ob_refcnt--;
throw Py::RuntimeError(s.str());
}
else if (error == FT_Err_Invalid_File_Format) {
std::ostringstream s;
s << "Could not open facefile " << facefile << "; Invalid_File_Format" << std::endl;
+ ob_refcnt--;
throw Py::RuntimeError(s.str());
}
else if (error) {
std::ostringstream s;
s << "Could not open facefile " << facefile << "; freetype error code " << error<< std::endl;
+ ob_refcnt--;
throw Py::RuntimeError(s.str());
}
@@ -720,6 +723,7 @@
if (error) {
std::ostringstream s;
s << "Could not set the fontsize for facefile " << facefile << std::endl;
+ ob_refcnt--;
throw Py::RuntimeError(s.str());
}
@@ -739,7 +743,6 @@
if ( style_name == NULL )
style_name = "UNAVAILABLE";
-
setattr("postscript_name", Py::String(ps_name));
setattr("num_faces", Py::Int(face->num_faces));
setattr("family_name", Py::String(family_name));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|