Skip to content

Avoid a RuntimeError at animation shutdown with PySide2. #15685

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

Merged
merged 1 commit into from
Mar 14, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Nov 12, 2019

PR Summary

Fixes the "Internal C++ object already deleted" part of #15678 (comment) (@dopplershift, perhaps this also fixes the rest if you're lucky?).
See mottosso/Qt.py#316 for how to translate the isdeleted API with PySide. See #9993 (comment) re the "double import" of sip with PyQt4.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@tacaswell tacaswell added this to the v3.2.1 milestone Nov 12, 2019
@anntzer
Copy link
Contributor Author

anntzer commented Jan 11, 2020

fwiw I can also repro the issue now, and its resolution by this PR, using PyQt5 -- run animation/strip_chart.py, wait for the strip chart to go at least once through the axes, and quit.

@timhoffm
Copy link
Member

@anntzer Do I understand your correctly: The bug should happen when running animation/strip_chart.py with Qt5Agg backend on master?

That quits cleanly here. (Not tested with PySide2 as I've not installed that.)

@anntzer
Copy link
Contributor Author

anntzer commented Jan 13, 2020

Yes, it fails locally with me at exit with qt5agg/master. Did you wait for the strip chart to go at least once through the whole axes?

@timhoffm
Copy link
Member

Yes I did.

@tacaswell tacaswell merged commit 062cd15 into matplotlib:master Mar 14, 2020
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 14, 2020
QuLogic added a commit that referenced this pull request Mar 14, 2020
…685-on-v3.2.x

Backport PR #15685 on branch v3.2.x (Avoid a RuntimeError at animation shutdown with PySide2.)
@anntzer anntzer deleted the isdeleted branch March 14, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants