android.view.WindowManager$BadTokenException: - popup window on activity start
<p>I have been hunting for the answer to this but most seem to point to getApplicationContext() issues but I am not using getApplicationContext().
Basically I am trying to have a popup window open on start up of a activity but when the activity starts it force closes with the above error. </p>

<p>The code im have writen is:</p>

<pre><code>protected void onCreate(Bundle paramBundle) {
    super.onCreate(paramBundle);
    setContentView(R.layout.installguides_menu);
    setTitleFromActivityLabel(R.id.title_text);

    btn_Back = (Button) findViewById(R.id.btn_Back);
    btn_Back.setOnClickListener (btn_Back_onClick);

    btn_Ubuntu10Guide   = (Button) findViewById(R.id.btn_Ubuntu10Guide);
    btn_Ubuntu12Guide   = (Button) findViewById(R.id.btn_Ubuntu12Guide);
    btn_BacktrackGuide  = (Button) findViewById(R.id.btn_BacktrackGuide);
    btn_DebianGuide     = (Button) findViewById(R.id.btn_DebianGuide);

    btn_Ubuntu10Guide   .setOnClickListener (btn_Ubuntu10Guide_onClick);
    btn_Ubuntu12Guide   .setOnClickListener (btn_Ubuntu12Guide_onClick);
    btn_BacktrackGuide  .setOnClickListener (btn_BacktrackGuide_onClick);
    btn_DebianGuide     .setOnClickListener (btn_DebianGuide_onClick);

    LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);  
    View popupView = layoutInflater.inflate(R.layout.donation_popup, null);  
             final PopupWindow popupWindow = new PopupWindow(
               popupView, 
               LayoutParams.WRAP_CONTENT,  
                     LayoutParams.WRAP_CONTENT);  

     Button btnDismiss = (Button)popupView.findViewById(R.id.dismiss);
     btnDismiss.setOnClickListener(new Button.OnClickListener(){

     public void onClick(View v) {
      popupWindow.dismiss();
     }});

     popupWindow.showAsDropDown(btn_Ubuntu10Guide, 50, -30);
}
</code></pre>

<p>Hope you guys can help, been hunting for the answer for hours so your my last hope!</p>
