Closed
Description
Bug report
Bug summary
Python crashes when I create and then close figures in a for
loop using the TkAgg backend on Mac OS X in an interactive session. The Python session crashes out with
called Tcl_FindHashEntry on deleted table
Abort trap: 6
This may be related to #7743 and #8387.
Code for reproduction
import sys
import matplotlib as mpl
import pylab as plt
print('OS: %s'%sys.platform)
print('matplotlib version: %s'%mpl.__version__)
print('Backend: %s'%matplotlib.get_backend())
for i in range(3):
plt.figure()
plt.close()
plt.figure()
plt.plot([0,1],[0,1])
plt.show()
Actual outcome
$ python -i figure_close.py
OS: darwin
matplotlib version: 2.0.2
Backend: TkAgg
called Tcl_FindHashEntry on deleted table
Abort trap: 6
Expected outcome
I would expect this code to create and destroy three figures before creating and retaining the last figure.
Matplotlib version
- Operating system: Mac OS X 10.12.1
- Matplotlib version: 2.0.2
- Matplotlib backend (
print(matplotlib.get_backend())
): TkAgg - Python version: 2.7.13
This was matplotlib installed from conda from the conda-forge
channel.