Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7617255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:06:11+00:00 2026-05-31T03:06:11+00:00

i have the following code. When i am trying to call SongSearch.execute(searchterm); the app

  • 0

i have the following code. When i am trying to call SongSearch.execute(“searchterm”);
the app crashes.I calling the class inside onClick void . I also removed SongSearch.execute(“searchterm”); from inside of onClick void and the app didn’t crash. The problem is something with SongSearch class. here is my code. Thank you in advance

class SongSearch extends AsyncTask<String, String, String> {


 @Override
 protected void onPreExecute() {
     super.onPreExecute();
     dismissDialog(DIALOG_DOWNLOAD_PROGRESS);
     showDialog(DIALOG_DOWNLOAD_PROGRESS);



 }


 protected String doInBackground(String aurl) {
     int count;

     /////////////////////
     try
        {
          // create a url object
          URL url = new URL("http://google.com/search?sourceid=navclient&btnI=1&q=" + URLEncoder.encode(aurl, "UTF-8"));

          // create a urlconnection object
          URLConnection urlConnection = url.openConnection();

          urlConnection.connect();
          // wrap the urlconnection in a bufferedreader
          BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));

          String line=bufferedReader.readLine();
          musicurl = urlConnection.getURL().toString();
           musicurlfinal = musicurl.replace(".com/", ".com/dl/");

          // read from the urlconnection via the bufferedreader
          while ((line = bufferedReader.readLine()) != null)
          {

          }
          bufferedReader.close();
        }
        catch(Exception e)
        {
          e.printStackTrace();
        }
        return null;






 }
 protected void onProgressUpdate(String... progress) {
      Log.d("ANDRO_ASYNC",progress[0]);
      mProgressDialog.setProgress(Integer.parseInt(progress[0]));
 }

 protected void onPostExecute(String unused) {

     dismissDialog(DIALOG_DOWNLOAD_PROGRESS);
     startDownload();


 }


@Override
protected String doInBackground(String... arg0) {
    // TODO Auto-generated method stub
    return null;
}

}

here is my logcat

03-07 23:43:19.124: D/dalvikvm(6752): GC freed 720 objects / 57056 bytes in 74ms
03-07 23:43:20.224: I/AirpushSDK(6752): Push Service doPush....true
03-07 23:43:20.224: I/AirpushSDK(6752): Push Service doSearch....true
03-07 23:43:20.404: I/User Agent(6752): User Agent : true
03-07 23:43:20.414: D/LocationManager(6752): Constructor: service = android.location.ILocationManager$Stub$Proxy@4590f7b0
03-07 23:43:20.514: I/AirpushSDK(6752): Initialising.....
03-07 23:43:20.674: D/dalvikvm(6752): GC freed 1442 objects / 130312 bytes in 59ms
03-07 23:43:26.527: I/AirpushSDK(6752): SDK will restart in 13260000 ms.
03-07 23:43:28.864: D/AndroidRuntime(6752): Shutting down VM
03-07 23:43:28.864: W/dalvikvm(6752): threadid=3: thread exiting with uncaught exception (group=0x40026160)
03-07 23:43:28.864: E/AndroidRuntime(6752): Uncaught handler: thread main exiting due to uncaught exception
03-07 23:43:28.864: E/AndroidRuntime(6752): java.lang.IllegalArgumentException: no dialog with id 0 was ever shown via Activity#showDialog
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.app.Activity.missingDialog(Activity.java:2524)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.app.Activity.dismissDialog(Activity.java:2509)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at com.freemusicdownloader.androdes.MusicDownloaderActivity$SongSearch.onPreExecute(MusicDownloaderActivity.java:403)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.os.AsyncTask.execute(AsyncTask.java:391)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at com.freemusicdownloader.androdes.MusicDownloaderActivity$3.onClick(MusicDownloaderActivity.java:172)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.view.View.performClick(View.java:2418)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.view.View.onTouchEvent(View.java:4233)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.view.View.dispatchTouchEvent(View.java:3763)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:968)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:968)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:968)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:968)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.app.Activity.dispatchTouchEvent(Activity.java:2064)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.os.Looper.loop(Looper.java:123)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at android.app.ActivityThread.main(ActivityThread.java:4370)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at java.lang.reflect.Method.invokeNative(Native Method)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at java.lang.reflect.Method.invoke(Method.java:521)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-07 23:43:28.864: E/AndroidRuntime(6752):     at dalvik.system.NativeStart.main(Native Method)
03-07 23:43:28.884: E/SemcCheckin(6752): Get crash dump level : java.io.FileNotFoundException: /data/semc-checkin/crashdump
03-07 23:43:28.884: I/dalvikvm(6752): threadid=7: reacting to signal 3
03-07 23:43:28.904: I/dalvikvm(6752): Wrote stack trace to '/data/anr/traces.txt'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:06:13+00:00Added an answer on May 31, 2026 at 3:06 am

    Calling dismissDialog(DIALOG_DOWNLOAD_PROGRESS); without a dialog that needs to be dismissed will throw an IllegalArgumentException (it’s even specified so in the Android JavaDoc) – you need to maintain state that allows you to check whether or not you need to dismiss this dialog.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to call c functions from python, I have the following code in
I have the following code: class Program { static void Main(string[] args) { Console.WriteLine(SqrtRoot(0));
I have the following code I am trying to understand: >>> class DistanceFrom(object): def
I have following code snippet and i am trying to evaluate the time take
I'm trying to use opengl in C#. I have following code which fails with
I have the following code that I am trying to extract the systems proxy
I have the following code that i am trying to change from a regular
I have the following code sample that im trying to wrap my head around
I have the following code, I'm trying to get a table with 4 columns
I have the following code in my main page, trying to pull AJAX JSON.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.