rticau / ScreenCapLibrary

Robot Framework test library for capturing screenshots and video recording.
Apache License 2.0
38 stars 15 forks source link

Using python3.9 process stay zombie and it not finish the execution #67

Closed TA-ELearning closed 3 years ago

TA-ELearning commented 3 years ago

General information:

Description of the warning/error

Using the Library in robot tests image

Then running the robot framework command

robot -d Results -v env:qa -i TC0001 Tests

the python stay zombie at the end image

and in command line image

and to release the python it is need to kill the interpreter image

Other details

More information

robotframework-screencaplibrary in (1.5.0) pillow>=5.2.0 in (from robotframework-screencaplibrary) (8.1.0) opencv-python>=4.2.0.32 in (from robotframework-screencaplibrary) (4.5.1.48) imageio>=2.6.1 in (from robotframework-screencaplibrary) (2.9.0) mss>=4.0.3 in (from robotframework-screencaplibrary) (6.1.0) robotframework>=3.0 in (from robotframework-screencaplibrary) (3.2.2) pyautogui>=0.9.52 in (from robotframework-screencaplibrary) (0.9.52) numpy in (from imageio>=2.6.1->robotframework-screencaplibrary) (1.19.5) pymsgbox in (from pyautogui>=0.9.52->robotframework-screencaplibrary) (1.0.9) PyTweening>=1.0.1 in (from pyautogui>=0.9.52->robotframework-screencaplibrary) (1.0.3) pyscreeze>=0.1.21 in (from pyautogui>=0.9.52->robotframework-screencaplibrary) (0.1.26) pygetwindow>=0.0.5 in (from pyautogui>=0.9.52->robotframework-screencaplibrary) (0.0.9) mouseinfo in (from pyautogui>=0.9.52->robotframework-screencaplibrary) (0.1.3) pyrect in (from pygetwindow>=0.0.5->pyautogui>=0.9.52->robotframework-screencaplibrary) (0.1.4) pyperclip in (from mouseinfo->pyautogui>=0.9.52->robotframework-screencaplibrary) (1.8.1)

cristii006 commented 3 years ago

Hello @TA-ELearning,

First thank you for detailed problem description and reproduction steps. Indeed this is a reproducible problem that occur only when using Python 3.9. I tried with other Python versions to recreate the problem and it is working fine. Other robotframework libraries are working as expected. After some testing we are clear now that the problem is occurring only when recording the screen because keywords like Take Screenshot are working fine. It seems like the way we handle the thread that is capturing the screen is causing this problem.

We will have to find a fix for this problem as the task is consuming resources until we end it.

Best regards, Cristi

mihaiparvu commented 3 years ago

Fixed in https://github.com/mihaiparvu/ScreenCapLibrary/commit/ad865d90f7130b6dbd3506c5607873b70874b672