Skip to content

[camera 0.5.8+2] java.lang.NullPointerException: Attempt to invoke virtual method 'int android.util.Size.getWidth()' on a null object reference #62188

@kw2019ltd

Description

@kw2019ltd
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.util.Size.getWidth()' on a null object reference
       at android.hardware.camera2.legacy.LegacyCameraDevice.configureOutputs(LegacyCameraDevice.java:326)
       at android.hardware.camera2.legacy.CameraDeviceUserShim.endConfigure(CameraDeviceUserShim.java:478)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at android.hardware.camera2.utils.Decorator.invoke(Decorator.java:80)
       at java.lang.reflect.Proxy.invoke(Proxy.java:397)
       at $Proxy4.endConfigure()
       at android.hardware.camera2.impl.CameraDeviceImpl.configureOutputsChecked(CameraDeviceImpl.java:383)
       at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession(CameraDeviceImpl.java:437)
       at io.flutter.plugins.camera.Camera.createCaptureSession(Camera.java:344)
       at io.flutter.plugins.camera.Camera.createCaptureSession(Camera.java:283)
       at io.flutter.plugins.camera.Camera.startPreview(Camera.java:425)
       at io.flutter.plugins.camera.Camera$2.onOpened(Camera.java:160)
       at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:118)
       at android.os.Handler.handleCallback(Handler.java:815)
       at android.os.Handler.dispatchMessage(Handler.java:104)
       at android.os.Looper.loop(Looper.java:194)
       at android.app.ActivityThread.main(ActivityThread.java:5631)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)

image

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: productionIssues experienced in live production appsc: crashStack traces logged to the consolec: fatal crashCrashes that terminate the processp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions