You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Segmentation fault when resizing on Python 3.12 and MacOS 14 #27262
I upgraded Python from 3.11 to 3.12 and now I am unable to resize the window, even with a simple plot.
Apart from that, the plots are displayed correctly and I can move the window.
I cannot reproduce on an Intel Mac with matplotlib 3.8.1 from PyPI, so possibly just ARM related? Does 3.8.0 work as expected?
Yeah I forgot to mention this happens on an M1.
I also tried version 3.8.0 and 3.7.0, but get the same result. The bug appears to be related to the use of Python 3.12
That commit changed memory allocation behavior, though not immediately obvious to me what we are doing wrong (if anything).
The stated intent of the change is to enable per-subinterpretter GIL, though we do not (intentionally) use that feature (though the commit message does indicate value outside of that, and also states that the errors are indicative of problems down the line).
Activity
dopplershift commentedon Nov 3, 2023
Confirming that I was able to reproduce with Python 3.12 and Matplotlib 3.8.1 from conda-forge, macOS 14.1 on an M2.
EDIT: This is using the macosx backend
greglucas commentedon Nov 3, 2023
I cannot reproduce on an Intel Mac with matplotlib 3.8.1 from PyPI, so possibly just ARM related? Does 3.8.0 work as expected?
JRI98 commentedon Nov 3, 2023
Yeah I forgot to mention this happens on an M1.
I also tried version 3.8.0 and 3.7.0, but get the same result. The bug appears to be related to the use of Python 3.12
ksunden commentedon Nov 3, 2023
I can also reproduce (previously had py3.11 on that machine, so did not run into it)
Here is the faulthandler:
Can also confirm that it seems specific to the macosx backend (e.g. qt does not segfault)
No surprise, but the innermost python call identified by the faulthandler traceback is a line calling into the obj-C extension module:
matplotlib/lib/matplotlib/backends/backend_macosx.py
Line 183 in fac632f
Edit: Python compiled from source via pyenv, so not specific to conda.
tacaswell commentedon Nov 6, 2023
This suggests that the issues is with our extension module and have been bit by the c-level changes in upstream.
ksunden commentedon Nov 8, 2023
Bisects to python/cpython@df3173d (python/cpython#101660)
That commit changed memory allocation behavior, though not immediately obvious to me what we are doing wrong (if anything).
The stated intent of the change is to enable per-subinterpretter GIL, though we do not (intentionally) use that feature (though the commit message does indicate value outside of that, and also states that the errors are indicative of problems down the line).