AsyncTask: doInBackground is not finishing

I’am trying to implement an AsyncTask in Android that will load all my data from the database. Therefore I used the onPreExecute method to start a ProgressDialog

public class DataLoader extends AsyncTask<Void, Void, Void> {

private LoginActivity activity;
private ProgressDialog nDialog;

public DataLoader (LoginActivity act){
    this.activity = act;
    nDialog = new ProgressDialog(activity);
}

protected void onPreExecute() {
    System.out.print("Start AsyncTask");
    nDialog.setMessage("Loading data..");
    nDialog.setTitle("Starting the application");
    nDialog.setIndeterminate(false);
    nDialog.setCancelable(true);
    nDialog.show();
}

@Override
protected Void doInBackground(Void ... params) {
    System.out.println("Starting doInBackground");
    loadDashboardData();
    return null;
}

protected void onPostExecute() {
    nDialog.dismiss();
    Intent i = new Intent();
    i.setClass(activity.getApplicationContext(), DashboardActivity.class);
    activity.startActivity(i);
}

The I use the doInBackground method to load call a function to load the data. This method is called from an visible activity. The task is called with:

public class LoginActivity extends Activity {
    public void onClick(View v) {
        DataLoader dl = new DataLoader(this);
        dl.execute();
    }
}

And the code for the doInBackground is:

protected Void doInBackground(Void ... params) {
    System.out.println("Starting doInBackground");
    loadDashboardData();
    return null;
}

Now the problem is that my doInBackground method will not finish. I tried to implement the loadDashboardData() call in the onPreExecute method. This will not show my dialog box but it will load the data correctly.

What can hinder the doInBackground method to execute correctly and load the data properly? The called method works (because I can call it and get the correct data). Also I’am not seeing the println in my run console.
In the frontend I can see the progressbar spinning, but in the backend I can see that no data is loaded.