Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Python crashes when closing figures using TkAgg on Mac OS #9856

Copy link
Copy link
Closed
@kadrlica

Description

@kadrlica
Issue body actions

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.

janosh

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.