Skip to content

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

@kadrlica

Description

@kadrlica

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.

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy