Closed TV4Fun closed 1 year ago
This only seems to happen with the release build. I checked out the repo and used PyInstaller to build an app package, and that version doesn't do this. I don't know if this is a recent change of your, or if it's because I'm running on an M1 machine, the released version is an Intel binary, and the version PyInstaller made on my machine was an ARM binary.
The build machine is completely unchanged, and there shouldn't have been any change to this part of the code when compared with 0.14a.
Unfortunately I don't really have any other machines to test it on, so it's quite difficult for me to guess as to why it's interpreting the exit request as an exception...
I'm guessing it has to do with this line here. You have a try
with an overly broad except
clause that is catching the SystemExit
exception and opening an error dialogue. That can probably be fixed by catching SystemExit
separately and re-raising it, but I don't know why it's not happening on my checked out copy, and I'm not entirely comfortable submitting a fix for something I can't reproduce.
@Pidgeot, what version of Python are you using when you build this? There was a bug in tkinter fixed about 10 years ago that may be responsible for this.
It's using Python 3.7 on Mac, and I just checked that this change is indeed applied here.
But yeah, explicitly looking for SystemExit is probably the right choice, although why it's only the Mac version doing this is beyond me... let me prepare a fix and do a new set of builds.
New build is up as 0.14c. Hopefully this'll take care of it.
Yeah, it's fixed now. Thank you for the quick turnaround.
Using PyLNP 0.14b with macOS Monterey 12.6 (21G115). Right clicking on the dock and clicking quit, or going to quit from the Dwarf Fortress LNP menu, or typing cmd+Q produces this error message in a popup box before closing.