-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
matplotlib crashes on OS X when saving to JPEG and then displaying the plot #4194
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
Comments
What backend are you using? I suspect the OSX backend from the error. Is that the full error message you get? I can not reproduce this on py3 + linux + qtagg attn @mdehoon |
Yes, it is the MacOSX backend, and the error message is all that I get. If I manually specify the |
Which Matplotlib version do you use? I could not reproduce this on master (1.5.dev1) |
matplotlib (1.4.3) |
I could not reproduce this with Python 2.7.9 and matplotlib 1.4.3 on Mac OS X 10.9 or 10.10. def _print_bitmap(self, filename, *args, **kwargs):
return Then, with some luck, we can find out exactly where the problem is occurring. |
The error message goes away, and obviously the I took the liberty of poking around in that function, and the error occurs in the call
Even weirder is that running this script in |
I am guessing that these two lines:
in the function FigureCanvas_write_bitmap in _macosx.m are causing the problem. Can you try moving these two lines down to just before
, recompile, and see if the problem still occurs? |
The problem still occurs after the change and recompile/reinstallation. Deleting that two release calls doesn't help, either. |
I also tried recompiling python as well as installing matplotlib from this git repository. The assertion failure is still there. |
Sorry, there is not much I can do as I cannot reproduce this error. I would suggest to remove more of the code in FigureCanvas_write_bitmap and see if the problem disappears at some point. |
Possibly fixed by #6178, but since we're having trouble reproducing, it's hard to say. |
Here is the minimal code to produce the crash on OS X Yosemite, with Python 2.7.9 compiled by homebrew.
The error message is
The crash does not happen if the
savefig
andshow
call are swapped, or when saving topng
/pdf
/svg
file. It only happens whenpyplot
is called in this sequence, and when the format isjpg
.The text was updated successfully, but these errors were encountered: