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-4.2.5-x64 randomly hangs when executing statements in the interpreter during debugging #1212

Closed
retsyo opened this issue Jun 3, 2023 · 16 comments

Comments

@retsyo
Copy link

retsyo commented Jun 3, 2023

I am using officila PyScripter-4.2.5-x64 for windows 10 64 bits.

It random hangs when I try to run some statement in python interpreter window in debug processing. I made a record for your reference. And you can find PyScripter hangs( because the mouse changes into wait cursor) from 00:02:09 in the video.

This time, the hang starts about 19:58, then I leaved PyScripter untouched, the hang has not been solved till 21:33, so I killed PyScripter in the task manager

But sorry I can't find a way or simplified code to re-produce the hang for 100%.

@retsyo
Copy link
Author

retsyo commented Jun 3, 2023

here is the record

hang.mp4

@pyscripter
Copy link
Owner

pyscripter commented Jun 6, 2023

The code you are executing while debugging, is executed inside the execution frame. If it results in changes to that frame, that may crash the interpreter.

So, by its nature is a bit fragile and you should use it as a last resort and for simple pieces of code. Instead you can make use of the Variables window, Watches, and debugger hints (hover the mouse on top of variables) to inspect the value of variables.

@retsyo
Copy link
Author

retsyo commented Jun 6, 2023

Thanks. But I think it is friendly if we can change the value of variable during debugging. Often during the debugging, I find that some lines of my previous code has flaw, so I try to modify the value in the python interpreter window, thus I can test whether the following codes are ok or not, without re-debugging and re-tracing to meet the special case that can trigger the flaw.

And sorry to ask, is there any other IDE in which I can change variable(s) safely during debugging? Thanks

@pyscripter
Copy link
Owner

Changing variable values should definitely be safe. Executing complex functions may be not.
Most IDEs allow you to change the values of the variables.

@retsyo
Copy link
Author

retsyo commented Jun 6, 2023

but in my attached video, I just try to type in the variable name strOneUniqueUnit (which is just a python string) to show its value. I do not change its value or execute complex function, however pyscripter hangs.

@pyscripter
Copy link
Owner

but in my attached video, I just try to type in the variable name strOneUniqueUnit (which is just a python string) to show its value. I do not change its value or execute complex function, however pyscripter hangs.

Hence, I keep the issue open. It would help greatly to have a reproducible case.

@pyscripter pyscripter changed the title PyScripter-4.2.5-x64 for windows 10 64 bits random hangs PyScripter-4.2.5-x64 randomly hangs when executing statements in the interpreter during debugging Jun 6, 2023
@pyscripter pyscripter reopened this Jun 7, 2023
@pyscripter
Copy link
Owner

I have tried to address the issue in PyScripter.exe v4.2.7-x64.

Could you please test and report if it makes things better?

@retsyo
Copy link
Author

retsyo commented Jun 8, 2023

I can't tell because the hang happens randomly. I have to use pyscripter for a long time to observe. So please keep this issue opened for a period.

@retsyo
Copy link
Author

retsyo commented Jun 29, 2023

yes, the random hang is still alive even in PyScripter.exe v4.2.7-x64

pyscripter added a commit that referenced this issue Jul 2, 2023
@pyscripter
Copy link
Owner

pyscripter commented Jul 2, 2023

Another attempt in PyScripter.exe v4.2.8-x64.

@retsyo Could you please test and report if it makes things better?

And by the way are your scripts using multiple threads?

@retsyo
Copy link
Author

retsyo commented Jul 3, 2023

I will give it a try but as usual I have to use it for a period to catch the random hang

There is no multiprocess/thread in my code, hangs happen even for a simple pandas case in which there is only read_excel on filesnames gotten by glob. But since the hang appears randomly, I can't tell that pandas/glob lead to the issue.

@pyscripter
Copy link
Owner

@retsyo Any feedback on 4.2.8?

@retsyo
Copy link
Author

retsyo commented Aug 8, 2023

I don't know since I did not code too much for months.

@MGBergweiler
Copy link

MGBergweiler commented Sep 23, 2023

I also had regularly freezings (many a day) since version 4.1.1.0, when I started to use PySripter in Jan 2022, and must happily say that since I installed version 4.2.8 (now version 4.2.9), I have not gotten any freezing any more when checking the contents of variables in the interpreter window. Good work!

Even more, there seems to be a bug in delphivcl, where the method __subclasses__() only works AFTER I activate delphivcl's class completion in the interpreter window!?

@pyscripter
Copy link
Owner

@retsyo Any news? As you see above we have some positive feedback.

@retsyo
Copy link
Author

retsyo commented Oct 11, 2023

I don't know since I did not code too much for months.
But for now, let's close this issue. If necessary, I will be back.

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

3 participants