Giter VIP home page Giter VIP logo

Comments (9)

jason990420 avatar jason990420 commented on May 30, 2024 1

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.

jason990420 avatar jason990420 commented on May 30, 2024

No information provided how you got the error message, maybe detail and full error message also required.

from pysimplegui.

PySimpleGUI avatar PySimpleGUI commented on May 30, 2024

image

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.

shtmsh avatar shtmsh commented on May 30, 2024

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.

PySimpleGUI avatar PySimpleGUI commented on May 30, 2024

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.

shtmsh avatar shtmsh commented on May 30, 2024

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.

PySimpleGUI avatar PySimpleGUI commented on May 30, 2024

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.

jason990420 avatar jason990420 commented on May 30, 2024

image

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.

PySimpleGUI avatar PySimpleGUI commented on May 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.