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

  • Home
  • SEARCH
  • 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 6371907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:09:18+00:00 2026-05-25T01:09:18+00:00

I have an android app that a) performs an updateData() function (querying content providers

  • 0

I have an android app that a) performs an updateData() function (querying content providers and HTTP requests from internet among other things) in a thread, and b) has a home screen widget that performs the same updateData() function every 30mins (not in a thread).

a) looks like this:

public class MoodMain extends Activity{
    public void onCreate(...)
    {
        Thread t = new Thread()
        {
            public void run()
            {
                     updateData(this);
            }
        };
        t.start();
    }

b) looks like this :

public class MoodAppWidgetProvider extends AppWidgetProvider { 
    public void onUpdate(Context context, ...)
    { 
        updateData(context);
    } }

Now people are reporting ANRs where threads are stopped at same place in updateData(context), one thread for a) and one for b). Stack traces look like the following:

1st example:

“main” prio=5 tid=1 NATIVE | group=”main” sCount=1 dsCount=0 s=N
obj=0x40025ad8 self=0xcd80 | sysTid=23053 nice=0 sched=0/0
cgrp=default handle=-1345017808 | schedstat=( 5672943129 29267974835
13299 ) at android.os.BinderProxy.transact(Native Method) at
android.content.ContentProviderProxy.bulkQueryInternal(ContentProviderNative.java:370)
at
android.content.ContentProviderProxy.query(ContentProviderNative.java:408)
…

“Thread-10″ prio=5 tid=9 NATIVE | group=”main” sCount=1 dsCount=0
s=N obj=0x4629ba88 self=0x2d1750 | sysTid=23062 nice=0 sched=0/0
cgrp=default handle=2955408 | schedstat=( 53100602 8822875969 600 )
at android.os.BinderProxy.transact(Native Method) at
android.content.ContentProviderProxy.bulkQueryInternal(ContentProviderNative.java:370)
at
android.content.ContentProviderProxy.query(ContentProviderNative.java:408)
at android.content.ContentResolver.query(ContentResolver.java:245) …

2nd example:

“main” prio=5 tid=1 NATIVE | group=”main” sCount=1 dsCount=0 s=N
obj=0x40020a30 self=0xcd88 | sysTid=19319 nice=0 sched=0/0
cgrp=default handle=-1345026000 at
java.net.InetAddress.getaddrinfo(Native Method) at
java.net.InetAddress.lookupHostByName(InetAddress.java:508) at
java.net.InetAddress.getAllByNameImpl(InetAddress.java:280) at
java.net.InetAddress.getByName(InetAddress.java:310) at
java.net.InetSocketAddress.(InetSocketAddress.java:110) …

“Thread-10″ prio=5 tid=9 NATIVE | group=”main” sCount=1 dsCount=0
s=N obj=0x458842e8 self=0x245cc0 | sysTid=20153 nice=0 sched=0/0
cgrp=default handle=2388904 at
java.net.InetAddress.getaddrinfo(Native Method) at
java.net.InetAddress.lookupHostByName(InetAddress.java:508) …

“Thread-8″ prio=5 tid=7 NATIVE | group=”main” sCount=1 dsCount=0 s=N
obj=0x45867030 self=0x22c528 | sysTid=20151 nice=0 sched=0/0
cgrp=default handle=2277944 at
java.net.InetAddress.getaddrinfo(Native Method) at
java.net.InetAddress.lookupHostByName(InetAddress.java:508) … at
com.admob.android.ads.i.d(AdMobURLConnector.java:153) at
com.admob.android.ads.b.a(AdRequester.java:206) at
com.admob.android.ads.AdView$b.run(AdView.java:655)

Looks like some kind of task deadlock. Any ideas how to solve this anyone please?

  • 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-25T01:09:19+00:00Added an answer on May 25, 2026 at 1:09 am

    I believe the issue is the fact I am doing a long process in the onUpdate() function of the widgetProvider. I modified my code to spawn a thread to perform the intensive functionality, and so far, no more freezes have been reported from users.

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

Sidebar

Related Questions

I have a Service for my Android app that performs HTTP calls. The Service
I have a android app that is quite simple it fetches data from the
I have an Android app that can be downloaded from the Google market and
I have an Android app that talks to .net web service via http over
I have an android app that connects to the internet to do a reverse
I have an Android app that fetches data from the web service using ksoap2,
I have an android app that repeatedly collects fingerprints from the wifi-networks that are
I have a class that extends android.app.Dialog, the layout is done in an xml
I have an Android project that branched into three different applications, app-1 , app-2
I have a PhoneGap app that I'm testing on webOS, Android, and iPhone. I'm

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.