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

FATAL EXCEPTION: main E/AndroidRuntime(26360): Process: cn.rc100.rong_b, PID: 26360 E/AndroidRuntime(26360): java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Surface android.media.ImageReader.getSurface()' on a null object reference #41

Open
LNyears opened this issue Dec 25, 2020 · 0 comments

Comments

@LNyears
Copy link

LNyears commented Dec 25, 2020

在相机权限未授权情况下进行操作,多次点击会导致应用闪退:

Android 7.1.2
vivo

E/AndroidRuntime(26360): FATAL EXCEPTION: main
E/AndroidRuntime(26360): Process: cn.rc100.rong_b, PID: 26360
E/AndroidRuntime(26360): java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Surface android.media.ImageReader.getSurface()' on a null object reference
E/AndroidRuntime(26360): at com.rhyme.r_scan.RScanCamera.RScanCamera.startPreviewWithImageStream(RScanCamera.java:369)
E/AndroidRuntime(26360): at com.rhyme.r_scan.RScanCamera.RScanCamera.startPreview(RScanCamera.java:275)
E/AndroidRuntime(26360): at com.rhyme.r_scan.RScanCamera.RScanCamera.access$100(RScanCamera.java:51)
E/AndroidRuntime(26360): at com.rhyme.r_scan.RScanCamera.RScanCamera$1.onOpened(RScanCamera.java:161)
E/AndroidRuntime(26360): at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:134)
E/AndroidRuntime(26360): at android.os.Handler.handleCallback(Handler.java:751)
E/AndroidRuntime(26360): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(26360): at android.os.Looper.loop(Looper.java:154)
E/AndroidRuntime(26360): at android.app.ActivityThread.main(ActivityThread.java:6267)
E/AndroidRuntime(26360): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(26360): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime(26360): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:793)

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

1 participant