Pyfa: [MacOS] Saving settings causes Pyfa to hang

Created on 16 Jun 2019  Â·  26Comments  Â·  Source: pyfa-org/Pyfa

Bug Report

Saving settings causes Pyfa to hang

Expected behavior:

Clicking "save" saves and app functions normally.

Actual behavior:

Clicking "save" will close the settings and all Pyfa windows will hang (item info window for example)

Detailed steps to reproduce:

  1. Click ⌘ + ,
  2. Change a setting
  3. Click "Save"

    Fits involved in EFT format (Edit > To Clipboard > EFT):

Release or development git branch? Please note the release version or commit hash:

v2.9.4

Operating system and version (eg: Windows 10, OS X 10.9, OS X 10.11, Ubuntu 16.10):

macOS 10.14.4

Other relevant information:

bug fixed macOS

All 26 comments

Where do you have "Save" button? Do you mean "OK" button? If not, please make a screenshot.

yeah, i meant the "ok" button, sorry for confusion

Ok, what do you mean by "all pyfa windows"? Does it include main window as well?

Are they not interactable? Are they shown as inactive? Do you get any OS notifications about app which stopped responding?

My first guess would be that preferences is modal dialog which blocks everything, and that this block somehow is not removed when the dialog is closed. Will try to reproduce and fix it later when I'll have access to mac.

Ok, what do you mean by "all pyfa windows"? Does it include main window as well?

yup, the main window and all child windows hang.

Are they not interactable? Are they shown as inactive? Do you get any OS notifications about app which stopped responding?

Since this is macOS, theres no system alert about it, tho when you right click the Pyfa icon in the dock it'll say that the app is unresponsive.

My first guess would be that preferences is modal dialog which blocks everything, and that this block somehow is not removed when the dialog is closed. Will try to reproduce and fix it later when I'll have access to mac.

alright, is there is debugging mode for the release or will i have to build Pyfa to get the logs?

Logs should be available in ~/.pyfa, but i would not expect them to be helpful in this case.

I'm seeing this same problem... let me know if there is anything I can do to help you guys diagnose the problem

Same here, OSX 10.14.5, pyfa v2.9.6.
If you close the settings pyfa behaves like they are still open and block every interaction with the main window, including the menu (no way to quit pyfa or to reopen settings).

What about:

  • damage pattern editor
  • target resists editor
  • fit copy to clipboard window

Do they also have similar issues or can be closed without any side-effects?

Everything works well on those, please remember the first two don't have an "ok" button. Fitting copying works perfectly though.

What happens if you close preferences with:

  • Esc key
  • OK button
  • titlebar close button

Do they all block main window?

Just tried to close the settings without hitting ok (via the 'X') and that works fine.
Also if you force quit pyfa the settings are not saved, if that helps. Basically you cannot change any setting on OSX.

_//edit: Closing via Escape does the same than the Ok-button._

Nevermind, closing them via the 'X' saves the settings, so there is a way to change settings on OSX.
As a workaround I would suggest to just remove the button until you figure out why it causes problems, people will be clever enough to close the window with the 'x'.

So what about Esc?

If it works, I can easily change OK button to behave similarly. One more option on top of removing it won't hurt.

edit: nvm, noticed that you edited one of your previous messages

Escape blocks pyfa again =/

Actually i think this issue is very similar to #2007. If we just close window, but do not destroy it, wxPython does not destroy it for us (because it's dialog, not frame), which might lead to resource leaks as they are not freed (existing windows can be seen via wxPython debug panel, available in About when launching with --debug). Closing via OK and via Esc destroys window, while closing via close button does not (as we did not implement proper handler).

So, actual issue is hang/blocked window which happens on preference dialog destruction, and it needs to be dealt with separately.

Looking at how dialog handling is implemented in copySelectDialog (used to copy fits into clipboard), we need to use self.EndModal() before window destruction. Quite possibly that wx under mac doesn't handle it automatically, like on Windows or Linux.

cool.

Possible fix is in 27e361dc5b3eef19dec932d60df6e619a6ee8bbc. Please try this build and see if it works: https://transfer.sh/DlsMD/pyfa-v2.9.6+321-g27e361d-mac.zip

Seems to work, im not hanging when i hit OK

ok cool. Closing as fixed then

@GingkathFox in 01371f227cab919b418573ee9a87a1f3253c45d6 I reworked again how dialogs are closed (so that they are handled in accordance with wx guidelines), could you try new build - if preferences are closed on Mac alright or not?

https://transfer.sh/LQxel/pyfa-v2.9.6+330-gc315adf-mac.zip

Not Found

Cant download, got this message

I just tried and it worked for me, i just had to wait for a few minutes for page to load. Service is probably having some kind of outage.

ok

still getting a not found when i click on download

No idea, downloads fine for me.

Anyway here's latest build, uploaded to my dropbox: https://www.dropbox.com/s/rjzokz9thk55ecq/pyfa-v2.9.6%2B403-g9b15f19-mac.zip?dl=0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rinakondur picture rinakondur  Â·  7Comments

hotleadsingerguy picture hotleadsingerguy  Â·  8Comments

UsernameByCommittee picture UsernameByCommittee  Â·  9Comments

sincomil picture sincomil  Â·  9Comments

eliasmarobin picture eliasmarobin  Â·  13Comments