-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Bug report
Bug summary
Calling set_size_inches with w=14090.5 causes Xorg to lock up and corrupt the screen. With a width of 14090 or less it doesn't happen.
Note Xorg doesn't actually crash, just displays garbage all over the screen and stops working.
I have looked in dmesg and the Xorg logs and couldn't find anything unusual.
I should note that matplotlib is using the Tk backend.
I realise that 14090 inches is an absurd value - I encountered this issue because this value was computed incorrectly from some other code. Cue several hours of confusion as I thought my graphics hardware was broken!
Apologies if this has nothing to do with matplotlib, but I'm unsure of how to debug this further.
Code for reproduction
import matplotlib.pyplot as plt
plt.plot([1, 2, 3])
fig = plt.gcf()
crash = True
fig.set_size_inches(14090.5 if crash else 14090, 10)
plt.show()
Actual outcome
Xorg splats garbage all over the screen and becomes unresponsive.
Expected outcome
A window appears with the width equal to the width of the screen. This is what happens if I set crash = False in the above code.
Matplotlib version
- Operating system: Debian 9.8
- Matplotlib version: 2.0.0
- Matplotlib backend: TkAgg
- Python version: 3.5.3
- Jupyter version (if applicable):
- Other libraries:
Python and matplotlib installed from Debian package repos.