I'm using MediaStore.Images.insertImage to insert an image into the
images content provider. The insert reports no errors yet when I try
to open the Pictures application I get the following crash:
11-03 16:09:38.196: ERROR/AndroidRuntime(980):
java.lang.RuntimeException: Unable to resume activity
{com.android.camera/com.android.camera.GalleryPicker}:
java.lang.NullPointerException
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:
2504)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:
2519)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2159)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.os.Handler.dispatchMessage(Handler.java:88)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.os.Looper.loop(Looper.java:123)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.main(ActivityThread.java:3742)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
java.lang.reflect.Method.invokeNative(Native Method)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
java.lang.reflect.Method.invoke(Method.java:515)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
dalvik.system.NativeStart.main(Native Method)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): Caused by:
java.lang.NullPointerException
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
com.android.camera.GalleryPicker
$GalleryPickerAdapter.init(GalleryPicker.java:251)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
com.android.camera.GalleryPicker.rebake(GalleryPicker.java:96)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
com.android.camera.GalleryPicker.onResume(GalleryPicker.java:435)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.Instrumentation.callActivityOnResume(Instrumentation.java:
1224)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.Activity.performResume(Activity.java:3359)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:
2491)
I tried to use bot forms of insertImage (using bitmap or a filename).
They behave identically.
This crash occurs on a device and in the emulator. The only way to get
rid of the Pictures app crash is to unmount the SD card and then
remount it. The funny thing is that after I do this my image does
appear in the Pictures app.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---