Comments (9)
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()
from pysimplegui.
No information provided how you got the error message, maybe detail and full error message also required.
from pysimplegui.
Can't say I've ever seen that error message. Sounds like a memory corruption problem or maybe a tkinter file dialog problem. As Jason said, much more info needed.
from pysimplegui.
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)
Build #PC-212.5712.39, built on December 21, 2021
Runtime version: 11.0.13+8-b1504.49 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2016M
Cores: 8
Registry: documentation.show.toolbar=true, ide.images.show.chessboard=true
Non-Bundled Plugins: com.chesterccw.excelreader (2.0.8), com.jetbrains.plugins.ini4idea (212.5712.51), YAML/Ansible support (0.11.2), net.seesharpsoft.intellij.plugins.csv (2.21.0), com.andrey4623.rainbowcsv (2.0.1)
from pysimplegui.
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.
from pysimplegui.
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
from pysimplegui.
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.
from pysimplegui.
navigate from page A to page B, then navigate back to Page A again and it show me this message
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.
If you try to debug this issue by yourself and you know nothing about what the environment and what the script run, also no any debug information, what can you do ?
So, please tell us more or most what you can, better like we sit at front of your computer.
from pysimplegui.
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
from pysimplegui.
Related Issues (20)
- [ Enhancement/Question] Programmatically setting Horizontal Scroll position of a Column() HOT 9
- [Question] Demo_Matplotlib_Ping_Graph_Large.py does not run/compile on Pi4 HOT 26
- Flask click SystemError when used with pySimpleGUI output redirect HOT 1
- [Question] How to trap an event HOT 2
- [Enhancement] CI friendly handling for the first time installation dialog HOT 3
- [Question] How to update class parameter within inherited class HOT 4
- [Question] How To Re-Enter Data For A Specific Field - AND 'CR to act like TAB HOT 1
- [ Bug] sg.ColorChooserButton Unless Additional Tkinter Import HOT 1
- [Bug] Hitting the image-count limit [Fail to create pixmap with Tk_GetPixmap in TkImgPhotoInstanceSetSize] HOT 6
- [Question] Import error HOT 3
- [Question] Change focus highlight when tabbing to button HOT 8
- [ Enhancement/Bug/Question] NOTE - you can also call sg.main() or sg.main_open_github_issue() to post an issue HOT 1
- [ Question] Compiling Errors since License validation HOT 2
- [ Bug] Broken Doc Link HOT 2
- [Question] NOTE - Table get doesn't work HOT 6
- [ Enhancement] allow arrowheads for lines in tkinter graphs HOT 8
- [Question] Question of shortcut HOT 17
- [Question] How to Use PySimpleGui Programs on Other PCs HOT 1
- [ Question] How to detect when we manually enter a value in combo box in Pysimple GUI HOT 1
- [Bug] Table colored rows flashes when updating in 5.0, while they didn't in 4.x HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysimplegui.