Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIX: add guardrails for too big tk figures #17470

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 2 commits into from
Jun 3, 2020

Conversation

tacaswell
Copy link
Member

PR Summary

Depending on the version of xserver creating a too big tk window
either corrupts xorg (!) or causes the process to exit. This adds a
guard rail that will convert this into a python exception instead.

closes #17460

PR Checklist

  • Has Pytest style unit tests
  • [k] Code is Flake 8 compliant

Not sure if it is worth adding a test for this as it is such an out-there condition.

@tacaswell tacaswell added this to the v3.2.2 milestone May 21, 2020
@jklymak
Copy link
Member

jklymak commented May 21, 2020

Could we just have a warning for > 1000 inches? Ie your figure is gigantic, and the backend may have difficulty?

@tacaswell
Copy link
Member Author

In some combinations of tk and xserver we need to actually prevent the call to tk so we need more than a warning. I'm hesitant to put a non externally motivated hard maximum size (8MB is big enough for anyone!).

@jklymak
Copy link
Member

jklymak commented May 21, 2020

That’s why I suggested a warning. In this case the user was accidentally setting the fig size to something crazy, and a warning would have helped debug the problem. I don’t think we can or should add different guard rails for every system and backend combination

@tacaswell
Copy link
Member Author

Can we do the warnings in a follow on?

Depending on the version of xserver creating a too big tk window
either corrupts xorg (!) or causes the process to exit.  This adds a
guard rail that will convert this into a python exception instead.

closes matplotlib#17460
Co-authored-by: Tim Hoffmann <[email protected]>
@QuLogic QuLogic merged commit 89fa0e4 into matplotlib:master Jun 3, 2020
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jun 3, 2020
QuLogic added a commit that referenced this pull request Jun 4, 2020
…470-on-v3.2.x

Backport PR #17470 on branch v3.2.x (FIX: add guardrails for too big tk figures)
@tacaswell tacaswell deleted the fix_too-big-tk branch May 6, 2021 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

set_size_inches with a width over 14090 crashes Xorg
5 participants