My app is using the following code to launch the camera app to capture an 
image and return a bitmap :
Intent intent = new 
Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra("return-data", true); 
getActivity().startActivityForResult(intent, 
IntentExtraConstants.WRITE_REVIEW_PICTURE_RESULT);


It worked fine on all devices before 5.0. But on some devices, camera is 
launched; but as soon as I capture the image, camera app crashes with the 
following logs :

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime: FATAL EXCEPTION: main

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime: Process: 
com.google.android.GoogleCamera, PID: 20473

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime: 
java.lang.NullPointerException

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
com.google.common.base.Preconditions.checkNotNull(Preconditions.java:213)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
com.google.common.base.Optional.of(Optional.java:85)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
com.android.camera.captureintent.state.StateSavingPicture.onEnter(StateSavingPicture.java:77)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
com.android.camera.captureintent.stateful.StateMachineImpl.jumpToState(StateMachineImpl.java:62)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
com.android.camera.captureintent.stateful.StateMachineImpl.processEvent(StateMachineImpl.java:110)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
com.android.camera.captureintent.state.StateReviewingPicture$1.onSessionPictureDataUpdate(StateReviewingPicture.java:239)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
com.android.camera.session.CaptureSessionManagerImpl$SessionNotifierImpl$10.run(CaptureSessionManagerImpl.java:235)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
android.os.Handler.handleCallback(Handler.java:739)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
android.os.Handler.dispatchMessage(Handler.java:95)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
android.os.Looper.loop(Looper.java:148)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
android.app.ActivityThread.main(ActivityThread.java:5417)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
java.lang.reflect.Method.invoke(Native Method)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)

10-05 17:12:12.058 20473-20473/? E/AndroidRuntime:     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

10-05 17:12:12.060 855-2948/? W/ActivityManager:   Force finishing activity 
com.google.android.GoogleCamera/com.android.camera.CaptureActivity



This crash is happening on Nexus 6 (Android 6.0) but not on Nexus 9 
(Android 6.0). Camera app version is same on both devices (2.7.008).

This crash is also happening on some Android 5.0 devices (Nexus 5), but not 
on all.

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to