Sometimes getting ANR while interacting with SQLite. Not a crash, but ANR.
The crash log is always the same. Even SQL request is performing on the UI thread, there are 1-2 fast requests, no loops etc.
Can't find any similar ANRs. It looks like it's waiting for a mutex in the native code. And maybe it's not even SQLite because of this lines.
Java_android_util_Log_isLoggable__Ljava_lang_String_2I+116) at android.util.Log.isLoggable(Native method)
Any directions to dig?
ANR trace.
DALVIK THREADS (22):
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 obj=0x72b6a700 self=0xb483d500
| sysTid=1459 nice=0 cgrp=default sched=0/0 handle=0xb6f48bec
| state=S schedstat=( 38819958947 298321576 2674 ) utm=2603 stm=1278 core=2 HZ=100
| stack=0xbe11b000-0xbe11d000 stackSize=8MB
| held mutexes=
native: #00 pc 000133bc /system/lib/libc.so (syscall+28)
native: #01 pc 000a8be3 /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
native: #02 pc 0027bb5d /system/lib/libart.so (art::GoToRunnable(art::Thread*)+756)
native: #03 pc 000872b9 /system/lib/libart.so (art::JniMethodEnd(unsigned int, art::Thread*)+8)
native: #04 pc 00086da1 /data/dalvik-cache/arm/system@framework@boot.oat (Java_android_util_Log_isLoggable__Ljava_lang_String_2I+116)
at android.util.Log.isLoggable(Native method)
at android.database.CursorWindow.recordNewWindow(CursorWindow.java:725)
- locked <@addr=0x6f920340> (a android.util.LongSparseArray)
at android.database.CursorWindow.<init>(CursorWindow.java:112)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:139)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:133)
at com.xxx.xxx.xxx.getChildren(xxx.java:1122)
at com.xxx.xxx.xxx.getFolderFromDatabase(xxx.java:1109)
at com.xxx.xxx.xxx.getFolder(xxx.java:868)
at com.xxx.xxx.yyy.getFolder(StationFolder.java:644)
at com.xxx.xxx.yyy.getParent(StationFolder.java:251)
at com.xxx.xxx.utils.CategoryItemUtils.getPathByRootItem(CategoryItemUtils.java:244)
at com.xxx.xxx.ui.adapter.UniversalListAdapter.loadData(UniversalListAdapter.java:237)
at com.xxx.xxx.ui.fragment.UniversalListFragment$LoadCategoryDataAsync.onPostExecute(UniversalListFragment.java:761)
at android.os.AsyncTask.finish(AsyncTask.java:636)
at android.os.AsyncTask.access$500(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5258)
at java.lang.reflect.Method.invoke!(Native method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:940)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:735)