-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
Could we just have a warning for > 1000 inches? Ie your figure is gigantic, and the backend may have difficulty? |
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!). |
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 |
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]>
…470-on-v3.2.x Backport PR #17470 on branch v3.2.x (FIX: add guardrails for too big tk figures)
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
Not sure if it is worth adding a test for this as it is such an out-there condition.