Open EtienneDesticourt opened 3 years ago
The menu is totally f**cked on linux. I have a plan to completely rewrite the entire menu thing and hold tkinter menu's hand very very carefully until I figure out why the menu is like this.
I have known about the grid toggle issue forever but the error message you showed me is new. This might be a new lead! I'm kind of sick of tkinter menu doing this and it's my own fault for trying to run
app.update()
from a pygame instance when I know under the hood there is a secret race condition in tkinter menu I haven't been able to contain at all. Updating to Nightmare level. You discovered the ultimate bug lmao I had been keeping this one top secret =)
Hmm don't know about those Tkinter issues but as far as this error goes it should be solvable by calling pygame.init() right after it's imported in your main script. If you call it only when you plot you'll have systems which are not initialized and so, for example, when a user event is fired you'll get this error.
I found a reproducible bug where I can crash the app every time, here are the steps
I don't actually understand what the problem is. But my guess is that pygame and tkinter are fighting with each other for control of the main python interpreter loop and in a C++ call under the hood there is a bug where memory was allocated and then not properly deallocated as pygame and tkinter fight for control of the underlying process.
I have investigated this pretty deeply and it seems what is going on is the tkinter menu system works completely differently to almost everything else in tkinter. tcl gets compiled and then python hooks into the tcl binary, and the menu system is using like 10 api's which are not being exposed in the python tkinter interface.
My hope is that I made some kind of mistake when I wrote the wrapper class for menu and it will all go away if I rewrite everything from scratch.
Hi,
I get the following error when trying to toggle the grid in plots. I'm on linux running the PR 38 dev branch:
Cheers