title: AsyncTask: doInBackground not called
body: <p>I have a problem with the <code>AsyncTask</code>. Sometimes the <code>doInBackground()</code> method is not called after <code>onPreExecute()</code>.</p>
  
  <p>I know this question was asked several times but the given answers don't work for me.</p>
  
  <p>Here is a part of my code:</p>
  
  <pre><code>AsyncTask&lt;Void, Void, Void&gt; asyncTask = new AsyncTask&lt;Void, Void, Void&gt;(){
  
      @Override
      protected void onPreExecute() {
          super.onPreExecute();
          Log.e("AsyncTask", "onPreExecute");
      }
  
      @Override
      protected Void doInBackground(Void... params) {
          Log.e("AsyncTask", "doInBackground");
          return null;
      }
  
      protected void onPostExecute(Void result) {
          Log.e("AsyncTask", "onPostExecute");
      };
  
  };
  
  if(Build.VERSION.SDK_INT &gt;= 11)
      asyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
  else
      asyncTask.execute();
  </code></pre>
  
  <p>As you can see, I check if the Android version is >= HoneyComb and execute the task in the Pool Executor if it's true.
  Even with that "trick" sometimes <code>doInBackground()</code> is not called.</p>
  
  <p>Does somebody have the same issue or knows how what's the problem?</p>
  
  <p>Thank you</p>