-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
savefig crashes with malloc error on os x #4359
Comments
as mentioned above, i think it's likely that this was introduced between the current version matplotlib 1.4.3 np19py27_1 in anaconda and the previous released version since i have been using the same script to save pdfs quite regularly. |
attn @jkseppan |
@nilsbecker Does it only happen with usetex=True? I wonder what fonts you're getting. If this is reproducible, could you rerun with |
If I understand this correctly the bug appeared between matplotlib 1.4.3 np19py27_1 and matplotlib 1.4.3 np19py27_0 I think the anaconda version was bumped for a new freetype version. Can you use |
Oh, that rings a bell: there was a freetype bug that caused some examples to fail on some versions of Ubuntu. #2916 But that was early 2014, it would be odd to see that exact bug in Anaconda now. In any case, the exact version of freetype is interesting. |
ok, freetype version from freetype 2.5.2 0 and indeed, usetex was on, and when i switch usetex off, i am able to save a pdf without crash. i then switch it back on, and voila, crash. have not yet done the --verbose-debug thing. does that also work in an interactive ipython shell? |
Ubuntu's fix was in Freetype 2.5.2-1ubuntu3, so if Anaconda has something called "2.5.2 0" it could very well have that exact bug. To set the verbosity from the interactive shell, I think you'd do something like from matplotlib import verbose
verbose.set_level('debug') as early as possible. |
This is probably the same as ContinuumIO/anaconda-issues#309 |
ok, so i have run it with the debug flag. the output is long. near the end i save the same figure first as png, then as pdf, which is when it crashes. these are the last few lines of the output file. do you need more?
|
Actually I now believe it's most likely the same freetype bug as before, so the fix would be to get anaconda to update their freetype version. But if it turns out to be something else, I will be interested in the whole debug output, which you could e.g. paste into a gist and link from here. |
ok, it's here https://gist.github.com/nilsbecker/36426859c3883d803414 |
I am having the same bug (when using usetex=True, otherwise it saves fine), but according to "conda list", the freetype version is: freetype 2.5.2 0 Any ideas yet on a fix for this? |
@rhobslein This is a freetype bug, the solution is to update to at least 2.5.3. |
We can probably put tighter constraints on the freetype version checking in our build process, but that won't help with the current situation. |
Thanks @tacaswell -- I just downloaded and installed freetype 2.5.5, but "conda list" still says 2.5.2. Do I need to get it to point to the new version? |
Apparently yes, it is still giving me the same error:
sorry for the novice question, how do I get it to register the update? Thanks! |
If you are using matplotlib from anaconda it is unlikely that it would build against any other version of I think np19pyxx_0 is build against an older version of freetype that does not have this bug. Unless you have other issues you are probably better off downgrading to np19py27_0 I.e. if you are using python 2.7
on 3.4
ect/ |
@tacaswell it would probably be nice if we had a test that triggered this issue. But testing with tex on travis is difficult due to the old versions of tex that version of ubuntu ships |
Yeah it failed dramatically and asked me if matplotlib was even installed. I don't know if this is the same as what you recommend (probably yours is slightly better since it didn't roll back matplotlib too far), but this worked for me:
If I'm feeling brave later, I'll try your solution as well :) |
Yes that is basically the same thing appart from the fact that you are rolling back to version 1.3.1 rather than a version which is just build against an older version of freetype. Note that conda has virtual environments so you can always create a new env and experiment in. |
Thanks, I just downgraded (upgraded!) to np19py27_0 as you suggested and it all works fine. I've never really used virtual environments but I'm beginning to see why people do! |
this happens on saving to pdf, not to png, after a recent update of the anaconda distribution.
further details are in ipython/ipython#8266
the os x crash report is
The text was updated successfully, but these errors were encountered: