google / cameraview

[DEPRECATED] Easily integrate Camera features into your Android app
Apache License 2.0
4.74k stars 1.03k forks source link

HUAWEI mate8 When I choose resolution ratio 13:9 #204

Open shihchieh-ma opened 7 years ago

shihchieh-ma commented 7 years ago

MEIZU pro5 also has a problem it's blank screen when I choose resolution ratio. How to solve this problem? Here is HUAWEI carsh log.

09-15 10:50:43.803 963-963/com.google.android.cameraview.demo E/AndroidRuntime: FATAL EXCEPTION: main Process: com.google.android.cameraview.demo, PID: 963 java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.SortedSet.last()' on a null object reference at com.google.android.cameraview.Camera2.prepareImageReader(Camera2.java:450) at com.google.android.cameraview.Camera2.setAspectRatio(Camera2.java:272) at com.google.android.cameraview.CameraView.setAspectRatio(CameraView.java:346) at com.google.android.cameraview.demo.TakePhotoActivity.onAspectRatioSelected(TakePhotoActivity.java:224) at com.google.android.cameraview.demo.AspectRatioFragment$1.onClick(AspectRatioFragment.java:86) at android.support.v7.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1045) at android.widget.AdapterView.performItemClick(AdapterView.java:313) at android.widget.AbsListView.performItemClick(AbsListView.java:1201) at android.widget.AbsListView$PerformClick.run(AbsListView.java:3195) at android.widget.AbsListView.onTouchUp(AbsListView.java:4152) at android.widget.HwAbsListView.onTouchUp(HwAbsListView.java:514) at android.widget.AbsListView.onTouchEvent(AbsListView.java:3896) at android.view.View.dispatchTouchEvent(View.java:10012) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2665) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2344) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:447) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1871) at android.app.Dialog.dispatchTouchEvent(Dialog.java:939) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:409) at android.view.View.dispatchPointerEvent(View.java:10232) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4856) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4717) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4249) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4302) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4268) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4395) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4276) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4452) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4249) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4302) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4268) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4276) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4249) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6676) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6650) 09-15 10:50:43.804 963-963/com.google.android.cameraview.demo E/AndroidRuntime: at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6611) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6803) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:192) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:346) at android.os.Looper.loop(Looper.java:138) at android.app.ActivityThread.main(ActivityThread.java:6523) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)

xupeixuan commented 6 years ago

honor 6X also has this crash