-
Notifications
You must be signed in to change notification settings - Fork 28k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[camera] In Android take photo, unlockAutoFocus
error Fatal Exception: java.lang.NullPointerException is thrown
#82031
Comments
Hi @wisnuwiry
Can you please explain " taking photos of the force close application"? If you have reproducible steps of the issue, please provide complete steps Can you please provide your |
@TahaTesser I have updated it in the issue body above. |
unlockAutoFocus
error Fatal Exception: java.lang.NullPointerExceptionunlockAutoFocus
error Fatal Exception: java.lang.NullPointerException is thrown
We're seeing the same thing here. Devices affected so far:
Stack trace from Crashlytics Output from flutter analyze
We are unable to reproduce this locally as we don't have any of the devices mentioned above on hand. |
@wisnuwiry since we're not getting any responses, have you managed to solve this issue? |
Any solving for this issue? Also got the error on
|
Is there any solutions for this problem? It's been almost 3 months. |
We are also facing this Issue. We got 2 different StackTraces for it:
and
In our case it failed on the devices:
We also have none of the devices to reproduce it locally. |
Hi everyone
Can you please upgrade to the latest |
Also getting this running a slightly modified camera 0.9.2+2 ... however, this picture below shows the only modification and it is essential for some Huawei devices. Device
Stacktrace
Flutter doctor -v
|
Removing wait label since this seems to be a legit issue that I can't reproduce with my devices using code sample #82031 (comment) |
I am also facing the same issue. |
We're also having this issue on an OPPO A15 (CPH2185). It's not always, but most of the time. |
I found that the takePicture on Android starts doing stuff in the background after it receives the image, if you dispose after takePicture that background task could still be running and crash your application because of NullPointerExceptions or security exceptions, so a dirty workaround for now is waiting 500ms until you dispose the cameraController |
I am experiencing this issue on a Galaxy S9, and can consistently reproduce this calling |
I'm facing this issue on Galaxy S7 edge and randomly crash after calling takePicture |
This issue should be fixed in the CameraX implementation of the camera plugin, so please try it out! If you find a similar issue with that implementation (or any other issues), please feel free to file a separate issue. |
Steps to Reproduce
This issue was experienced by some / many of my users when taking photos of the force close application. And to get this issue just take normal photos on one of the following devices:
Another way to get this error might be by:
Dependencies in pubspec.yaml:
Expected results:
Actual results:
Logs
The text was updated successfully, but these errors were encountered: