title: leaked windows DecorView@666372[] that was originally added here
body: <p>i got a problem when trying to send data to server. it says leaked windows that was originally added here. here is my code</p>
  
  <pre><code>public class Feedback extends AppCompatActivity {
  
      Spinner topic;
      EditText subject, feedback;
      Button btnsend;
      List&lt;String&gt; listTopic;
      ArrayAdapter&lt;String&gt; listarray;
      String topik, subj, nup, feed;
      private ProgressDialog pDialog;
      String feed_url = "http://ds.bki.co.id:7777/ds/android/feedback.php";
      AlertDialog.Builder builder;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_feedback);
  
          builder = new AlertDialog.Builder(Feedback.this);
  
          listTopic = new ArrayList&lt;String&gt;();
          listTopic.add("Interface");
          listTopic.add("Menu");
          listTopic.add("Features Request");
          listTopic.add("Bugs");
          listTopic.add("Others");
  
          topic = (Spinner) findViewById(R.id.spinner);
          listarray = new ArrayAdapter&lt;String&gt;(getApplicationContext(), simple_dropdown_item_1line, listTopic);
          listarray.setDropDownViewResource(simple_dropdown_item_1line);
          topic.setAdapter(listarray);
  
          topic.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
              @Override
              public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  topik = parent.getItemAtPosition(position).toString();
              }
  
              @Override
              public void onNothingSelected(AdapterView&lt;?&gt; parent) {
  
              }
          });
  
          subject = (EditText) findViewById(R.id.subJect);
          feedback =(EditText) findViewById(R.id.feedBack);
          btnsend =(Button) findViewById(R.id.btnSend);
  
  
  
          btnsend.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  subj = subject.getText().toString();
                  feed = feedback.getText().toString();
                  nup = SaveSharedPreference.getNup(getApplicationContext());
  
                  Log.d("a", subj);
                  Log.d("b", feed);
                  Log.d("c", nup);
                  Log.d("d", topik);
  
                  new SendFB().execute();
              }
          });
  
      }
  
      private class SendFB extends AsyncTask&lt;Void, Void, Void&gt; {
          @Override
          protected void onPreExecute() {
              super.onPreExecute();
              pDialog = new ProgressDialog(Feedback.this);
              pDialog.setMessage("Please wait...");
              pDialog.setIndeterminate(false);
              pDialog.setCancelable(true);
              pDialog.show();
          }
  
          @Override
          protected Void doInBackground(Void... arg0) {
  
              if (subj.equals("")||feed.equals("")){
                  builder.setTitle("Something went wrong");
                  builder.setMessage("Enter a valid NUP and Password");
                  displayAlert("input_error");
              }
              else
              {
                  StringRequest stringRequest = new StringRequest(Request.Method.POST, feed_url, new Response.Listener&lt;String&gt;() {
                      @Override
                      public void onResponse(String response) {
                          try {
                              JSONArray jsonArray = new JSONArray(response);
                              JSONObject jsonObject = jsonArray.getJSONObject(0);
                              String code = jsonObject.getString("code");
                              String message = jsonObject.getString("message");
                              if (code.equals("Feedback success")) {
                                  builder.setTitle("Feedback success...");
                                  builder.setMessage(message);
                                  displayAlert(code);
                              } else {
                                  builder.setTitle("Feedback Failed...");
                                  builder.setMessage("Please check your internet connection");
                                  displayAlert(code);
                              }
  
                          } catch (JSONException e) {
                              e.printStackTrace();
                          }
                      }
                  }, new Response.ErrorListener() {
                      @Override
                      public void onErrorResponse(VolleyError error) {
  
                      }
                  }) {
                      @Override
                      protected Map&lt;String, String&gt; getParams() throws AuthFailureError {
                          Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
  
                          params.put("Nup", nup);
                          params.put("topik", topik);
                          params.put("subject", subj);
                          params.put("feedback", feed);
                          return params;
                      }
                  };
                  MySingleton.getInstance(Feedback.this).addToRequestque(stringRequest);
              }
              return null;
          }
          @Override
          protected void onPostExecute(Void result) {
              super.onPostExecute(result);
              if (pDialog.isShowing())
                  pDialog.dismiss();
          }
      }
  
      public void displayAlert(final String code) {
          builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int which) {
  
                  if (code.equals("Feedback success")) {
                      subject.setText("");
                      feedback.setText("");
                  }
                  else if (code.equals("input_error")) {
                      subject.setText("");
                      feedback.setText("");
                  }
                  else if (code.equals("Feedback Failed...")) {
                      subject.setText("");
                      feedback.setText("");
                  }
  
              }
          });
          AlertDialog alertDialog = builder.create();
          alertDialog.show();
      }
  }
  </code></pre>
  
  <p>I used the same code for my other page and I didn't get error but when i implemented the same code I got an error and i don't know where is the error came from. can anybody help me?</p>
  
  <pre><code>FATAL EXCEPTION: AsyncTask #3
  Process: com.icul.bkiisee, PID: 31153
  java.lang.RuntimeException: An error occurred while executing doInBackground()
      at android.os.AsyncTask$3.done(AsyncTask.java:318)
      at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
      at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
      at java.util.concurrent.FutureTask.run(FutureTask.java:242)
      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
      at java.lang.Thread.run(Thread.java:761)
   Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
      at android.os.Handler.&lt;init&gt;(Handler.java:200)
      at android.os.Handler.&lt;init&gt;(Handler.java:114)
      at android.app.Dialog.&lt;init&gt;(Dialog.java:121)
      at android.app.Dialog.&lt;init&gt;(Dialog.java:166)
      at android.support.v7.app.AppCompatDialog.&lt;init&gt;(AppCompatDialog.java:46)
      at android.support.v7.app.AlertDialog.&lt;init&gt;(AlertDialog.java:97)
      at android.support.v7.app.AlertDialog$Builder.create(AlertDialog.java:929)
      at com.icul.bkiisee.Feedback.displayAlert(Feedback.java:207)
      at com.icul.bkiisee.Feedback$SendFB.doInBackground(Feedback.java:132)
      at com.icul.bkiisee.Feedback$SendFB.doInBackground(Feedback.java:116)
      at android.os.AsyncTask$2.call(AsyncTask.java:304)
      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243) 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
      at java.lang.Thread.run(Thread.java:761)
  </code></pre>
  
  <p>this is the error i got when running the application</p>