-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyFDA doesn't shut down properly #8
Comments
Similar behavior on OS X and Linux Ubuntu. The python interrupter doesn't crash instantly after a close, it takes awhile (20 seconds). Segmentation fault on Linux and Unexpected failure on OS X. |
Under Windows it only takes one or two seconds instead of 20 seconds, but there is a delay. The problem could be due to the hierarchy of widgets: A simple widget like
can be terminated without problem. A more complex widget like
sometimes can be terminated by closing the window (but sometimes the kernel dies), using the "Quit" button never works. On the other hand, the even more complex widget input_tab_widgets can be closed without problems (so far). Strange. |
ahh, that was a bit hasty:
and terminate it using the "Quit" button lets the kernel die as well when attempting to rerun the above line. |
Problem could be in the _delEntry method of input_freq_specs.py (and other modules). |
I had hoped the issue might be related to infinite signal-slot loops - but after cleaning up the signal-slot mess the issue still exists. Strange: Ideas, anyone? |
I googled for this issue. It seems to be a general problem with the way PyQt is written. You're not doing anything wrong, it's just that the order of calling the destructors is undefined. It seems that the only workaround is See here for info: http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html#object-destruction-on-exit |
That's a good point, I've read about the sip module and sip.setdestroyonexit() a few times as well during the last week, but I had and have done some really nasty things in the software like deleting widgets that don't exist any longer, creating instances without relationship to the main window and so on. As a consequence, some other bugs (issue #6 and #7) disappeared with PR #23 as well. So I guess I'll use sip.setdestroyonexit() as an intermediate fix but try to clean up the plotting routines inheritance mess anyway. |
@vuki: Could you tell me at which level you set |
Works for me. File pyfdax.py, top of the file:
Then:
Any place before calling BTW, when i press Quit button in the left pane, it does not ask me for confirmation. |
Confirmed and fixed, unfortunately it only works for Python 3.x. |
After fiddling around with the dynamic creation and deletion of subwidgets, this seems to be one of the problems: Adding in input_filter.py 337: fb.fil_inst.destruct_UI() # disconnect signals from dyn. widget an attempt to disconnect signals before deleting corresponding subwidgets crashes the subwidget upon exit (started with python -m pyfda.input_widgets.input_filter |
It seems, the problem can be boiled down to Qt objects without parents, creating havoc when the app is closed. Currently, the app can be started and closed without problems when no plot widget is instantiated. The following parts of the app are / have been especially suspect:
|
Fixed in v0.1rc1! Unexpectedly, the last root cause was a double instantiation of a QSpacerItem under the same name "spacer" ... |
When closing the application by closing the window or by clicking the "Quit" button, the python kernel crashes (Windows 7, 64 bit). I don't know whether the same happens under other OS's.
The text was updated successfully, but these errors were encountered: