[Android]Could not allocate CursorWindow due t...

-24 即 EMFILE,属于进程内文件描述符耗尽的问题 Solution: ??? 须要找出究竟是哪些文件没有关闭(查看方式: adb shell, cd /proc/pid/fd , ls -l),以及为何没关闭. 发现不少/dev/ashmem file handle,而后去/proc/pid/maps去看这些/dev/ashmem的名字,能够发现些蛛丝马迹。 重现办法:在Browser里不断用新增tab的方式来打开新的含有不少图片的网站。java

E CursorWindow: Could not allocate CursorWindow '/data/data/com.android.browser/databases/browser2.db' of size 2097152 due to error -24.android

E AndroidRuntime: FATAL EXCEPTION: AsyncTask #5sql

E AndroidRuntime: java.lang.RuntimeException: An error occured while executing doInBackground()shell

E AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:299)ide

E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)网站

E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:219)this

E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:239)sqlite

E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)进程

E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)图片

E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)

E AndroidRuntime: at java.lang.Thread.run(Thread.java:838)

E AndroidRuntime: Caused by: android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=1 (# cursors opened by this proc=1)

E AndroidRuntime: at android.database.CursorWindow.<init>(CursorWindow.java:104)

E AndroidRuntime: at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)

E AndroidRuntime: at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:154)

E AndroidRuntime: at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:148)

E AndroidRuntime: at com.android.browser.provider.BrowserProvider2.shouldUpdateImages(BrowserProvider2.java:2064)

E AndroidRuntime: at com.android.browser.provider.BrowserProvider2.updateInTransaction(BrowserProvider2.java:1965)

E AndroidRuntime: at com.android.browser.provider.SQLiteContentProvider.update(SQLiteContentProvider.java:157)

E AndroidRuntime: at android.content.ContentProvider$Transport.update(ContentProvider.java:235)

E AndroidRuntime: at android.content.ContentResolver.update(ContentResolver.java:1016)

E AndroidRuntime: at com.android.browser.Controller$18.doInBackground(Controller.java:2764)

E AndroidRuntime: at com.android.browser.Controller$18.doInBackground(Controller.java:2740)

E AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:287)

E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:234)

E AndroidRuntime: ... 4 more

相关文章
相关标签/搜索