I have problem in my application.
I want to show user's profile, and I have two links in my app.

One link is via TextView, which run **showUser(View v)** method:

```
public void showUser(View v){
    Intent i;

    i=new Intent(getApplicationContext(), ShowProfile.class);
    i.putExtra("id",user); // user is String with users ID

    startActivity(i);
}

```

And the second link is in dialog, which user can open:
( **I will post here whole method, but I'll highlight important part )**

```
AlertDialog.Builder builder = new AlertDialog.Builder(this);
    builder .setTitle(R.string.show_photo_show_rated_users_title)
            .setNegativeButton("Close", new DialogInterface.OnClickListener() {
                   @Override
                   public void onClick(DialogInterface dialog, int id) {
                       dialog.dismiss();
                   }
             });

    ListView modeList = new ListView(this);
    String[] stringArray = new String[ratedUsers.size()];

    for ( int i=0 ; i<ratedUsers.size() ; i++ ){
        stringArray[i] = ratedUsers.get(i).get("name");
    }

    ArrayAdapter<String> modeAdapter = new ArrayAdapter<String>(this, R.layout.dropdown_item_white, android.R.id.text1, stringArray);
    modeList.setAdapter(modeAdapter);
    modeList.setOnItemClickListener(new ListView.OnItemClickListener(){

/*********************** IMPORTANT PART *********************************/

        @Override
        public void onItemClick(AdapterView<?> parent, View arg1, int index,long arg3) { 
            Intent i;

            i=new Intent(ShowPhotoDetails.this , ShowProfile.class);
            i.putExtra("id",ratedUsers.get(index).get("id"));

            /**** ratedUsers is ArrayList<HashMap<String,String>> ****/

            startActivity(i);
        }});

    builder.setView(modeList);
    final Dialog dialog = builder.create();

    dialog.show();
}

```

And finally here's **ShowProfile.class**:

```
@Override
public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.profile);

    Intent i = getIntent();

    try {
        id = i.getStringExtra("id");
    }catch(Exception e){
        e.printStackTrace();
        Toast.makeText(getBaseContext(), "Error loading intent", Toast.LENGTH_SHORT).show();
        finish();
    }

    try{
        Log.w("ID",id); //always give right number
        new GetUserInformations().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, id);

        /* 
           If I comments this asyncTask, there's no error at all, but if I run it, It
           open debug View in Eclipse, says that "Source not found" and crashes...
           No LogCat Output
        */
    }catch(Exception e){
        e.printStackTrace();
    }
...

```

I wonder why in one case it run perfectly and in the other it crashes. As I wrote in code, there's no LogCat output for this crash. It don't even say **Uncaught exception** or something like this.

EDIT: I found out what gives me the error.

```
public class GetUserInformations extends AsyncTask<String,Void,Void>{
    Map<String,Object> tmpUser;
    @Override
    protected void onPreExecute(){
        tmpUser = new HashMap<String,Object>();
    }

    @Override
    protected Void doInBackground(String... arg) {
        try{
            int u_id = Integer.parseInt(arg[0]);
            tmpUser = myDb.getUser(u_id); // downloading info
        }catch(Exception e){
            e.printStackTrace();
        }
        return null;
    }

    @Override
    protected void onPostExecute(Void arg){
        if ( tmpUser != null ){

            Log.w("LOG",""+tmpUser.get("name"));

            name = (String) tmpUser.get("name");
            fbId = (String) tmpUser.get("id");
            email = (String) tmpUser.get("email");
            country = (Integer) tmpUser.get("country");

            userName.setText(name);
            profilepic.setProfileId(fbId);

            userSubscribe.setVisibility(View.VISIBLE);
        }
        else {
            Toast.makeText(getBaseContext(), "Error", Toast.LENGTH_SHORT).show();
            finish();
        }
    }

}

```

When I open activity for first time, everything downloads fine, but when I backPress and click on link to this Activity again, then it gives me NullPointerException.

Do you know why ?