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

NullpointerException resulting in app crash when the device orientation is changed during Mrz scan #9

Open
SinanSoftware opened this issue Aug 23, 2021 · 1 comment

Comments

@SinanSoftware
Copy link

SinanSoftware commented Aug 23, 2021

Cordova SDK versions 5.5 up to 5.7 have issues when the device orientation is changed from landscape to portrait and back multiple times (scan freeze or app crash). In versions 5.5 and 5.6 we notice a scan freeze wherein a document is no longer recognized. In version 5.7 we see a NullpointerException in the logging causing the application to shut down.

Steps to reproduce:

  1. Make sure to enable the android setting for "auto-rotate screen" on your phone
  2. Follow the: "How to build the demo application" readme
  3. Start the app
  4. Choose MRZ
  5. Start 'scan doc' (do not point the camera to a document)
  6. Start rotating the device multiple times (number of rotations to trigger the app crash depends on the phone model. We tested on a Samsung S20)
  7. Witness the app crash

See logging with NullpointerException below:

08-23 16:28:17.890 25143 25143 E AndroidRuntime: Process: com.regula.documentreader, PID: 25143
08-23 16:28:17.890 25143 25143 E AndroidRuntime: java.lang.NullPointerException: Attempt to read from field 'int com.regula.documentreader.api.results.DocumentReaderResults.rfidResult' on a null object reference
08-23 16:28:17.890 25143 25143 E AndroidRuntime: at com.regula.documentreader.api.DocumentReader.notifyClient(DocumentReader.java:1145)
08-23 16:28:17.890 25143 25143 E AndroidRuntime: at com.regula.documentreader.api.DocumentReader.notifyClient(DocumentReader.java:1131)
08-23 16:28:17.890 25143 25143 E AndroidRuntime: at com.regula.documentreader.api.CaptureActivity3.handleCompletion(CaptureActivity3.java:1188)
08-23 16:28:17.890 25143 25143 E AndroidRuntime: at com.regula.documentreader.api.CaptureActivity3.onCompleted(CaptureActivity3.java:1005)
08-23 16:28:17.890 25143 25143 E AndroidRuntime: at com.regula.documentreader.api.RecognitionTask.onPostExecuteNotification(RecognitionTask.java:116)
08-23 16:28:17.890 25143 25143 E AndroidRuntime: at com.regula.documentreader.api.DocReaderAsyncTask.onPostExecute(DocReaderAsyncTask.java:28)
08-23 16:28:17.890 25143 25143 E AndroidRuntime: at com.regula.documentreader.api.RecognitionTask.onPostExecute(RecognitionTask.java:125)
08-23 16:28:17.890 25143 25143 E AndroidRuntime: at com.regula.documentreader.api.RecognitionTask.onPostExecute(RecognitionTask.java:14)
08-23 16:28:17.903 3536 3547 W ActivityManager: crash : com.regula.documentreader,0
08-23 16:28:17.906 3536 3547 W ActivityManager: Force finishing activity com.regula.documentreader/.api.CaptureActivity3

@rubengeertsema
Copy link

I have encountered the same issue with the 5.7 version as described above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants