{"action":"opened","issue":{"url":"https://api.github.com/repos/AirtestProject/Airtest/issues/497","repository_url":"https://api.github.com/repos/AirtestProject/Airtest","labels_url":"https://api.github.com/repos/AirtestProject/Airtest/issues/497/labels{/name}","comments_url":"https://api.github.com/repos/AirtestProject/Airtest/issues/497/comments","events_url":"https://api.github.com/repos/AirtestProject/Airtest/issues/497/events","html_url":"https://github.com/AirtestProject/Airtest/issues/497","id":481507406,"node_id":"MDU6SXNzdWU0ODE1MDc0MDY=","number":497,"title":"[Poco not Thread-safe error] Check if UI Exists in a Separate Thread","user":{"login":"phantomsom","id":19833754,"node_id":"MDQ6VXNlcjE5ODMzNzU0","avatar_url":"https://avatars1.githubusercontent.com/u/19833754?v=4","gravatar_id":"","url":"https://api.github.com/users/phantomsom","html_url":"https://github.com/phantomsom","followers_url":"https://api.github.com/users/phantomsom/followers","following_url":"https://api.github.com/users/phantomsom/following{/other_user}","gists_url":"https://api.github.com/users/phantomsom/gists{/gist_id}","starred_url":"https://api.github.com/users/phantomsom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phantomsom/subscriptions","organizations_url":"https://api.github.com/users/phantomsom/orgs","repos_url":"https://api.github.com/users/phantomsom/repos","events_url":"https://api.github.com/users/phantomsom/events{/privacy}","received_events_url":"https://api.github.com/users/phantomsom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-08-16T08:44:12Z","updated_at":"2019-08-16T08:44:12Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nHi, I have a setup where I use one Thread to check if the Unity game got error, and the other Thread to run Airtest tests. \r\n\r\nIf that thread detects the error variable to have errors from the game, it stops the test thread.\r\n\r\nHowever, I get this error if I try to detect if Unity UI Exists in a separate thread, while the other thread is running tests. [Both using poco.click, poco.exist functions]\r\n\r\n```\r\npaste traceback here\r\n![image](https://user-images.githubusercontent.com/19833754/63154224-b8a97a80-c042-11e9-805b-1018f7b7b4c8.png)\r\n\r\n```\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Write code, while(true), use poco and check if UI exists\r\n2. Create one more thread to do the same, check if another UI exists\r\n3. Let it run, and encounter error. This happens if both threads call simplerpc.py's handle_message function.\r\n\r\n**Expected behavior**\r\n1. Provide a thread-safe solution so that multi-threaded approach can be applied using Airtest\r\n\r\n**python version:** `python3.7.2`\r\n\r\n**airtest version:** `1.0.27`\r\n"}}
{"actor":{"display_login":"phantomsom"}}