Skip to content
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

Pyscripter randomly locks up - still #1124

Open
jlaispx opened this issue Sep 3, 2021 · 13 comments
Open

Pyscripter randomly locks up - still #1124

jlaispx opened this issue Sep 3, 2021 · 13 comments

Comments

@jlaispx
Copy link

jlaispx commented Sep 3, 2021

This is a continuation of #641

This random "not responding" problem has been happening for the last 4 years. It happens several times an hour.

It is now 2021 and this problem still happens in Pyscripter 3.6.4.0 x64 and Python 3.9

The "solution" seems to be always "upgrade to latest version". This action, at no time, has prevented this error happening again. I have tried all the "tweaks" that people have suggested.

I have been trying to use Pyscripter for many many years, and like what it does in general. It is this problem that has forced me to move on to other IDE's that are more stable.

I hope you are able to solve it, otherwise I cannot recommend it to all my students.

@pyscripter
Copy link
Owner

Could you please try version 4 and report if the issue still occurs?

@houbit
Copy link

houbit commented Oct 19, 2021

I used 3.x alot and got a hanging PyScripter from time to time, really very seldom.
Using 4.x PyScripter (with Python39) hangs on a regular basis, mostly when using the interpreter window.
KIlling PyScripter leaves a active, heavily working python alive, consuming cpu time.
Updating the rpyc libraries did not change anything.
I guess, there is some race condition decoupling PyScripter and python.exe when usigng rpyc.

@neomax789
Copy link

I have also been using Pyscripter for years and it constantly locks up. I am also sick of upgrading versions to no avail.
In Windows 10 I have to constantly go into Task Manager and kill the python processes sometimes I even have to kill Pyscripter and lose all the files I have open.

Seeing that "Reinitialize Python Engine" does not work anymore which should be a solution can you please at LEAST save the open tabs when you open a file. At least that will save the state of Pyscripter so I don't feel like uninstalling it every time this happens to me and then use VS Code like everyone else who is tired of flaky IDEs.

@pyscripter
Copy link
Owner

I am very keen to address this issue. But I need steps to reproduce it. Once I get a way of reproducing it I can provide a proper fix.

@neomax789
Copy link

I was simply debugging and editing a simple file which was using only a few python modules , I locked my computer and after I came back to it, PS was frozen again. It was still in debug mode which always seems to cause it, and whenever I try to actually type variable names to see values in the console output I am scared it will result in a lockup. Complex variables seem to trigger it. Its obvious to me its a debugging data passing/connection issue with the remserver.py. I also don't know why PS needs 3 separate python processes.

I would like Pyscripter to be solid like it was in the past, I actually like that it was built using Delphi, I even was trying to compile it way back to solve this issue but ran out of time.

Just give us a button that says kill all python.exe child processes so you can at least stay in the IDE and not want to smash things when every file you had open is lost.

@pyscripter
Copy link
Owner

pyscripter commented Jan 18, 2023

@neomax789

So the crash happens when

  • you are debugging
  • and you issue commands (type variables names) in the interpreter window when the program is stopped at a breakpoint.

Is this correct? If you don't use the interpreter window while debugging then there are no crashes.

By the way you can hover the mouse over variable names in the editor to see values. Does this also result in crashes?

Please also confirm that you are using the latest version.

Is it possible to share one of the scripts in which you see crashes? Even better if you specify the steps that led to the crash. (i.e. I set a breakpoint at line x, and when I hit the breakpoint, I typed xyz in the editor).

@neomax789
Copy link

neomax789 commented Jan 19, 2023

Hover over vars for values does work and I use it.
This time it was paused in debug mode, but I did nothing other then log back into my locked computer, so it was idle for 40 minutes.
Just tried to hit STOP and it does nothing, that is when I know I am screwed, trying to STOP debugging or end the current debugging which was paused.

I also tend to leave PS open permanently as I had crashes in the past just closing it so I don't like losing the current state of the tabs , app and window settings.
The 2nd last time it was a command with a variable I typed in the interpreter window and it locked up, so now I only type basic variables in it.
The 3rd last time I was just editing and running code.

I have tried changing settings in the past .... autocompletion, variable hover, file change values, but nothing ever seemed to fix it.
I would promote PS with the programmers I know but not until this issue is fixed.
If you have a way to debug PS and LOG more information on the background events happening I am interested.

@pyscripter
Copy link
Owner

pyscripter commented Jan 19, 2023

  • Can you share (attach here) a script that you are having troubles with? It may help.
  • Are using the latest version of PyScripter?
  • Which version of python are you using?

@neomax789
Copy link

neomax789 commented Jan 19, 2023

I was using the ldap3 module at the time which is used in a lot of the code I work on, and I can not share it for business reasons.
When I get another lockup I will attempt to replicate it now I know your interested.
Currently running PS 4.2.5.0 x64
Python 3.10.4

@pyscripter
Copy link
Owner

pyscripter commented Jan 19, 2023

ldap3 uses sockets and may be some strange interaction with the TCP/IP connections PyScripter uses.

Do you see crashes with scripts not using ldap3?

One thing to try:

  • Make sure you have pywin32 installed in your python. (install with pip)
  • Uncheck Tools, Options, IDE Options, Python Interpreter, Always Use Sockets.

PyScripter can interact with the debugged program using Windows pipes. Please report whether this makes things better. This should also be faster.

@neomax789
Copy link

Thanks I will try that

@neomax789
Copy link

I did try that after another crash but now if I run code I am working on using import win32pipe, win32file, pywintypes
I get instantly
Error : could not connect to the remote Python engine server…. Debugger is not available.

@pyscripter
Copy link
Owner

pyscripter commented Jan 21, 2023

Strange
Here I can run/debug the following with the Windows pipes connection. There must be something more you are doing in addition to importing win32pipes.

import win32pipe, win32file, pywintypes
def main():
    print('pass')

if __name__ == '__main__':
    main()

Could you please provide a minimal script that fails to run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants