[Desire HD Android Development] alienmind:
FCs related to media providers

Hi there

Having lots of FCs on several apps. Coming from a full wipe of course. This one was taken while sharing from QuickPic => Instagram (happens on several other apps)

Something looks broken with media providers.

I/ActivityManager( 1358): Starting: Intent { act=android.intent.action.SEND typ=image/jpeg flg=0x3000001 cmp=com.instagram.android/.activity.MainTabActivity (has extras) } from pid 6006
E/InputDispatcher( 1358): channel 'StatusBarView (server)' ~ Consumer closed input channel or an error occurred. events=0x8
E/InputDispatcher( 1358): channel 'StatusBarView (server)' ~ Channel is unrecoverably broken and will be disposed!
E/ResourceType( 6333): Style contains key with bad entry: 0x01010308
I/ActivityManager( 1358): Starting: Intent { dat=content://media/external/images/media/1691 cmp=com.instagram.android/.support.camera.CropImage (has extras) } from pid 6333
I/dalvikvm( 6333): Could not find method android.widget.LinearLayout.<init>, referenced from method com.instagram.android.widget.CustomToastView.<init>
W/dalvikvm( 6333): VFY: unable to resolve direct method 3062: Landroid/widget/LinearLayout;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;I)V
D/dalvikvm( 6333): VFY: replacing opcode 0x70 at 0x0000
D/dalvikvm( 6333): VFY: dead code 0x0003-0018 in Lcom/instagram/android/widget/CustomToastView;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;I)V
W/InputManagerService( 1358): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@407b7738 (uid=10046 pid=6006)
D/dalvikvm( 6333): GC_EXTERNAL_ALLOC freed 215K, 40% free 4305K/7175K, external 0K/0K, paused 73ms
I/dalvikvm( 6333): Could not find method android.widget.LinearLayout.<init>, referenced from method com.instagram.android.widget.SimpleProxyView.<init>
W/dalvikvm( 6333): VFY: unable to resolve direct method 3062: Landroid/widget/LinearLayout;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;I)V
D/dalvikvm( 6333): VFY: replacing opcode 0x70 at 0x0000
D/dalvikvm( 6333): VFY: dead code 0x0003-0015 in Lcom/instagram/android/widget/SimpleProxyView;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;I)V
E/ResourceType( 6333): Style contains key with bad entry: 0x01010308
D/szipinf ( 6333): Initializing inflate state
I/dalvikvm( 6333): Could not find method android.view.View.setY, referenced from method com.instagram.android.adapter.FeedAdapter.performStickyHeader
W/dalvikvm( 6333): VFY: unable to resolve virtual method 2760: Landroid/view/View;.setY (F)V
D/dalvikvm( 6333): VFY: replacing opcode 0x6e at 0x0078
I/dalvikvm( 6333): Could not find method android.view.View.setY, referenced from method com.instagram.android.adapter.FeedAdapter.performStickyHeader
W/dalvikvm( 6333): VFY: unable to resolve virtual method 2760: Landroid/view/View;.setY (F)V
D/dalvikvm( 6333): VFY: replacing opcode 0x6e at 0x00d5
E/ResourceType( 6333): Style contains key with bad entry: 0x01010308
D/dalvikvm( 6333): GC_EXTERNAL_ALLOC freed 105K, 38% free 4449K/7175K, external 569K/570K, paused 57ms
W/ActivityManager( 1358): Activity pause timeout for HistoryRecord{406e3408 com.instagram.android/.activity.MainTabActivity}
D/dalvikvm( 6333): GC_CONCURRENT freed 173K, 37% free 4548K/7175K, external 673K/1082K, paused 2ms+18ms
E/ResourceType( 6333): Style contains key with bad entry: 0x01010308
V/network ( 6333): cmwap auto-detection is disabled
D/PhoneWindow( 6333): couldn't save which view has focus because the focused view com.instagram.android.widget.SimpleProxyView@4069f600 has no id.
I/dalvikvm( 6333): Could not find method com.instagram.android.support.camera.CropImageView.setLayerType, referenced from method com.instagram.android.support.camera.CropImage.onCreate
W/dalvikvm( 6333): VFY: unable to resolve virtual method 10265: Lcom/instagram/android/support/camera/CropImageView;.setLayerType (ILandroid/graphics/Paint;)V
D/dalvikvm( 6333): VFY: replacing opcode 0x6e at 0x0042
E/ResourceType( 6333): Style contains key with bad entry: 0x01010308
D/dalvikvm( 6333): GC_CONCURRENT freed 407K, 37% free 5020K/7879K, external 947K/1082K, paused 3ms+6ms
I/ActivityManager( 1358): Displayed com.instagram.android/.support.camera.CropImage: +991ms (total +1s534ms)
I/Database( 2765): sqlite returned: error code = 14, msg = cannot open file at line 27205 of [42537b6056]
I/Database( 2765): sqlite returned: error code = 14, msg = unable to open database file
E/Database( 2765): sqlite3_exec - Failed to set WAL mode for [/data/data/com.android.providers.media/databases/internal.db]
I/Database( 2765): sqlite returned: error code = 14, msg = cannot open file at line 27205 of [42537b6056]
I/Database( 2765): sqlite returned: error code = 14, msg = unable to open database file
E/Database( 2765): sqlite3_exec - Failed to set DELETE mode for [/data/data/com.android.providers.media/databases/internal.db]
E/SQLiteOpenHelper( 2765): Couldn't open internal.db for writing (will try read-only):
E/SQLiteOpenHelper( 2765): android.database.sqlite.SQLiteException: unable to open database file
E/SQLiteOpenHelper( 2765):	at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
E/SQLiteOpenHelper( 2765):	at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1849)
E/SQLiteOpenHelper( 2765):	at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
E/SQLiteOpenHelper( 2765):	at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:854)
E/SQLiteOpenHelper( 2765):	at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:847)
E/SQLiteOpenHelper( 2765):	at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:558)
E/SQLiteOpenHelper( 2765):	at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203)
E/SQLiteOpenHelper( 2765):	at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:118)
E/SQLiteOpenHelper( 2765):	at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
E/SQLiteOpenHelper( 2765):	at com.android.providers.media.MediaProvider.query(MediaProvider.java:1493)
E/SQLiteOpenHelper( 2765):	at android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:182)
E/SQLiteOpenHelper( 2765):	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:111)
E/SQLiteOpenHelper( 2765):	at android.os.Binder.execTransact(Binder.java:320)
E/SQLiteOpenHelper( 2765):	at dalvik.system.NativeStart.run(Native Method)
I/Database( 2765): sqlite returned: error code = 14, msg = cannot open file at line 27205 of [42537b6056]
I/Database( 2765): sqlite returned: error code = 14, msg = unable to open database file
E/Database( 2765): SELECT locale FROM android_metadata failed
E/Database( 2765): Failed to setLocale() when constructing, closing the database
E/Database( 2765): android.database.sqlite.SQLiteException: unable to open database file
E/Database( 2765):	at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
E/Database( 2765):	at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1987)
E/Database( 2765):	at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1855)
E/Database( 2765):	at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
E/Database( 2765):	at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:197)
E/Database( 2765):	at com.android.providers.media.MediaProvider.query(MediaProvider.java:1493)
E/Database( 2765):	at android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:182)
E/Database( 2765):	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:111)
E/Database( 2765):	at android.os.Binder.execTransact(Binder.java:320)
E/Database( 2765):	at dalvik.system.NativeStart.run(Native Method)
E/DatabaseUtils( 2765): Writing exception to parcel
E/DatabaseUtils( 2765): android.database.sqlite.SQLiteException: unable to open database file
E/DatabaseUtils( 2765):	at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
E/DatabaseUtils( 2765):	at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1987)
E/DatabaseUtils( 2765):	at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1855)
E/DatabaseUtils( 2765):	at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
E/DatabaseUtils( 2765):	at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:197)
E/DatabaseUtils( 2765):	at com.android.providers.media.MediaProvider.query(MediaProvider.java:1493)
E/DatabaseUtils( 2765):	at android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:182)
E/DatabaseUtils( 2765):	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:111)
E/DatabaseUtils( 2765):	at android.os.Binder.execTransact(Binder.java:320)
E/DatabaseUtils( 2765):	at dalvik.system.NativeStart.run(Native Method)
D/AndroidRuntime( 6333): Shutting down VM
W/dalvikvm( 6333): threadid=1: thread exiting with uncaught exception (group=0x40015568)
E/AndroidRuntime( 6333): FATAL EXCEPTION: main
E/AndroidRuntime( 6333): android.database.sqlite.SQLiteException: unable to open database file
E/AndroidRuntime( 6333):	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:158)
E/AndroidRuntime( 6333):	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114)
E/AndroidRuntime( 6333):	at android.content.ContentProviderProxy.bulkQueryInternal(ContentProviderNative.java:330)
E/AndroidRuntime( 6333):	at android.content.ContentProviderProxy.query(ContentProviderNative.java:366)
E/AndroidRuntime( 6333):	at android.content.ContentResolver.query(ContentResolver.java:262)
E/AndroidRuntime( 6333):	at android.provider.MediaStore$Images$Media.query(MediaStore.java:555)
E/AndroidRuntime( 6333):	at com.instagram.android.support.camera.gallery.ImageList.createCursor(ImageList.java:95)
E/AndroidRuntime( 6333):	at com.instagram.android.support.camera.gallery.BaseImageList.<init>(BaseImageList.java:55)
E/AndroidRuntime( 6333):	at com.instagram.android.support.camera.gallery.ImageList.<init>(ImageList.java:63)
E/AndroidRuntime( 6333):	at com.instagram.android.support.camera.ImageManager.makeImageList(ImageManager.java:309)
E/AndroidRuntime( 6333):	at com.instagram.android.support.camera.ImageManager.makeImageList(ImageManager.java:429)
E/AndroidRuntime( 6333):	at com.instagram.android.support.camera.ImageManager.makeImageList(ImageManager.java:354)
E/AndroidRuntime( 6333):	at com.instagram.android.support.camera.CropImage$LoadPhotoTask.onPostExecute(CropImage.java:200)
E/AndroidRuntime( 6333):	at com.instagram.android.support.camera.CropImage$LoadPhotoTask.onPostExecute(CropImage.java:155)
E/AndroidRuntime( 6333):	at android.os.AsyncTask.finish(AsyncTask.java:417)
E/AndroidRuntime( 6333):	at android.os.AsyncTask.access$300(AsyncTask.java:127)
E/AndroidRuntime( 6333):	at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
E/AndroidRuntime( 6333):	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6333):	at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 6333):	at android.app.ActivityThread.main(ActivityThread.java:3703)
E/AndroidRuntime( 6333):	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 6333):	at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 6333):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/AndroidRuntime( 6333):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/AndroidRuntime( 6333):	at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1358): Force finishing activity com.instagram.android/.support.camera.CropImage
W/ActivityManager( 1358): Activity pause timeout for HistoryRecord{40712e40 com.instagram.android/.support.camera.CropImage}

The problematic sqlite db looks with proper permissions, but still, get FCs:

adb shell ls -la /data/data/com.android.providers.media/databases/internal.db
-rw-rw---- 1 app_20 app_20 70656 Apr 5 23:57 /data/data/com.android.providers.media/databases/internal.db

Any ideas?

---------- Post added at 06:31 PM ---------- Previous post was at 06:28 PM ----------

Ok, I think I solved but really don't know how it happened. A -wal file was existing in the directory, with root permissions only, preventing the db to be locked. Removing the file fixed the issue...

adb shell ls -la /data/data/com.android.providers.media/databases/
drwxrwx--x 2 app_20 app_20 4096 Apr 6 18:20 .
drwxr-x--x 4 app_20 app_20 4096 Apr 5 23:57 ..
-rw-rw---- 1 app_20 app_20 387072 Apr 6 18:20 external-7ab696eb.db
-rw-rw---- 1 app_20 app_20 70656 Apr 5 23:57 internal.db
-rw-r----- 1 root root 0 Apr 6 10:45 internal.db-wal