-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
[Bug] Debugger doesnt return to command line when using RobotCode in combination with ScreenCapLibrary #131
Comments
ok, I checked and found out that the ScreenCapLibrary is deleting the running ThreadPoolExecutor queues from the Python interpreter. see here: https://github.com/rticau/ScreenCapLibrary/blob/146304edac5a062a39f6c738a0516212acbd0197/src/ScreenCapLibrary/client.py#L37 This worked under Python 3.8, because the thread queues were still daemon threads. Daemon threads are simply killed by Python on shutdown. In new Python version it is tried to shutdown these ThreadPoolExecutor threads reasonable, but because the list of ThreadPoolExecutor threads is empty now, because it is deleted by the ScreenCap library, there are still threads running in the background, which are not terminated correctly. From my point of view this must be corrected in the ScreenCapLibrary, because it not only affects the RobotCode debugger, but probably also other libraries, I know that the BrowserLibrary also uses ThreadpoolExecutors. I would prefer not to implement a workaround only for a library that hacks the Python interpreter ;-) I created an issue in the ScreenCapLibrary project, let's see what happens. A workaround at the moment is to hack ScreenCapLibrary, just change this line: https://github.com/rticau/ScreenCapLibrary/blob/146304edac5a062a39f6c738a0516212acbd0197/src/ScreenCapLibrary/client.py#L252 like this: @staticmethod
def clear_thread_queues():
# _threads_queues.clear()
pass |
Hi Daniel, Thanks for investigating the issue and for providing a workaround! Daniel |
@Daniwin82 |
I applied the solution you provided locally. Works for me. Daniel |
ok, thanks for feedback! and maybe you can give this issue a thump up rticau/ScreenCapLibrary#84 |
SUMMARY:
When using the robotcode extension, RF doesn't return to the commandline after finishing a testcase.
RF: 4.1.3 and 6.0.2
extension version: 0.28.2
SCENARIO:
Install ScreenCapLibrary
Add 'Start Video Recording' to the TestSetup
Add 'Stop Video Recording' to the TestTearDown
Run a simple testcase logging something
RESULT:
The text was updated successfully, but these errors were encountered: