-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Kernel process lingers after closing tab when running different interpreter and Qt5 backend #17011
Comments
Hi @NicoHendrickx, Thanks for reporting, can you explain to me what do you mean by "restart the kernel by clicking the cross"? The cross in the tab of the console will close it, but it won't restart it. |
Thank you for the response. Apologies for being unclear before. I meant indeed closing it by clicking the cross in the tab of the console. If it was the only console open, a new one spawns automatically, that is why I erroneously referred to it as restarting. Still, I would expect the python thread to be killed when the console is closed (and with a thread in the spyder environment this also happens). /e fixed a typo |
I closed in a bit on the issue. It's the combination of the non-default interpreter and the Qt5 graphics backend! When setting the inline graphics backend, this issue does not arise. Would that give a hint as to where the issue might arise? I updated the initial problem report. |
@impact27, do you know why this is hapenning? |
That is strange, the kernel should be killed after 10 seconds if I am not mistaken. How do you start the kernel exactly? |
@impact27 Thanks for taking a look at this. So, what I do is the following:
Now, when I try this by installing Spyder in the test environment, the issue does not show up, but I would prefer to keep Spyder separated (to avoid pyqt5 version collisions). Note, I also tried restarting using ctrl+. but this often does not work at all. Just shows |
Hey @NicoHendrickx, thanks a lot for the detailed steps you posted above! With them I was able to reproduce this problem (it seems it only happens on Windows though) and find a solution for it, which will be in our next version. |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
When closing the console using the cross on the tab (ctrl-dot often does not work), the python process is not killed, but lingers around, until Spyder gets restarted. This issue only occurs when you use the Qt5 graphics backend and choose a different interpreter from the default Spyder one.
Both by setting the graphics interpreter to inline or installing Spyder in the same environment will alleviate the problem (but is not a solution).
This could (for instance) result into issues when hardware connections are made, as the addresses are not freed up, and reconnection is not possible until Spyder is restarted.
What steps reproduce the problem?
What is the expected output? What do you see instead?
Expected: underlying python thread is killed.
Instead: it stays alive
A way to visualise this, would be to initiate a Tk window. You'll see it stays alive after restarting the kernel. NOTE: this is NOT a prerequisite to have the issue occur, just a way to illustrate it.
Paste Traceback/Error Below (if applicable)
None
Versions
The text was updated successfully, but these errors were encountered: