Bug summary
- Run the attached code in qtagg on macosx
- Press Control-C to send a SIGINT.
- Click on the matplotlib Dock icon.
Code for reproduction
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import cm
# matplotlib.use(backend="TkAgg")
plt.style.use("_mpl-gallery")
# Make data
X = np.arange(-5, 5, 0.25)
Y = np.arange(-5, 5, 0.25)
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R)
# Plot the surface
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
ax.plot_surface(X, Y, Z, vmin=Z.min() * 2, cmap=cm.Blues)
ax.set(xticklabels=[], yticklabels=[], zticklabels=[])
plt.show(block=False)
input("Hit [return] to end")
plt.close("all")
Actual outcome
Crash.
qtagg_crash.txt
Expected outcome
I'm not 100% what the correct behavior should be, but not a crash. I was thinking that the Control-C would either stop the input() call or immediately close the figure.
Additional information
No response
Operating system
macOS 14.8
Matplotlib Version
3.12.0.dev484+g162d8181d.d20260708
Matplotlib Backend
qtagg
Python version
3.14.5
Jupyter version
No response
Installation
None
Bug summary
Code for reproduction
Actual outcome
Crash.
qtagg_crash.txt
Expected outcome
I'm not 100% what the correct behavior should be, but not a crash. I was thinking that the Control-C would either stop the input() call or immediately close the figure.
Additional information
No response
Operating system
macOS 14.8
Matplotlib Version
3.12.0.dev484+g162d8181d.d20260708
Matplotlib Backend
qtagg
Python version
3.14.5
Jupyter version
No response
Installation
None