application force close on asynch task , on orientation change:android
<p>i am using asynchronous task for  doing some background operation as xml parsing on do in back ground, it works well , but on changing the origination of android device it causes force close , i  Google on it , but don't  any accordingly or can say unable to explore my self , please any one have idea about this share to me..i will be thankful of u ..</p>

<pre><code>     @Override
protected void **onPreExecute()** {


    if(refreshFlage)
    {
        Log.i("refreshFlage","refreshFlage");
        dialog = new ProgressDialog(ReplyForm.replyform);
        dialog.setMessage("Processing...");
        dialog.setIndeterminate(true);
        dialog.setCancelable(false);
        dialog.show();
    }
    else 
    {
        dialog = new ProgressDialog(QuestionScreen.questionscreen);
        dialog.setMessage("Processing...");
        dialog.setIndeterminate(true);
        dialog.setCancelable(false);
        dialog.show();  
    }


}

@Override
protected void **onPostExecute**(final Boolean success) {
    dialog.cancel();


    try {
        java.lang.System.gc();
    } catch (Exception e) {
        e.printStackTrace();
    }

    }else {

 try{

    }

}
     catch (NullPointerException e) {
        // TODO: handle exception
    }
 }
}

@Override
protected Boolean **doInBackground**(final String... args) {
    getQuestionsMethod();


    return null;
}

private void getQuestionsMethod() {
    // TODO Auto-generated method stub

    HttpResponse response = null;
    InputStream is = null;




        JSONObject jsonObj = new JSONObject(result);

        JSONObject jobj = jsonObj.getJSONObject("question");

        group_subject = jobj.getString(TAG_SUBJECT);
        question_id = jobj.getString(TAG_QUESTIONID);
        author_name = jobj.getString(TAG_AUTHORNAME);
        lastpost_date = jobj.getString(TAG_LASTPOSTDATE);
        replies = jobj.getString(TAG_REPLIES);
        newPost = jobj.getString(TAG_NEWPOST);
        userCanReply = jobj.getString(TAG_USERCANREPLY);

        poll = jobj.getString(TAG_POLL);

        HashMap&lt;String, Object&gt; groupdetailData = new HashMap&lt;String, Object&gt;();
        groupdetailData.put(TAG_SUBJECT, group_subject);
        groupdetailData.put(TAG_QUESTIONID, question_id);
        groupdetailData.put(TAG_AUTHORNAME, author_name);
        groupdetailData.put(TAG_LASTPOSTDATE, lastpost_date);
        groupdetailData.put(TAG_REPLIES, replies);
        groupdetailData.put(TAG_POLL, poll);
        groupdetailData.put(TAG_NEWPOST, newPost);
        groupdetailData.put(TAG_USERCANREPLY, userCanReply);

        int arrayCount = questiondetailarraylist.size();

        if (arrayCount &gt; 0) {
            questiondetailarraylist.clear();
        }






        if (poll.equalsIgnoreCase("true")) {
            pollmulti = jobj.getString(TAG_POLLMULTI);
            pollsubject = jobj.getString(TAG_POLLSUBJECT);
            Pollid = jobj.getString(TAG_POLLID);

            groupdetailData.put(TAG_POLLMULTI, pollmulti);
            groupdetailData.put(TAG_POLLSUBJECT, pollsubject);
            groupdetailData.put(TAG_POLLID, Pollid);

            //mDbHelper.insertPollfield(questionid, pollmulti, pollsubject, Pollid);



            groupdetailData.put("PollTrueData", pollTrueVector);
            //System.out.println("after poll method..");
        }


        //System.out.println(groupdetailData.size());
        questiondetailarraylist.add(groupdetailData);
        //System.out.println("11111111111111111");

    } catch (Exception e) {
        Log.e("log_tag", "Error converting result " + e.toString());
    }

}



        answersHashMap.put("vectorArray", vectorArray);

        answersHashMap.put("lastUpdateValue", lastUpdateValue);

    } catch (Exception e) {
        Log.e("log_tag", "Error converting result " + e.toString());
    }

}
</code></pre>
