Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Sometime, It stopped in loop. I don't know why? #31

Closed
ghost opened this issue Jun 9, 2016 · 12 comments
Closed

Sometime, It stopped in loop. I don't know why? #31

ghost opened this issue Jun 9, 2016 · 12 comments

Comments

@ghost
Copy link

ghost commented Jun 9, 2016

thread = threading.Thread(target=self.run_test,
args=(self.event, db, self.app_status_queue,))
thread.daemon = True
self.status_run_app = True
self.event.set()
thread.start()

func loop:

def run_test()
   while true:
     u = atx.connect()
    #action test ...
     kill adb

My log.txt
log.txt
log-2.txt

@codeskyblue
Copy link
Member

actually atx will raise exception in some condition.. you should use try. ... catch

@ghost
Copy link
Author

ghost commented Jun 9, 2016

I checked but It's not raise any exception and I used click by text

@codeskyblue
Copy link
Member

Exceptions will be ignored in python theading. you must add try except manually if you want see some exceptions

@ghost
Copy link
Author

ghost commented Jun 9, 2016

Where should I add it ? How to do it? Line of code in theading. ?
Ex:

def run_test()
   while true:
      try:
          u = atx.connect()
      except Exception as e:
           # to do
      try:
          u.click(text="ABC")
      except Exception as e:
         # to do
``

@codeskyblue
Copy link
Member

yeah it should works this way

@codeskyblue
Copy link
Member

@thehung12a3 resolved?

@ghost
Copy link
Author

ghost commented Jun 12, 2016

@codeskyblue No.

@codeskyblue
Copy link
Member

@codeskyblue
Copy link
Member

Too long time, closed for now, you got any progress, please reopen it.

@ghost
Copy link
Author

ghost commented Jun 22, 2016

error

Hi @codeskyblue
It stop's at that positions. I think. It's problem with RPC.
How to fix it to make sure that app don't stop?

@wuxc
Copy link
Collaborator

wuxc commented Jun 23, 2016

@henryhoang92

  1. what do you mean by 'stop', exit or hung?
  2. is all rpcs fail or just some special ones?
  3. is it phone related? have you tried on another phone?

@ghost
Copy link
Author

ghost commented Jun 23, 2016

After execute command log.debug("TA_1") then It isn't return anything. Stop at command return _method_obj(*args, **kwargs)

  • No return any exceptions. Just stop at that and don't execute any command line. I think It's problem with RPC server.

+I want to return an exception for this problem . how to do it?

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

No branches or pull requests

2 participants