SandroMachado / openalpr-android

Android Automatic License Plate Recognition library (http://www.openalpr.com) ported for android.
Apache License 2.0
770 stars 272 forks source link

Crash during EU recognizing #4

Closed Lasek closed 8 years ago

Lasek commented 8 years ago

Hey, I use sample application. I changed us to eu but app was crashed during plate recognizing.

String result = OpenALPR.Factory.create(MainActivity.this, ANDROID_DATA_DIR).recognizeWithCountryRegionNConfig("eu", "", destination.getAbsolutePath(), openAlprConfFile, 10);

Log:

12-17 13:38:57.978 2318-2355/com.sandro.openalprsample D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
12-17 13:38:57.987 2318-2318/com.sandro.openalprsample D/Atlas: Validating map...
12-17 13:38:58.024 2318-2355/com.sandro.openalprsample I/Adreno-EGL: <qeglDrvAPI_eglInitialize:410>: QUALCOMM Build: 10/28/14, c33033c, Ia6306ec328
12-17 13:38:58.025 2318-2355/com.sandro.openalprsample I/OpenGLRenderer: Initialized EGL, version 1.4
12-17 13:38:58.046 2318-2355/com.sandro.openalprsample D/OpenGLRenderer: Enabling debug mode 0
12-17 13:38:58.149 2318-2318/com.sandro.openalprsample I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@300604ab time:114794351
12-17 13:39:05.914 2318-2355/com.sandro.openalprsample D/OpenGLRenderer: endAllStagingAnimators on 0xb84db010 (RippleDrawable) with handle 0xb84dadd0
12-17 13:39:35.365 2318-2318/com.sandro.openalprsample W/Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
12-17 13:39:35.628 2318-2318/com.sandro.openalprsample I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@300604ab time:114831830
12-17 13:39:41.153 2318-3779/com.sandro.openalprsample A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 3779 (AsyncTask #1)
12-17 13:39:42.180 2318-2318/com.sandro.openalprsample I/Choreographer: Skipped 55 frames!  The application may be doing too much work on its main thread.
SandroMachado commented 8 years ago

Probably this is related to #1and should be fixed now, can you please test with the version 1.0.1?

Lasek commented 8 years ago

I tested with 1.0.1 version. Issue still exists.

jrocharodrigues commented 8 years ago

I have the same issue

SandroMachado commented 8 years ago

I tried with a Portuguese licence plate and it worked as expected (please check the screenshot above).

Probably the problem was that the library was not able to recognize any licence plate in the picture. I improved the sample application (https://github.com/SandroMachado/openalpr-android/commit/e1037941f4f7dba1bd74ef24b0833ccfd8fd6e18) to display a toast instead of crashing when the library is not able to recognize any licence plate.

baconlmy48bsandromachado12192015201121

JerzyPuchalski commented 8 years ago

Same issue here with v1.1.0.

Same picture works with "us" and doesn't with "eu". Tested with sample app on two different devices.

Fortunately I was able to get rid of this SIGSEGV! All i did was adding the new folder in assets of the library: main/assets/runtime_data/keypoints/eu I also copied there one of the files from "us" folder.

Already made few tests that were producing the crash before - now wasn't able to reproduce the problem!

SandroMachado commented 8 years ago

Fixed by #9.