-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Switching to log scale when there is no positive data crashes the Qt5 backend, causes inconsistent internal state in others #6852
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
Would it perhaps make sense to change the default to Edit: Shouldn't this be handled by |
I posted here last night, but maybe forgot to submit? I played around with it and it seems I personally would still recommend changing the default behavior of |
Actually my comment about wrapping in a try... except was incorrect: that can work, one simply has to restore the original scale in case of a failure. See #6983. |
Closed by #6983 please re-open if I am confused. |
mpl 1.5.1/2.0b3/master, Qt5Agg backend, Python 3.5.2, Arch Linux
and press
l
while the mouse is over the axes.Qt5 aborts Python due to the exception propagating out of the slot:
Not sure what the best approach is but I think we should certainly try to avoid a fatal crash...
While it may be tempting to just wrap
key_press_handler
in atry... except
or disable the abort()ing behavior of PyQt5 by installing a custom excepthook (see http://pyqt.sourceforge.net/Docs/PyQt5/incompatibilities.html section for PyQt5.5), this would hide the fact that the canvas is left in an inconsistent state as the axes internally believe to have switched to log-scale. This can be seen e.g. by using the Qt4Agg backend (where the exception is printed but the program not abort()ed), by typingl
and then trying to zoom in (again with the mouse): the canvas becomes completely empty in that case.The text was updated successfully, but these errors were encountered: