-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Matplotlib crashes on windows while maximizing plot window when using Multicursor #14225
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
It took me about a minute of interacting with the plot to reproduce the crash with mpl-3.1. The crash is in Python's Faulthandler:
Stack trace:
|
Also got this crash in the TK_PHOTO_PUT_BLOCK_NO_COMPOSITE call. The Tk_PhotoImageBlock pixelPtr seems not accessible.
|
It's strange that data_ptr and pixelPtr differ, as they are initialized as |
Here's a trace of values printed right before the
The crash occurs when This resize crash looks different from the |
Here's another trace where I also printed canvas.figure.bbox:
The value 426.99999999999994 is rounded up to 427, one larger than the image height. |
Managed to repro it on Linux as well. The core of the issue is that the figure bbox is not represented in pixel units but is transformed from inches, so there can be rounding errors when converting them to pixels. |
With #14461 the crash in |
Bug report
Bug summary
I use matplotlib version 3.0.3 and while testing sample code for multicursor, everything is OK and
window opens and multicursor works fine. But if I maximize plotting window, and move mouse cursor on plot, python crashes and exists with code: -1073741819 (0xC0000005)
Code for reproduction
Matplotlib version
TkAgg
):The text was updated successfully, but these errors were encountered: