You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the current master branch (16ed8be), I'm getting an error when text.usetex is set to true. It fails with this core dump.
Running git bisect suggests that f4adec7 ("Use six instead of 2to3") is the first bad commit. One hiccup is that the test script was also showing failure for the use of basestring in line 174 of texmanager.py, but if that line is replaced with a fix from a later commit (d042e90), f4adec7 still seems to be the first commit to show the error.
I've pushed the bisect command ran to this branch. latex-plot-bisect/latex_plot.py should reproduce the error on the master branch, and run-latex-bisect.sh will run the whole bisect (although it may need to be tweaked because it assumes the presence of /tmp and passes the --user flag to python setup.py install.
I'd guess the error is coming from src/ft2cpp.{cpp,h}, but I don't have enough of a handle on those files to know which changes in f4adec7 are likely culprits.
Hopefully this can be reproduced on other systems. I'm running python 3.3.3 and numpy 1.9.0.dev-3aa76ba on Arch Linux.
Unfortunately, I'm having trouble reproducing this on Fedora with python 3.3.3 and numpy 1.9.0.dev-3aa76ba. I suspect it's somehow related to the fonts (or lack thereof) on your system. Can you test with Python 2.x and see whether that also fails for you?
This may be related to #2635, and you could try applying the patch suggested there (which isn't really a fix, but it may move along to the root cause of the issue).
You may also want to try removing your font cache in ~/.cache/matplotlib/fontList.py3k.cache and see if that helps. Let us know if it does so we can work toward a true solution.
You may also want to try removing your font cache in
~/.cache/matplotlib/fontList.py3k.cache` and see if that helps.
I still get the failure after removing fontList.py3k.cache and
tex.cache. I've also tried removing .cache/fontconfig.
Unfortunately, I'm having trouble reproducing this on Fedora with python
3.3.3 and numpy 1.9.0.dev-3aa76ba. I suspect it's somehow related to the
fonts (or lack thereof) on your system.
That seems reasonable. It's interesting that a recent commit seems to be
exposing the issue. I'm seeing the error on two machines, but they are
set up very similarly, so that doesn't say much.
I have a record of how I customized the fonts, so I'll try to set those
back to the base install and then test from there.
Can you test with Python 2.x and see whether that also fails for you?
I should have included that information that in the initial report. It
also fails with a core dump.
This may be related to #2635, and you could try applying the patch
suggested there (which isn't really a fix, but it may move along to
the root cause of the issue).
Thanks for pointing that out. Somehow I missed issue in my initial
searches. I'll have a look.
The main font changes I've made are installing ttf-droid fonts and
adding a custom .config/fontconfig/fonts.conf file. When I remove both
of these, I still get an error. Perhaps it's something not on my
system.
Or unexpected content in one of the fonts on your system.
You can print out the files that Freetype is trying to load by applying this patch:
diff --git a/src/ft2font.cpp b/src/ft2font.cpp
index 0fb3b8b..b048f28 100644
--- a/src/ft2font.cpp
+++ b/src/ft2font.cpp
@@ -854,6 +854,8 @@ FT2Font::FT2Font(Py::PythonClassInstance *self, Py::Tuple &args, Py::Dict &kwds)
* that we'll always be able to print. */
std::string facefile = Py::String(args[0]).encode("unicode_escape");
+ printf("%s\n", facefile.c_str());
+
args.verify_length(1);
clear(Py::Tuple(0));
The last font printed may be the culprit. If you share that font with me (or I pull it from the Arch repo or something), I might be able to reproduce the problem here.
The main font changes I've made are installing ttf-droid fonts and
adding a custom .config/fontconfig/fonts.conf file. When I remove both
of these, I still get an error. Perhaps it's something not on my
system.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/2670#issuecomment-30342733
.
You can print out the files that Freetype is trying to load by applying this patch:
diff --git a/src/ft2font.cpp b/src/ft2font.cpp
index 0fb3b8b..b048f28 100644
--- a/src/ft2font.cpp
+++ b/src/ft2font.cpp
@@ -854,6 +854,8 @@ FT2Font::FT2Font(Py::PythonClassInstance *self, Py::Tuple &args, Py::Dict &kwds)
* that we'll always be able to print. */
std::string facefile = Py::String(args[0]).encode("unicode_escape");
+ printf("%s\n", facefile.c_str());
+
args.verify_length(1);
clear(Py::Tuple(0));
The last font printed may be the culprit. If you share that font
with me (or I pull it from the Arch repo or something), I might be
able to reproduce the problem here.
Activity
mdboom commentedon Dec 11, 2013
Unfortunately, I'm having trouble reproducing this on Fedora with python 3.3.3 and numpy 1.9.0.dev-3aa76ba. I suspect it's somehow related to the fonts (or lack thereof) on your system. Can you test with Python 2.x and see whether that also fails for you?
This may be related to #2635, and you could try applying the patch suggested there (which isn't really a fix, but it may move along to the root cause of the issue).
mdboom commentedon Dec 11, 2013
You may also want to try removing your font cache in
~/.cache/matplotlib/fontList.py3k.cacheand see if that helps. Let us know if it does so we can work toward a true solution.kyleam commentedon Dec 11, 2013
Thanks for response.
I still get the failure after removing fontList.py3k.cache and
tex.cache. I've also tried removing .cache/fontconfig.
That seems reasonable. It's interesting that a recent commit seems to be
exposing the issue. I'm seeing the error on two machines, but they are
set up very similarly, so that doesn't say much.
I have a record of how I customized the fonts, so I'll try to set those
back to the base install and then test from there.
I should have included that information that in the initial report. It
also fails with a
core dump.
Thanks for pointing that out. Somehow I missed issue in my initial
searches. I'll have a look.
kyleam commentedon Dec 11, 2013
The main font changes I've made are installing ttf-droid fonts and
adding a custom .config/fontconfig/fonts.conf file. When I remove both
of these, I still get an error. Perhaps it's something not on my
system.
mdboom commentedon Dec 11, 2013
Or unexpected content in one of the fonts on your system.
You can print out the files that Freetype is trying to load by applying this patch:
The last font printed may be the culprit. If you share that font with me (or I pull it from the Arch repo or something), I might be able to reproduce the problem here.
WeatherGod commentedon Dec 11, 2013
Just as a sanity check... did you delete the font cache after reverting
your font customizations?
On Wed, Dec 11, 2013 at 12:39 PM, Kyle Meyer notifications@github.comwrote:
kyleam commentedon Dec 11, 2013
The patch produces this output:
/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb
I've copied the file here:
https://github.com/kyleam/matplotlib/blob/bisect-latex-plot-error/cmr12.pfb
kyleam commentedon Dec 11, 2013
On 12/11/13 12:54, Benjamin Root wrote:
The post-install/uninstall hook of the ttf-droid Arch package runs this
post_install() {
echo -n "Updating font cache... "
fc-cache -f > /dev/null
mkfontscale /usr/share/fonts/TTF
mkfontdir /usr/share/fonts/TTF
echo "done."
}
I am also deleting .cache/fontconfig and
.cache/matploltlib/{fontList.py3k.cache,tex.cache}.
Are there any other files I should be concerned about?
tacaswell commentedon Jan 24, 2014
@kyleam What is the state of this?
kyleam commentedon Jan 24, 2014
I'm still seeing this with the current master (c16d2c2).
kyleam commentedon Mar 31, 2014
When I last tested this with b5a6c49, it was still failing, but this seems to be working with the current master (b8cb6c3).