-
Notifications
You must be signed in to change notification settings - Fork 189
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
crash camera preview #45
Comments
@grestuccia1 Need more information on this. What is the device you are using? Does this happen all the time on said device? |
Also got a similar report from a Xiaomi Redmi Note 3 (Android 5.1.1). Will try to replicate the issue and get back to you. |
com.desmond.squarecamera.CameraFragment; ... //private int getBackCameraID() { private int getBackCameraID() { ... |
@boxme Happens on a varied range of devices for me like ONEPLUS, xiaomi, OPPO, Samsung. Issue does not always occur. Usually occurs when the screen has gone off and then activity is resumed after. |
Are there any new developments on this, or how to fix it? I want to use this library but it keeps crashing my device. |
Having the same issue, any update on this? thank you. |
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'void android.hardware.Camera.setDisplayOrientation(int)' on a null object reference
at com.desmond.squarecamera.CameraFragment.determineDisplayOrientation(CameraFragment.java:325)
at com.desmond.squarecamera.CameraFragment.startCameraPreview(CameraFragment.java:241)
at com.desmond.squarecamera.CameraFragment.restartPreview(CameraFragment.java:234)
at com.desmond.squarecamera.CameraFragment.onResume(CameraFragment.java:434)
at android.support.v4.app.Fragment.performResume(Fragment.java:2020)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1107)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1234)
at android.support.v4.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:2056)
at android.support.v4.app.FragmentController.dispatchResume(FragmentController.java:196)
at android.support.v4.app.FragmentActivity.onResumeFragments(FragmentActivity.java:505)
at android.support.v4.app.FragmentActivity.onPostResume(FragmentActivity.java:494)
at android.support.v7.app.AppCompatActivity.onPostResume(AppCompatActivity.java:174)
at android.app.Activity.performResume(Activity.java:6344)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3110)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3152)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2495)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
The text was updated successfully, but these errors were encountered: