dlazaro66 / QRCodeReaderView

Modification of ZXING Barcode Scanner project for easy Android QR-Code detection and AR purposes
1.9k stars 491 forks source link

java.lang.NullPointerException: Attempt to read from field 'int android.graphics.Point.x' on a null object reference #41

Closed sushilsingh94 closed 8 years ago

sushilsingh94 commented 8 years ago

java.lang.NullPointerException: Attempt to read from field 'int android.graphics.Point.x' on a null object reference at com.dlazaro66.qrcodereaderview.QRCodeReaderView.surfaceChanged(QRCodeReaderView.java:183) at android.view.SurfaceView.updateWindow(SurfaceView.java:593) at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:177) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2055) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858) at android.view.Choreographer.doCallbacks(Choreographer.java:670) at android.view.Choreographer.doFrame(Choreographer.java:606) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

JulieRaiyani commented 8 years ago

Hello David,

I also face same issue while try with emulator and some device which camera not working properly.Can you please give me any solution as soon as possible.

Thanks in advance, Julie

Moshe-Malka commented 8 years ago

same here...

dmsherazi commented 8 years ago

same here ... any solution?

mgrabarski commented 8 years ago

Hi, I also have this problem. Someone find solution for that?

dmsherazi commented 8 years ago

I noticed that this occurs on emulator only so I ignored it... haven't faced similar issue on a real device

dlazaro66 commented 8 years ago

As @dmsherazi notice, this only occurs in an emulator. This is fixed, but not released yet. Will be available in the next version.

meeshatyagi commented 5 years ago

No It occurs in phone as well.