Note that there are some explanatory texts on larger screens.

plurals
  1. POAsyncTask doInBackground odd behavior
    primarykey
    data
    text
    <p><strong>ORIGINAL</strong> I have an AsyncTask which performs network requests, and it works fine. The environment I'm testing in is against Eclipse with the USB wired to the device to log information to LogCat. When detaching the USB wire from the device and re-attaching the wire back to the device I can see the LogCat session resume, afterwards, I exit the application and re-enter the application, and when the AsyncTask runs again, the network request fails.</p> <p><strong>Has anyone ever experienced odd behavior when performing network calls in between detaching and re-attaching the USB wire to the android device?</strong> The flow of the application appears normal as I've logged about every sequence up to the point &amp; through the point of the AsyncTask executing. <strong>The application is functional with the network calls when the USB is wired at all times.</strong> Might the LogCat have anything to do with this?</p> <p>Thanks.</p> <p><strong>EDIT</strong> The network request does not actually fail, the server just responds with an error code. But before I could start blaming the server, I performed multiple hits successfully through the browser to the same URL. I've only involved the USB into the picture, because the odd behavior only occurs when the USB is detached from the device and re-attached.</p> <p><strong>UPDATE</strong> After doing further research, I've finally diagnosed the issue but have no idea why it's so. When the debugger is attached to the process responsible for handling the network calls (background threads), the application works as expected. However, when the debugger is disconnected from the process, the network calls brings back the server error results.</p> <p><strong>How is the debugger influencing the network calls?</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload