8000 matplotlib crashes on OS X when saving to JPEG and then displaying the plot · Issue #4194 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
matplotlib crashes on OS X when saving to JPEG and then displaying the plot #4194
Closed
@netheril96

Description

@netheril96

Here is the minimal code to produce the crash on OS X Yosemite, with Python 2.7.9 compiled by homebrew.

# -*- coding: utf-8 -*-
import numpy
import matplotlib.pyplot as plt
plt.plot(numpy.linspace(0, 1, 1000), numpy.random.randn(1000))
plt.savefig('test.jpg')
plt.show()

The error message is

Assertion failed: (s->stack->next != NULL), function CGGStackRestore, file Context/CGGStack.c, line 77.

The crash does not happen if the savefig and show call are swapped, or when saving to png/pdf/svg file. It only happens when pyplot is called in this sequence, and when the format is jpg.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0