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
[Bug]: blitting after closing second tkinter embed causes silent crash #23809
Comments
Do either of the fixes I suggested in #16580 help? |
The first fix stops the complete crash, but the blitting still fails with the following error message(s).
The second fix still crashes completely silently. The fact that the scatterplot blitting isn't having any issues in my circumstances but blitting the image does have issues seems strange to me. Also something I just noticed, if I open the popup and press the blit button only the popup blits, the main window stays completely static. Is there some way to force the blitting to stay locked onto the main window and not switch to the popup? |
It crashes because you use the same figure for the two windows. When you close your popup, you need to change the canvas of the figure so it refers to the main window again. Also, try not to use pyplot with tkinter, instead use Figure.
|
Bug summary
After opening a tkinter popup and embedding a figure a second time and closing it, blitting the figure again causes a silent complete program crash.
Code for reproduction
Actual outcome
Program crashes with no error message.
Expected outcome
Either the program should crash with an error message, or the blit should succeed and the new image should be rendered.
Additional information
I think this is probably related to #16580, but the lack of any error message is definitely different. In the larger program where I'm trying this blitting doesn't actively crash in this way with a separate figure that has 2 scatterplots and a title which are being blitted and embedded in the same manner, but the other figure which is just an image is causing the program to crash. If anyone knows a way to fix this in the meantime I would be very grateful.
Operating system
Windows
Matplotlib Version
3.4.3
Matplotlib Backend
Agg
Python version
3.8.1
Jupyter version
6.4.6
Installation
pip
The text was updated successfully, but these errors were encountered: