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

java.lang.RuntimeException: getParameters failed (empty parameters) #2

Open
ligi opened this issue Nov 2, 2016 · 6 comments
Open

Comments

@ligi
Copy link
Contributor

ligi commented Nov 2, 2016

Wast just opening the app again as I was setting up a pretix installation. Unfortunately the first time opening the app crashed and even worse I cannot reproduce this anymore currently. Opening the app after this and until now worked like a charm.

11-02 21:29:24.176   515  2358 W QCamera2Factory: getCameraInfo: E, camera_id = 0
11-02 21:29:24.176   515  2358 I QCamera2HWI: getFlashInfo cameraId:0 hasFlash:1
11-02 21:29:24.176   515  2358 I QCamera2HWI: getCapabilities id:0 hasFlash:1
11-02 21:29:24.176   515  2358 W QCamera2HWI: __dbg: info->orientation : 90 rc = 0
11-02 21:29:24.176   515  2358 W QCamera2Factory: getCameraInfo: X
11-02 21:29:24.176   515  2358 W QCamera2Factory: cameraDeviceOpen : E
11-02 21:29:24.176 13358 13358 E AndroidRuntime: FATAL EXCEPTION: main
11-02 21:29:24.176 13358 13358 E AndroidRuntime: Process: eu.pretix.pretixdroid.debug, PID: 13358
11-02 21:29:24.176 13358 13358 E AndroidRuntime: java.lang.RuntimeException: getParameters failed (empty parameters)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at android.hardware.Camera.native_getParameters(Native Method)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at android.hardware.Camera.getParameters(Camera.java:1996)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at me.dm7.barcodescanner.core.CameraUtils.isFlashSupported(CameraUtils.java:47)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at me.dm7.barcodescanner.core.BarcodeScannerView.setFlash(BarcodeScannerView.java:153)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at me.dm7.barcodescanner.core.BarcodeScannerView.setupCameraPreview(BarcodeScannerView.java:90)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at me.dm7.barcodescanner.core.CameraHandlerThread$1$1.run(CameraHandlerThread.java:31)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:158)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7225)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
11-02 21:29:24.176 13358 13358 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
11-02 21:29:24.176   515  2358 I QCamera2HWI: [KPI Perf] openCamera: E
11-02 21:29:24.176   515  2358 W QCamera2HWI: [CORELOCK_DBG] perf_lock_acq was called by openCamera
11-02 21:29:24.176   515  2358 W QCamera2HWI: [CORELOCK_DBG] perf_lock_acq limit max clock for protection peak current!!. mPerfMaxLockHandle = 40
11-02 21:29:24.176   515  2358 I QCamera2HWI: getFlashInfo cameraId:0 hasFlash:1

@ligi
Copy link
Contributor Author

ligi commented Nov 2, 2016

just found dm77/barcodescanner#235 which might be the source of this

@jfwiebe
Copy link
Contributor

jfwiebe commented Nov 12, 2016

You can reproduce the error by removing the camera permisson again and than restart the app.
device-2016-11-12-163443

@raphaelm
Copy link
Member

Good catch! So we probably need to add

  • more permission checks
  • find out why it occured for @ligi

@ligi
Copy link
Contributor Author

ligi commented Nov 13, 2016

github.com/hotchemi/PermissionsDispatcher is really nice to handle runtime-permissions

@deanveggy
Copy link

had same issue. fixed by explicitly requesting camera permission before switching to the page containing the code that uses the camera. in my case zxing scanner for xamarin. It's a messy business due to different android versions so i used of a great NuGet plugin (helper). PlugIn.Permissions (https://www.nuget.org/packages/Plugin.Permissions/).

@raphaelm
Copy link
Member

e9eabc6 might fix this, let's see

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

No branches or pull requests

4 participants