Skip to content
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

Frequent crashes after taking a picture #216

Open
ScanuNicco opened this issue Jul 29, 2023 · 1 comment
Open

Frequent crashes after taking a picture #216

ScanuNicco opened this issue Jul 29, 2023 · 1 comment

Comments

@ScanuNicco
Copy link

Describe the bug
FreeDcam works as expected until I try to take a picture, at which point the app crashes. The picture is saved to the gallery and can be viewed once the app is re-opened. This happens about 70% of the time.

To Reproduce
Steps to reproduce the behavior:

  1. Open FreeDcam
  2. Take a picture

Expected behavior
FreeDcam takes a picture without crashing.

Smartphone

  • Device: OnePlus 11 5G
  • OS: LineageOS 20 (No Gapps)
  • Version: 4.3.82

Additional context
I found the following error in logcat during a crash

FATAL EXCEPTION: CaptureSessionHandler
Process: troop.com.freedcam, PID: 17051
java.lang.IllegalArgumentException: elements[0] is out of range of [1.000000, 340282346638528860000000000000000000000.000000] (too low)
	at com.android.internal.util.Preconditions.checkArrayElementsInRange(Preconditions.java:726)
	at android.hardware.camera2.params.LensShadingMap.<init>(LensShadingMap.java:81)
	at android.hardware.camera2.impl.CameraMetadataNative.getLensShadingMap(CameraMetadataNative.java:1044)
	at android.hardware.camera2.impl.CameraMetadataNative.-$$Nest$mgetLensShadingMap(Unknown Source:0)
	at android.hardware.camera2.impl.CameraMetadataNative$21.getValue(CameraMetadataNative.java:794)
	at android.hardware.camera2.impl.CameraMetadataNative.get(CameraMetadataNative.java:473)
	at android.hardware.camera2.impl.CameraMetadataNative.get(CameraMetadataNative.java:451)
	at android.hardware.camera2.CaptureResult.getProtected(CaptureResult.java:331)
	at android.hardware.camera2.CaptureResult.getProtected(CaptureResult.java:54)
	at android.hardware.camera2.CameraMetadata.getKeys(CameraMetadata.java:199)
	at android.hardware.camera2.CameraMetadata.getKeys(CameraMetadata.java:146)
	at android.hardware.camera2.CaptureResult.getKeys(CaptureResult.java:364)
	at freed.cam.apis.camera2.CameraValuesChangedCaptureCallback.processQcomAEValues(CameraValuesChangedCaptureCallback.java:450)
	at freed.cam.apis.camera2.CameraValuesChangedCaptureCallback.onCaptureCompleted(CameraValuesChangedCaptureCallback.java:219)
	at android.hardware.camera2.impl.CameraCaptureSessionImpl$1.lambda$onCaptureCompleted$4$android-hardware-camera2-impl-CameraCaptureSessionImpl$1(CameraCaptureSessionImpl.java:709)
	at android.hardware.camera2.impl.CameraCaptureSessionImpl$1$$ExternalSyntheticLambda1.run(Unknown Source:8)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.os.HandlerThread.run(HandlerThread.java:67)
@KillerInk
Copy link
Owner

KillerInk commented Jul 30, 2023

Hi.
Looks not like its a problem from freedcam. Looks more like a problem from lineage and their camera hal.

Thats the part where it crash.

if (result != null && result.getKeys().size() > 0) {

a possible workaround would be to catch the IllegalArgumentException.
but no idea if the cam dies anyway, also if the exception get catched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants