Hello, My program was going wonderfully. It is a search engine that connects to our back end database by sending Get requests to our server and displays the results. I've managed to get it to query my server and back end database, return results using JSON, return the first headers and pour them into a ListView widget in the main activity. Then when the user clicks on one of the headers it then sends another query from a sub-activity. It then parse those results and format them neatly into a WebView embedded into the sub-activity.
All this works perfectly. That is until I come to make a second query on the main activity. Listed below is my stack trace of where the error happens. I think I know why this is happening, but obviously not clearly understanding it. I think it is because I am trying to call AsyncTask again. I remember reading that the AT can only be called once, but I presumed quite wrongly that this meant you can not do concurrent calls. I thought that once an AT had done it's task it was cleared and then could be called again, but this does not seem to be the case. Is it because of AT attempts at more than one call ? If so, would I be better changing that section into a Handler with a Runnable on the main activity? -----Stack Trace---- 04-10 17:25:05.684: ERROR/AndroidRuntime(1446): Uncaught handler: thread AsyncTask #1 exiting due to uncaught exception 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): java.lang.RuntimeException: An error occured while executing doInBackground() 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at android.os.AsyncTask$3.done(AsyncTask.java:200) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java: 234) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:258) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at java.util.concurrent.FutureTask.run(FutureTask.java:122) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:648) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:673) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at java.lang.Thread.run(Thread.java:1058) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): Caused by: java.lang.IllegalStateException: Manager is shut down. 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at org.apache.http.impl.conn.SingleClientConnManager.assertStillUp(SingleClientConnManager.java: 173) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java: 211) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at org.apache.http.impl.conn.SingleClientConnManager $1.getConnection(SingleClientConnManager.java:189) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java: 325) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java: 555) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java: 487) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java: 465) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at com.abulba.moviedb.SvrBridge.getResult(SvrBridge.java:73) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at com.abulba.moviedb.SearchEngine.getInfo(SearchEngine.java:67) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at com.abulba.moviedb.main$jsonSearch.doInBackground(main.java:162) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at com.abulba.moviedb.main$jsonSearch.doInBackground(main.java:1) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at android.os.AsyncTask$2.call(AsyncTask.java:185) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256) 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): ... 4 more -----Stack Trace---- Regards Anthoni -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.

