-
-
Notifications
You must be signed in to change notification settings - Fork 313
Debug cause of freezing leading to forced restart #1228
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
Comments
This is related to #1212. Please wait for the new version that resolves this. |
Please check out version 4.3 and provide feedback regarding this issue. |
You've a typo in your blog - says 4.2
Peet
…On Sat, Oct 14, 2023 at 4:44 AM pyscripter ***@***.***> wrote:
Please check out version 4.3 and provide feedback regarding this issue.
—
Reply to this email directly, view it on GitHub
<#1228 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALSCZKVIEHWMSCNTRC7GDDX7IDC7AVCNFSM6AAAAAA55QJHASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRSGU2DQMZUHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Fixed. Thanks! |
I am not sure, where this issue should be adressed, but it still hangs/freezes in my environment after certain imports. For instance, if i install oracledb with "pip install oracledb" and then have a file with content like
Then i can run it without any issue, but if i uncomment the line with "import oracledb" - it freezes and pyscripter needs to be restarted. |
The mentioned behaviour occures only with remote engine, if i use internal engine instead - no hangs are observed |
I've tried to disable completely defender firewall - despite that the issue still persists with remote engine |
The regression happened somewhere after 4.2.5 - i tested 4.2.5 with Python 3.11.8 and no freezing happened. With 4.3.4 and Python 3.11.8 it hangs equally as with Python 3.12.2 |
Thanks. I will investigate... Is it just the oracledb module that is causing you trouble or you have problems with other modules? |
I found the reason for the freezing: What was added to Pyscripter a few versions back is the following: for t in threading.enumerate():
if (t != threading.main_thread()) and not t.daemon:
try:
t.join()
except:
pass This is executed after running or debugging a script. As you can see the python main thread waits for the oracledb thread to finish and oracledb waits for the main thread to finish - hence the blockage. Whilst I think it is bad design the way the oracledb thread waits for the main thread to finish, I will consider removing the PyScripter code that waits for non-deamon threads to finish or add a timeout parameter, so that it does not block forever. In the meantime pressing the Abort button and then using the command Run, Python Engine, Reinitialize Python Engine, should work. |
@Maxim4711 Fixed in version control. The fix will be available with the next release. In the meantime you can download the updated executable and test it. Just replace PyScripter.exe with the one in the zip file. |
Wow, cool, with 5.0 version the freezing behavior is gone! Thanks a lot for your great support Regards Maxim |
Occasionally, I find that PyScripter will cease responding and lock-up, requiring a forced process termination.
This usually happens when querying objects' states via the REPL, possibly during debugging (but not sure, I will try and log exactly when in future). The locking-up appears to exhibit all of the classic signs on a threading, come fatal embrace. After terminating PyScripter, I also have to go and kill a running Python instance which will typically be consuming around 75% of the CPU.
What is the best method for assisting with the diagnosis of such hangs? Can a mechanism (even if it's simple logging) be added to assist in this?
By the way, this most recently happened on a new Windows 11 machine on which Python (3.11.2) and the latest (current) version of PyScripter was installed for teaching purposes. So, it's not just my Windows 10 machine.
The text was updated successfully, but these errors were encountered: