Closed
Description
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
.