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

Problems on LG G3 #2

Closed
balzss opened this issue Feb 28, 2017 · 7 comments
Closed

Problems on LG G3 #2

balzss opened this issue Feb 28, 2017 · 7 comments

Comments

@balzss
Copy link

balzss commented Feb 28, 2017

Hi,
Thanks for putting this project together. Previously I had to deal with the Camera2 API and it's just a nightmare so I highly appreciate every project like this. However the demo app is not working perfectly on my LG G3 (D855). When I press the "camera turn" button the app closes and give a message that "Unfortunately, CameraKit has stopped." The other thing is the flashlight button: it does not turn on the flashlight. I know these statements are very generic but I don't know what else I could provide. I hope this helps a little.

@muetzenflo
Copy link

i can confirm this (also on LG G3). I cloned the repo to see what's going on, but in debug mode everything works as expected. This seems to be a proguard issue => crash log in dev console

@dwillmc dwillmc added the bug label Feb 28, 2017
@ThomasKomarnicki
Copy link

I've seen the same issue on my Nexus 5 (4.4) and Note 5 (6.0). It looks like the culprit is Camera1:261:
AspectRatio targetRatio = aspectRatios.size() > 0 ? aspectRatios.last() : null;
which throws:

at java.util.TreeMap.lastKey(TreeMap.java:630)
at java.util.TreeSet.last(TreeSet.java:272)
at com.flurgle.camerakit.Camera1.getPreviewResolution(Camera1.java:261)

I'm not sure how aspectRatios.last() could throw an exception if the TreeSet has entries.

@dwillmc
Copy link
Member

dwillmc commented Feb 28, 2017

@ThomasKomarnicki you see this on the app downloaded from Google Play right? That exception should be resolved in the library.

@ThomasKomarnicki
Copy link

yes it's only happening in the demo downloaded from Google Play, I cloned the repo and ran the most up to date version and it is no longer happening

@ThomasKomarnicki
Copy link

@dwillmc ah I found the commit where you fixed it, should be fine then..

@dwillmc
Copy link
Member

dwillmc commented Feb 28, 2017

If you're curious, it happens due to me wrongly assuming that there will always be matching aspect ratios available when comparing the set of available preview sizes and available picture capture sizes.

@dwillmc
Copy link
Member

dwillmc commented Mar 10, 2017

An update was just pushed which should rollout in the next few hours and fix this problem.
Please re-open if you get the update and it still doesn't work!

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

4 participants