-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: Apparent memory issue? #21788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The backtrace says it is crashing in |
It seems like the real issue is a misuse/disuse of tp_alloc, tp_init, tp_finalize, and tp_dealloc. The window ought to be allocated in a custom tp_alloc. Currently, this is done in tp_init. The tp_init should call some init method on the window. The window should be closed in tp_finalize. This should be decoupled from releasing it. I think that can be done by setting isReleasedWhenClosed to false during tp_init. The window should be released in tp_dealloc. Is that all correct? |
@joelfrederico I milestoned this as 3.6 as you did not label this as a regression, but if there is an easy fix to reduce segfaults, we can definitely backport it. |
Checking, the state is current the same, however if I am reading this correctly we only have the issue if we raise in the |
Summary
If you insert an exception here:
matplotlib/lib/matplotlib/backends/backend_macosx.py
Line 68 in 25a54a4
Proposed fix
Insert an exception here:
matplotlib/lib/matplotlib/backends/backend_macosx.py
Line 68 in 25a54a4
Build against a debug version of python and track down the issue using a debugger.
The text was updated successfully, but these errors were encountered: