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

Crash Android on Bar code scan #133

Open
mororc opened this issue Mar 6, 2018 · 1 comment
Open

Crash Android on Bar code scan #133

mororc opened this issue Mar 6, 2018 · 1 comment

Comments

@mororc
Copy link

mororc commented Mar 6, 2018

Android 5.1.1

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.hardware.Camera.setDisplayOrientation(int)' on a null object reference
at org.cloudsky.cordovaPlugins.ZBarScannerActivity.setCameraDisplayOrientation(ZBarScannerActivity.java:247)
at org.cloudsky.cordovaPlugins.ZBarScannerActivity.tryStartPreview(ZBarScannerActivity.java:525)
at org.cloudsky.cordovaPlugins.ZBarScannerActivity.surfaceCreated(ZBarScannerActivity.java:279)
at android.view.SurfaceView.updateWindow(SurfaceView.java:580)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:176)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1970)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5891)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5294)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

@KevinJDurant
Copy link

Same issue as #123, @phongphan fixed this with PR #125, this repo is abandoned so you might have to fork and merge the PR yourself.

You can add a local plugin using cordova plugin add /path/folder/.

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

2 participants