2

I'm trying to run a ANPR project downloaded from http://code.google.com/p/android-anpr/source/.

When I try to execute it, the app is closing immediately.

I tried to debug it, but it looks like the problem comes from NativeGraphics.yuvToRGB(data, preview.cs.width, preview.cs.height);, and I can not figure out why exactly.

Would be really great if someone could take some time and try to run it and and discuss the error with me. In my opinion, there are some missing libraries or wrong implementation.

tshepang
  • 12,111
  • 21
  • 91
  • 136
  • Please read the [FAQ](http://stackoverflow.com/help/how-to-ask) about how to ask. You should provide the experts some more hints e.g. the error message. –  Jul 01 '13 at 11:07
  • @user2538472,did you successfully executed the above source in android? If so let me know, i'm facing issue in these. – Senthil Mg Apr 23 '14 at 14:27

3 Answers3

0

I had the same issue - try changing your toolchain for the NDK. I believe it is set to arm-linux-androideabi-4.6 by default, but if you change it to arm-linux-androideabi-4.8 it should work.

  • Did you successfully executed the android-anpr src from code.google.If so help me to resolve the problem i am facing on it. – Senthil Mg Apr 23 '14 at 14:23
0

You may want to check out OpenALPR (http://www.openalpr.com). It should compile under the NDK and would give you more accurate readings. It's probably a bit faster as well.

Derrick Johnson
  • 377
  • 5
  • 9
0

I was having similar trouble; By the way there's information in the log, but it does not show up as an error nor does it show up as related to the app.. you really have to pay attention. The short version, for me, was this: There's a bit of assembly code in graphics_core.cpp that requires you to have a NEON-capable ARM core. The log messages say mine is, but a SIGSEV happens somewhere in there so I'm not convinced the assembly code is correct (seems to be reading memory it does not own). Thankfully there's an easy way around this: In GraphicsCore :: yuvToRGB replace:

#ifdef __ARM_NEON__

with:

#if 0

and the code in the else branch will be used instead. I've yet to get it to properly recognize any plate yet but it doesn't recognize plates in my region at all so I'm not going to be looking further into it.

By the way, the log messages look something like this:

01-08 11:18:29.223    32753-327/? I/intelligence_info﹕ GraphicsCore::yuvToRGB
01-08 11:18:29.223    32753-327/? I/intelligence_info﹕ Neon support - ok/ armv7: 2.6.29-g582a0f5 #38 / default: 2.6.29-00261-g0097074-dirty #20 / armv5: 2.6.29-g582a0f5 digit@lulu #37
01-08 11:18:29.223    32753-327/? I/intelligence_info﹕ gray image :: width is 1920; height is 1080; stride is 7680; format is 1;flags is0
01-08 11:18:29.223    32753-327/? A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 327 (Thread-2146)
01-08 11:18:29.227    32753-327/? A/libc﹕ Send stop signal to pid:32753 in debugger_signal_handler
01-08 11:18:29.230    2529-2529/? I/DEBUG﹕ handle_request(15)
01-08 11:18:29.230    2529-2529/? I/DEBUG﹕ check process 32753 name:om.intelligency
01-08 11:18:29.230    2529-2529/? I/DEBUG﹕ BOOM: pid=32753 uid=10062 gid=10062 tid=327
01-08 11:18:29.232    2529-2529/? I/DEBUG﹕ [OnPurpose Redunant in preset_info] pid: 32753, tid: 327, name: Thread-2146  >>> com.intelligency <<<
01-08 11:18:29.335    2529-2529/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-08 11:18:29.336    2529-2529/? I/DEBUG﹕ pid: 32753, tid: 327, name: Thread-2146  >>> com.intelligency <<<
01-08 11:18:29.336    2529-2529/? I/DEBUG﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
01-08 11:18:29.489    2529-2529/? I/DEBUG﹕ r0 001fa400  r1 00000000  r2 4270bc10  r3 00000438
01-08 11:18:29.489    2529-2529/? I/DEBUG﹕ r4 5cbc59f0  r5 00000000  r6 00000000  r7 5e14fb00
01-08 11:18:29.489    2529-2529/? I/DEBUG﹕ r8 41e259b8  r9 5d78ff80  sl 5cc16498  fp 5d88fc4c
01-08 11:18:29.489    2529-2529/? I/DEBUG﹕ ip 5cbcae00  sp 5d88fb98  lr 5e1745cb  pc 5e0aef42  cpsr 20000030
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ backtrace:
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ #00  pc 00016f42  /data/app-lib/com.intelligency-1/libcom_graphics_NativeGraphics.so (GraphicsCoreNS::GraphicsCore::yuvToRGB(_JNIEnv*, _jclass*, _jbyteArray*, _jobject*)+201)
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ #01  pc 00016e43  /data/app-lib/com.intelligency-1/libcom_graphics_NativeGraphics.so (Java_com_graphics_NativeGraphics_nativeYuvToRGB+32)
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ #02  pc 0001e910  /system/lib/libdvm.so (dvmPlatformInvoke+112)
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ #03  pc 0004e7c9  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+500)
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ #04  pc 00050cc9  /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+200)
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ #05  pc 00027d2c  /system/lib/libdvm.so
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ #06  pc 000fedc8  [stack:327]
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ stack:
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb58  41e11700  /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb5c  409d11bd  /system/lib/libdvm.so
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb60  41e11700  /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb64  409d38c1  /system/lib/libdvm.so
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb68  5cbc59f0
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb6c  5cc16488
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb70  00000001
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb74  5b959510
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb78  00000001
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb7c  5d88fba8  [stack:327]
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb80  00000000
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb84  5e1745cb  /system/lib/libjnigraphics.so (AndroidBitmap_lockPixels+34)
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb88  5cbc59f0
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb8c  41e259c8  /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb90  df0027ad
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb94  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ #00  5d88fb98  00000438
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fb9c  00001e00
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fba0  00000001
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fba4  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fba8  4270bc10  /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbac  00000780
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbb0  00000438
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbb4  00001e00
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbb8  00000001
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbbc  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbc0  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbc4  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbc8  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbcc  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbd0  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbd4  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ ........  ........
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ #01  5d88fc10  41e11700  /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc14  41c677f8  /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc18  41e259b8  /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc1c  41e11700  /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc20  57186198  /dev/ashmem/dalvik-LinearAlloc (deleted)
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc24  5cc16488
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc28  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc2c  5d78ff88
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc30  5d88fc38  [stack:327]
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc34  409a5914  /system/lib/libdvm.so (dvmPlatformInvoke+116)
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ #02  5d88fc38  5d78ff80
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc3c  00000000
01-08 11:18:29.493    2529-2529/? I/DEBUG﹕ 5d88fc40  41c677f8  /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.493    2529-2529/? I/DEBUG﹕ 5d88fc44  00000001
01-08 11:18:29.493    2529-2529/? I/DEBUG﹕ 5d88fc48  00000000
01-08 11:18:29.493    2529-2529/? I/DEBUG﹕ 5d88fc4c  409d57cd  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+504)
01-08 11:18:29.494    2529-2529/? I/DEBUG﹕ memory near r0:
01-08 11:18:29.494    2529-2529/? I/DEBUG﹕ 001fa3e0 ffffffff ffffffff ffffffff ffffffff  ................
01-08 11:18:29.494    2529-2529/? I/DEBUG﹕ 001fa3f0 ffffffff ffffffff ffffffff ffffffff  ................
01-08 11:18:29.494    2529-2529/? I/DEBUG﹕ 001fa400 ffffffff ffffffff ffffffff ffffffff  ................
01-08 11:18:29.494    2529-2529/? I/DEBUG﹕ 001fa410 ffffffff ffffffff ffffffff ffffffff  ................
01-08 11:18:29.494    2529-2529/? I/DEBUG﹕ 001fa420 ffffffff ffffffff ffffffff ffffffff  ................
01-08 11:18:29.494    2529-2529/? I/DEBUG﹕ memory near r2:
01-08 11:18:29.494    2529-2529/? I/DEBUG﹕ 4270bbf0 82828282 82828282 00000000 007e901b  ..............~.
01-08 11:18:29.494    2529-2529/? I/DEBUG﹕ 4270bc00 40ecc800 00000000 007e9000 00000000  ...@......~.....
01-08 11:18:29.494    2529-2529/? I/DEBUG﹕ 4270bc10 00000000 00000000 00000000 00000000  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 4270bc20 00000000 00000000 00000000 00000000  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 4270bc30 00000000 00000000 00000000 00000000  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ memory near r4:
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 5cbc59d0 0001af28 00000000 40eb2bd0 696d7201  (........+.@.rmi
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 5cbc59e0 81600029 6c6f6800 00000000 0000002b  ).`..hol....+...
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 5cbc59f0 40a3d4c0 00000000 0000000c 5cc16488  ...@.........d.\
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 5cbc5a00 00000000 00000000 5cbb3528 00726564  ........(5.\der.
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 5cbc5a10 00000028 0000002b 006e0041 00610074  (...+...A.n.t.a.
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ memory near r7:
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 5e14fae0 7fffa890 8016afb0 7fffae30 8014afb0  ........0.......
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 5e14faf0 7fffb0e0 7fffc870 7fffb668 00000001  ....p...h.......
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 5e14fb00 ffffffff ffffffff 00000000 00000000  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 5e14fb10 00000000 00000000 00000000 00000000  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 5e14fb20 00000000 00000000 00000000 00000000  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ memory near r8:
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 41e25998 00000004 00000000 00000000 00000000  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 41e259a8 00000000 00000000 00000000 002f761b  .............v/.
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 41e259b8 40ecc800 00000000 002f7600 00000000  ...@.....v/.....
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 41e259c8 02020202 03030202 03030303 03030303  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 41e259d8 03030303 02030303 02020202 02020202  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ memory near r9:
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d78ff60 00000001 5d78ff9c 5d533604 5d78ff9c  ......x].6S]..x]
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d78ff70 5d53360c 57186198 00000000 00000000  .6S].a.W........
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d78ff80 41e259b8 41e11700 5d78ffc4 5d533bc8  .Y.A...A..x].;S]
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d78ff90 57186240 5d53360c 00000000 41e11700  @b.W.6S].......A
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d78ffa0 40ef5450 41e259b8 00000780 00000438  PT.@.Y.A....8...
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ memory near sl:
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5cc16478 00000002 00000000 5cba7748 00000453  ........Hw.\S...
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5cc16488 5d53360c 5d78ff80 57186240 5d54d000  .6S]..x]@b.W..T]
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5cc16498 41e11700 00000000 5d88fd98 00000000  ...A.......]....
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5cc164a8 5d88fdcc 0000000c 00010008 409aa900  ...]...........@
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5cc164b8 00000000 00000000 56403770 5d770300  ........p7@V..w]
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ memory near fp:
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d88fc2c 5d78ff88 5d88fc38 409a5914 5d78ff80  ..x]8..].Y.@..x]
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d88fc3c 00000000 41c677f8 00000001 00000000  .....w.A........
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d88fc4c 409d57cd 5d78ff80 5d542135 5e0aee23  .W.@..x]5!T]#..^
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d88fc5c 5cc16498 0000010a 41c677f8 409d7e9b  .d.\.....w.A.~.@
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d88fc6c 40164210 5b9584d0 5cba9420 00000000  .B.@...[ ..\....
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ memory near ip:
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5cbcade0 6f207372 20796c6e 63206669 61726168  rs only if chara
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5cbcadf0 72657463 756f6320 6d20746e 0000004b  cter count mK...
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5cbcae00 402cc0b0 00000001 4047242c 4270bc10  ..,@....,$G@..pB
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5cbcae10 00000000 075bcd15 00000000 40447f10  ......[.......D@
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5cbcae20 62690100 4270bc10 007e9000 00000000  ..ib..pB..~.....
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ memory near sp:
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5d88fb78 00000001 5d88fba8 00000000 5e1745cb  .......].....E.^
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5d88fb88 5cbc59f0 41e259c8 df0027ad 00000000  .Y.\.Y.A.'......
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5d88fb98 00000438 00001e00 00000001 00000000  8...............
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5d88fba8 4270bc10 00000780 00000438 00001e00  ..pB....8.......
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5d88fbb8 00000001 00000000 00000000 00000000  ................
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ code around pc:
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5e0aef20 4f2a9b06 43589a04 f04f447f f04f0500  ..*O..XC.DO...O.
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5e0aef30 f9270600 ee80370f ee815b10 ee825b10  ..'..7...[...[..
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5e0aef40 f9255b10 f925070f f925170f f982270d  .[%...%...%..'..
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5e0aef50 f982030d f982032d f982034d f982036d  ....-...M...m...
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5e0aef60 f982038d f98203ad f98203cd 380803ed  ...............8
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ code around lr:
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5e1745a8 f1d0b570 bf380501 46142500 bf082900  p.....8..%.F.)..
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5e1745b8 0501f045 f7ffb98d 4606ef70 f7ffb180  E.......p..F....
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5e1745c8 6933ef72 4630b92b ef72f7ff 0002f06f  r.3i+.0F..r.o...
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5e1745d8 b144bd70 46286023 f04fbd70 bd7030ff  p.D.#`(Fp.O..0p.
01-08 11:18:29.498    2529-2529/? I/DEBUG﹕ 5e1745e8 0001f06f 4620bd70 b538bd70 0401f1d0  o...p. Fp.8.....
Keilaron
  • 437
  • 4
  • 10