Skip to content

Camera fails to start on some devices, App throws Attempt to invoke virtual method 'void android.media.ImageReader.setOnImageAvailableListener(android.media.ImageReader$OnImageAvailableListener, android.os.Handler)' on a null object reference. #105200

@RobertApikyan

Description

@RobertApikyan

Camera won't start on Xiaomi POCO X4 Pro 5G device, it fails to start the example application from the library.

Error

Attempt to invoke virtual method 'void android.media.ImageReader.setOnImageAvailableListener(android.media.ImageReader$OnImageAvailableListener, android.os.Handler)' on a null object reference.

Steps to Reproduce

Flutter version 2.8.0
Camera version 0.9.7+1

1. I'm running the example from the library.

Screen Shot 2022-06-02 at 11 25 07

2. After clicking on the back camera, it displays the error message.

Screen Shot 2022-06-02 at 11 22 35

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: crashStack traces logged to the consolec: fatal crashCrashes that terminate the processp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    Status

    [PENDING] camera_android issues solved by camera_android_camerax

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions