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
[Error Message] alloc:Invalid block #6718
Comments
No information provided how you got the error message, maybe detail and full error message also required. |
I was running my program when it suddenly exited without warning and without any error. alloc: invalid block: 00000293E7AC94A0: displayed on PyCharm c0 e7, that's all I can give back, I searched the Internet for information about it and found a problem with using tkinter and matplotlib in python, and his error was the same as mine. Since no error was reported, I could not accurately locate the location of the error, and this is an occasional occurrence, I have encountered at least 10 times, but not every time Here is some information about PyCharm that I hope will help: PyCharm 2021.2.4 (Community Edition) |
Maybe you can check if it will be ok, add one more statement to close the matplotlib before you close the PySimpleGUI/tkinter window. import matplotlib.pyplot as plt
window = sg.Window("Title", layout, enable_close_attempted_event=True)
while True:
event, values = window.read()
if event == sg.WINDOW_CLOSE_ATTEMPTED_EVENT:
break
plt.close()
window.close() |
Does this happen only when running with PyCharm? Have you added a try statement around your code to see if it can catch an exception? I doubt this will help since it's a hard crash. Can you describe the operation you were doing when it exited? Sounds like you were actively using your program. It would be helpful to know what matplotlib or tkinter code may have been running or running just prior. |
When debugging and running the packaged program, I have had a sudden crash problem. But I can clearly see the above error message when I flash back on pycharm. And yesterday I found out that I had this error when I was closing the page |
I would open a bug with the mathplotlib or tkinter teams (or both) and see if they can give you an update on this error. They may be able to tell you a workaround. I think Jason's catching the close attempt was a good addition. You'll need to provide code to the other projects, and it would be helpful to get some here as well, that narrows the problem down to as few lines of code as possible. I know these are some of the most difficult problems to debug as they're intermittent. The more you can describe exactly what you were doing, and can use the smallest amount of code to do it, the better, so take good notes each time. If it's a very rare thing, maybe use psgtest to run the program a few 1000 times to see if you can get it to happen that way in a minute or two. |
It tell us the failed message from the viewpoint of a user , not from that of a programmer, so it didn't help people to provide help. So, please tell us more or most what you can, better like we sit at front of your computer. |
I like that suggestion! There are times where I have needed to say this to explain the kinds of details needed to debug. A screenshot of your entire screen when this error is present would be helpful to give better context. I've never personally seen, that I can recall, an error like this on Windows with Python. An alloc error is difficult to create with just Python, which likely means it's down in a driver or portion of code written in C in a package you are using (not standard Python). Or it may be from PyCharm itself? I still don't understand if you only see the error when running using PyCharm. I've been struggling with a blue screen of death (BSOD) for the first time in years, after upgrading to PyCharm 2024 |
Did you get any fix for this ? Facing the same problem rn. Thanks ! |
Type of Issue (Enhancement, Error, Bug, Question)
Error Message
Environment
Operating System
Windows version win11
PySimpleGUI Port (tkinter, Qt, Wx, Web)
tkinter
Versions
Python version (
sg.sys.version
)3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
PySimpleGUI Version (
sg.__version__
)4.60.4
GUI Version (tkinter (
sg.tclversion_detailed
), PySide2, WxPython, Remi)8.6.12
Your Experience In Months or Years (optional)
Years Python programming experience
Years Programming experience overall
No Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)
Troubleshooting
These items may solve your problem. Please check those you've done by changing - [ ] to - [X]
Detailed Description
alloc: invalid block: 00000293E7AC94A0: c0 e7
Code To Duplicate
# Paste your code here
Screenshot, Sketch, or Drawing
The text was updated successfully, but these errors were encountered: