question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RuntimeException: getParameters failed (empty parameters)

See original GitHub issue

In my crashlogs I see a few RuntimeException where getParameters crashed. It appears for various devices, so far all API 23 and 24.

Exception java.lang.RuntimeException: getParameters failed (empty parameters)
android.hardware.Camera.native_getParameters (Camera.java)
android.hardware.Camera.getParameters (Camera.java:1951)
com.journeyapps.barcodescanner.camera.CameraManager.isTorchOn (CameraManager.java:470)
com.journeyapps.barcodescanner.camera.CameraManager.setTorch (CameraManager.java:449)
com.journeyapps.barcodescanner.camera.CameraInstance$1.run (CameraInstance.java:139)
android.os.Handler.handleCallback (Handler.java:739)
android.os.Handler.dispatchMessage (Handler.java:95)
android.os.Looper.loop (Looper.java:234)
android.os.HandlerThread.run (HandlerThread.java:61)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
rkistnercommented, Mar 20, 2017

Fixed released in v3.5.0.

2reactions
rkistnercommented, Mar 20, 2017

These errors are difficult to debug. It could be due to state management issues (still using the camera after it has been closed), or due to to a bug in the Camera framework of the device.

The best I can do for now is handle these errors by logging them, instead of letting the application crash.

@PaulWoitaschek Added a workaround for your issue in e3aed41746c33a72471f8aab16e5186ee4a5502c. The stack trace seems related to the torch, so it should be OK to just ignore the error.

@therottman Added workaround for your issue in 2cf4b60f0f1fb6181d0a0e5f6eee94803173364f. In this case it’s an error when receiving a preview frame. If this happens either as a once-off frame issue, or because we were already closing the camera, the workaround should solve the issue. If it happens repeatedly, there may be a deeper underlying issue we’ll have to investigate.

@nikeru8 Your issue may be the same as @PaulWoitaschek. If not, I’ll need a proper stack trace to investigate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Correct handling of exception: "getParameters failed (empty ...
1) Probably the most common reason would be closing/releasing the camera while still using it afterward. This can be especially problematic if you...
Read more >
RuntimeException: getParameters failed (empty parameters ...
The app crashes when navigating away from the scanner page, then back to the scanner page. Also when changing the orientation by rotating ......
Read more >
RuntimeException: getParameters failed (empty parameters)
getParameters failed (empty parameters) java.lang.RuntimeException: getParameters failed (empty parameters) at android.hardware.Camera.
Read more >
Taking a picture exception (getParameters failed) using ...
RuntimeException : getParameters failed (empty parameters). This error occurs immediately following the clicking of the OK to accept the ...
Read more >
8258 - Create camera error: Fatal Exception: java.lang ...
Fatal Exception : java.lang.RuntimeException: getParameters failed (empty parameters) at android.hardware.Camera.native_getParameters(Camera.java)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found