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
PDF backend failure #2321
Comments
Do you have a self-contained example that reproduces the issue? How did you install matplotlib -- from the binary package, or from source? |
Also, it's possible to save a PDF without using the PDF backend. You may be using the Cairo backend. You can check by executing import matplotlib.pyplot as plt
print plt.get_backend() |
I updated through the EPD distribution. Even the most simple example fails: import matplotlib.pyplot as plt
plt.plot(range(3), range(3))
plt.savefig('test.pdf') |
to @dmcdougall The default MacOSX backend is used. I actually tried to use the Cairo backend, but I was then asked to install pycairo. So I guess the Cairo backend isn't available in my computer? |
This is the detailed problem report: Process: Python [1056] Date/Time: 2013-08-21 22:22:27.060 +0800 Interval Since Last Report: 158580 sec Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Application Specific Information: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread Thread 1: Thread 2: Thread 3: Thread 4: Thread 5: Thread 6: Thread 7: Thread 8: Thread 9:: Dispatch queue: com.apple.libdispatch-manager Thread 10: Thread 0 crashed with X86 Thread State (64-bit): Binary Images: External Modification Summary: VM Region Summary: REGION TYPE VIRTUAL Model: MacBookPro8,2, BootROM MBP81.0047.B27, 4 processors, Intel Core i7, 2.2 GHz, 16 GB, SMC 1.69f4 |
the bug seems to be in _ttconv.cpp but I can't reproduce it. By the way _ttconv.cpp didn't change between v1.2.1 and v1.3.0 |
It confuses me too. But the same error happens on both of my computers, so it's possibly related to the EPD distribution. |
possibly, but there's still the chance it's a bug in _ttconv.cpp triggered by something else. If you could get the c backtrace would be wonderful. |
I just did a clean reinstall of EPD and update matplotlib to 1.3.0. The problem is gone. Thanks for you guys' time! Just found numexpr 2.1 may conflict with matplotlib: after updating numexpr from 2.0.1, the aforementioned pdf-saving issue reemerges. |
I appear to encounter the same issue with EPD 7.3-2, Python 2.7.3 on OS X 10.8.4. Just updated with enpkg (to matplotlib 1.3.0) and I get a similar malloc error when saving to pdf. I'm still on numexpr 2.0.1-3. The pdf file is created, and contains data, but Preview will not open it, claiming that it is damaged. I've done a backtrace in gdb, but I don't think it is especially helpful:
In my case the issue only occurs for some plots, and not for others. I tried some simple examples from the matplotlib tutorial, but they did not trigger the error. Curiously, if I first do a successful |
I in fact use Canopy instead of EPD. Maybe you can try it. |
Also, if you're using the osx backend, the Quartz extension is used to write a PDF file. You may have more luck setting the backend to "pdf" which uses our pure Python PDF backend. (Cairo is another option, but as noted it requires extra dependencies). |
After updated to 1.3.0, it can't save figures as pdf format.
System: OSX 10.6.8
Here is the error message
Python(48247,0x7fff7467f180) malloc: *** error for object 0x7fff73c72570: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
The text was updated successfully, but these errors were encountered: