Thanks to visit codestin.com
Credit goes to github.com

Skip to content

segfault saving a high dpi png #6572

Closed
Closed
@asmeurer

Description

@asmeurer

To help us understand and resolve your issue please check that you have provided
the information below.

  • Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)

python 3.5.1 0 defaults
matplotlib 1.5.1 np111py35_1 conda-forge

Mac OS X 10.11.6 (15G12a)

  • How did you install Matplotlib and Python (pip, anaconda, from source ...)

conda

  • If possible please supply a Short, Self Contained, Correct, Example
    that demonstrates the issue i.e a small piece of code which reproduces the issue
    and can be run with out any other (or as few as possible) external dependencies.

Run this script. It takes a few minutes to run. At the end, if run with python -X faulthandler, this is the traceback:

Fatal Python error: Segmentation fault

Current thread 0x00007fff7b53f000 (most recent call first):
  File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py", line 93 in __init__
  File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py", line 486 in get_renderer
  File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py", line 469 in draw
  File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py", line 527 in print_png
  File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/matplotlib/backend_bases.py", line 2232 in print_figure
  File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/matplotlib/figure.py", line 1565 in savefig
  File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/matplotlib/pyplot.py", line 688 in savefig
  File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/mpmath/visualization.py", line 184 in cplot
  File "demo/mandelbrot.py", line 48 in <module>
Segmentation fault: 11

Here's the crash dump from OS X.

  • If this is an image generation bug attach a screenshot demonstrating the issue.
  • If this is a regression (Used to work in an earlier version of Matplotlib), please
    note where it used to work.

Didn't check.


If you change the DPI on the plot call (last line) to 1000, it runs fine.

Let me know if there is anything else I can do to help here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions