Friday, December 24, 2010

Re: [android-developers] Getting a strange MessageQueue warning w/ DefaultHttpClient in AsyncTask

I can tell you for sure that I do exactly the same thing
(DefaultHttpClient in an AsyncTask), and I don't get warnings.... so
it's almost certainly something you are doing... Need to see some code
to know for sure.


Sincerely,

Brad Gies
-----------------------------------------------------------------------
Bistro Bot - Bistro Blurb
http://bgies.com http://nocrappyapps.com
http://bistroblurb.com http://forcethetruth.com
http://ihottonight.com
-----------------------------------------------------------------------
Everything in moderation, including abstinence (paraphrased)

Every person is born with a brain... Those who use it well are the successful happy ones - Brad Gies

Adversity can make or break you... It's your choice... Choose wisely - Brad Gies

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead


On 24/12/2010 5:07 PM, Bret Foreman wrote:
> I'm doing a set of HTTP posts (using DefaultHttpClient), each in its
> own AsyncTask. Functionally, it works fine but I'm getting the warning
> below in the log. This warning appears for each instance of the
> AsyncTask. I'm guessing that the HTTP Client in posting a message (to
> itself?), then the task exits, then the message is undeliverable. Has
> anyone seen this behavior before or have an idea how I might prevent
> the warning?
>
> 12-24 16:45:30.669: WARN/MessageQueue(7888): Handler{448b0288} sending
> message to a Handler on a dead thread
> 12-24 16:45:30.669: WARN/MessageQueue(7888):
> java.lang.RuntimeException: Handler{448b0288} sending message to a
> Handler on a dead thread
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> android.os.MessageQueue.enqueueMessage(MessageQueue.java:179)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> android.os.Handler.sendMessageAtTime(Handler.java:457)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> android.os.Handler.sendMessageDelayed(Handler.java:430)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> android.os.Handler.sendMessage(Handler.java:367)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> android.os.Message.sendToTarget(Message.java:348)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> android.os.AsyncTask$3.done(AsyncTask.java:214)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> java.util.concurrent.FutureTask$Sync.innerSet(FutureTask.java:252)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> java.util.concurrent.FutureTask.set(FutureTask.java:112)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:310)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> java.util.concurrent.FutureTask.run(FutureTask.java:137)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
> 1068)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> java.util.concurrent.ThreadPoolExecutor
> $Worker.run(ThreadPoolExecutor.java:561)
> 12-24 16:45:30.669: WARN/MessageQueue(7888): at
> java.lang.Thread.run(Thread.java:1096)
>

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment