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 8329465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:47:52+00:00 2026-06-09T01:47:52+00:00

ANR stack from Android Developer Console: DALVIK THREADS: (mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0

  • 0

ANR stack from Android Developer Console:

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0 hwll=0)
"main" prio=5 tid=1 SUSPENDED
  | group="main" sCount=1 dsCount=0 obj=0x40022198 self=0xcec8
  | sysTid=15809 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1345006496
  | schedstat=( 105169616659 16803131154 25724 )
  at java.lang.String._getChars(String.java:~1041)
  at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:89)
  at java.lang.StringBuilder.<init>(StringBuilder.java:96)
  at org.nkuznetsov.onlineradio.FavoriteList.save(FavoriteList.java:37)
  at org.nkuznetsov.onlineradio.FavoriteList.add(FavoriteList.java:60)
  at org.nkuznetsov.onlineradio.RadioActivity$OnFavoriteChangeListener.onCheckedChanged(RadioActivity.java:289)
  at android.widget.CompoundButton.setChecked(CompoundButton.java:124)
  at android.widget.CompoundButton.toggle(CompoundButton.java:86)
  at android.widget.CompoundButton.performClick(CompoundButton.java:98)
  at android.view.View$PerformClick.run(View.java:9080)
  at android.os.Handler.handleCallback(Handler.java:587)
  at android.os.Handler.dispatchMessage(Handler.java:92)
  at android.os.Looper.loop(Looper.java:130)
  at android.app.ActivityThread.main(ActivityThread.java:3687)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:507)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
  at dalvik.system.NativeStart.main(Native Method)

"Binder Thread #3" prio=5 tid=9 NATIVE
  | group="main" sCount=1 dsCount=0 obj=0x40526f60 self=0x194808
  | sysTid=15817 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1788936
  | schedstat=( 2014164 15899659 17 )
  at dalvik.system.NativeStart.run(Native Method)

"AsyncTask #1" prio=5 tid=8 WAIT
  | group="main" sCount=1 dsCount=0 obj=0x40524388 self=0x19d380
  | sysTid=15816 nice=10 sched=0/0 cgrp=[fopen-error:2] handle=1693616
  | schedstat=( 1090911877 313018788 393 )
  at java.lang.Object.wait(Native Method)
  - waiting on <0x40524560> (a java.lang.VMThread)
  at java.lang.Thread.parkFor(Thread.java:1424)
  at java.lang.LangAccessImpl.parkFor(LangAccessImpl.java:48)
  at sun.misc.Unsafe.park(Unsafe.java:337)
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016)
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:411)
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1021)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
  at java.lang.Thread.run(Thread.java:1019)

"Binder Thread #2" prio=5 tid=7 NATIVE
  | group="main" sCount=1 dsCount=0 obj=0x405150e0 self=0x15eed8
  | sysTid=15815 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1413168
  | schedstat=( 2929685 26489259 22 )
  at dalvik.system.NativeStart.run(Native Method)

"Binder Thread #1" prio=5 tid=6 NATIVE
  | group="main" sCount=1 dsCount=0 obj=0x40514aa8 self=0x16bad8
  | sysTid=15814 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1159936
  | schedstat=( 5920410 23956299 25 )
  at dalvik.system.NativeStart.run(Native Method)

"Compiler" daemon prio=5 tid=5 VMWAIT
  | group="system" sCount=1 dsCount=0 obj=0x405110a0 self=0x16b9a0
  | sysTid=15813 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1239400
  | schedstat=( 207977297 25329589 821 )
  at dalvik.system.NativeStart.run(Native Method)

"Signal Catcher" daemon prio=5 tid=4 RUNNABLE
  | group="system" sCount=0 dsCount=0 obj=0x40510fe0 self=0x12e7a8
  | sysTid=15812 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1238888
  | schedstat=( 5798340 8666992 14 )
  at dalvik.system.NativeStart.run(Native Method)

"GC" daemon prio=5 tid=3 VMWAIT
  | group="system" sCount=1 dsCount=0 obj=0x40510f38 self=0x178360
  | sysTid=15811 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1413104
  | schedstat=( 139343257 133178717 75 )
  at dalvik.system.NativeStart.run(Native Method)

"HeapWorker" daemon prio=5 tid=2 SUSPENDED
  | group="system" sCount=1 dsCount=0 obj=0x40510e80 self=0x178228
  | sysTid=15810 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1160864
  | schedstat=( 612121568 1730712888 15455 )
  at dalvik.system.NativeStart.run(Native Method)

As far as I understand the problem exists in main thread in org.nkuznetsov.onlineradio.FavoriteList.save(FavoriteList.java:37) method.

In FavoriteList.save() I just concat string from string collection and write ti to shared preferences.

Source of FavoriteList class is here: https://code.google.com/p/android-online-radio/source/browse/trunk/src/org/nkuznetsov/onlineradio/FavoriteList.java

Why ANR appears some time?

  • 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-06-09T01:47:54+00:00Added an answer on June 9, 2026 at 1:47 am

    If it’s giving you an ANR and it’s a method your not waiting to complete do it on another thread:

     private static void save(final Vector<String> favorites)
        {
    
             new Thread()
                public void run(){
                  String tmpFav = new String();
    
                  if (favorites.size() > 0)
                  {
                        tmpFav = String.valueOf(favorites.get(0));
    
                        for (int i = 1; i < favorites.size(); i++)
                        {
                                tmpFav += FAVORITES_SEPARATOR;
                                tmpFav += favorites.get(i);
                        }
                  }
    
                  SharedPreferences.Editor editor = preferences.edit();
    
                  if (tmpFav.equals(new String())) editor.remove(FAVORITES_KEY);
                  else editor.putString(FAVORITES_KEY, tmpFav);
    
                  editor.commit();
               }
            }.start();
        }
    

    You’ll just have to remember the save may not have completed when you next access the other methods.

    If it is a Vector of Strings you don’t need to ask for the String value:

        tmpFav = favorites.get(0);
    

    Also checking if the String is empty is bit more clearer like this:

        if ("".equals(tmpFav)) editor.remove(FAVORITES_KEY)
    

    I would also use a StringBuilder instead of concatenation.

        StringBuilder b = new StringBuilder();
        b.append(FAVOURITES_SEPARATOR);
        b.append(favorites.get(i);
        String tmpFav = b.toString();
    

    If you go for the threading option be careful, you might want to look at Java Synchonized methods

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

Sidebar

Related Questions

anr broadcast of intent { act=android.provider.Telefony.SMS_RECEIVED cmp=com.site/.SmsReceived {has extras}} in}} What is my mistake?
I want to know about ANR dialog in android applications and when it will
I am getting the error 'Unable to open stack trace file '/data/anr/traces.txt': Permission denied'
Crash while returning from android ndk function on Samsung Galaxy S2. In my java
Can an R project in Eclipse (StatET) be changed from R Project to R
I'm an R newbie and am attempting to remove duplicate columns from a largish
I have been struggling with a nasty ANR problem with my app, which loads
I am new to android world. I have made an application of a user
This code is causing ANR force close any idea how to improve this code?
Is there a way to get notified when your app triggers an ANR (Application

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.