-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: Matplotlib crashes using Figure Options gui with QT5Agg backend on Windows 10 running Spyder #22543
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
Can you try running the scripts from a terminal? I experience similar problems and it seems to work better from a terminal. Still a problem of course, but would be interesting to narrow it down. It may still be a Matplotlib issue, but also a Spyder/spyder-kernel/IPython/ipykernel problem... |
Hi. thanks for responding so fast. |
Here are some related issues: Not explicitly like this, but at least indicating that there are some problems with the related code and that it is not really clear who should change what... But for sure worthwhile digging into! |
It may be that this is fixed by #22202 |
Is there some kind of backtrace, or does it simply die? |
It simply just dies, when I try to open the menu. |
hey, I thought I'll add my problem here since it seems to be quite related... (and I'm using matplotlib v3.5.2) ... and it also simply dies (I can't even close or resize the gui any more) [edit by @tacaswell to put gif in a detalis fold because it was making me slightly motion sick!] |
I experience the exact same thing. |
This looks like there is something wrong with the input hook inside of the terminal that is being hosted by spyder. When you see things like "I click on the window and nothing happens" or "I resize and just get blank space padding the graph" that is usually because (for what ever reason) the UI event loop is not running. Hence the windowing system is sending to your application ("user clicked", "user clicked",...) and your application is just being like "yup, good to know, put it on the queue" but not actually doing anything about the input. If in the terminal you run |
hey, thanks for the response! I checked and using However, I noticed that this is only an issue if interactive mode is on (e.g. |
The behavior of Can you also test in an IPython shell (as oppossed to plain python) and make sure you are using prompttoolkit (rather then readline) for the prompt? This is starting to get into the realm of https://matplotlib.org/stable/users/explain/interactive_guide.html and how the event loop is (or is not) managed. |
Hey, I can confirm that if I directly use an |
I think this show that this is fundamentally an issue with spyder, readline, pyqt/pyside and the interaction with the event loop. It is possible that there is something we could do differently on the Matplotlib side to work around this, but I think we would need guidance from down-stream about what those changes will be. I would point to spyder-ide/spyder#4367 which re-points the problem to the IPython Qt console. I strongly suspect that this is another version of this. I'm going to close this issue here as
Sorry to play hot-potato 😞 . attn @cordoba12 |
hey, ok sounds reasonable... just as a final comment...
While the first one is certainly on spyder (or somewhere further down the road), the second part remains puzzling ... |
fair, re-opening. |
I'll re-close since the original issue was Spyder only. @raphaelquast can you open a new reproducible issue with the problem that you can reproduce without Spyder? Thanks for your understanding. |
@jklymak @tacaswell moved to new issue #23103 |
Uh oh!
There was an error while loading. Please reload this page.
Bug summary
Using the QT5Agg backend with the 3.5.1 version of Matplotlib crashes after pressing 'ok' in the Figure Options GUI. This happens regardless of doing any changes to the plot or not.
The only way to bring Matplotlib back to life, is to restart the python kernel.
Code for reproduction
Actual outcome
Plot window becomes inactive, and does not response to any input.
Expected outcome
No changes to the plot window whatsoever. The window should continue being responsive.
Additional information
I am running my scripts in Spyder, which is where I am experiencing this bug.
Operating system
Windows 10
Matplotlib Version
3.5.1
Matplotlib Backend
Qt5Agg
Python version
3.9.10
Jupyter version
No response
Installation
conda
The text was updated successfully, but these errors were encountered: