2013-07-01 51 views
2

我試圖運行從http://code.google.com/p/android-anpr/source/下載的ANPR項目。ANPR項目 - 在啓動時立即關閉

當我嘗試執行它時,應用程序立即關閉

我試圖調試它,但它看起來像問題來自NativeGraphics.yuvToRGB(data, preview.cs.width, preview.cs.height);,我不明白爲什麼。

如果有人可能需要一些時間並嘗試運行並與我討論錯誤,那將會非常棒。在我看來,有一些缺失的庫或錯誤的實現。

+0

請閱讀[常見問題](http://stackoverflow.com/help/how-to-ask)。您應該向專家提供更多提示,例如錯誤消息。 – wonko79

+0

@ user2538472,你在android中成功執行了上述源代碼嗎?如果是的話,讓我知道,我面臨着這些問題。 –

回答

0

我有同樣的問題 - 嘗試改變你的NDK工具鏈。我相信它默認設置爲arm-linux-androideabi-4.6,但如果將其更改爲arm-linux-androideabi-4.8,它應該可以工作。

+0

您是否成功執行了code.google.If中的android-anpr src,以便幫助我解決我面臨的問題。 –

0

你可能想看看OpenALPR(http://www.openalpr.com)。它應該在NDK下編譯,並會給你更準確的讀數。它可能也快一點。

0

我有類似的麻煩;順便說一句,日誌中有信息,但它不會顯示爲錯誤,也不會顯示爲與應用程序相關的信息..您必須注意。對我來說,簡短的版本是這樣的:graphics_core.cpp中有一些彙編代碼需要你有一個支持NEON的ARM內核。日誌消息說我的是,但SIGSEV發生在那裏的某處,所以我不相信匯編代碼是正確的(似乎正在閱讀它不擁有的內存)。值得慶幸的是有解決這個簡單的方法:在GraphicsCore :: yuvToRGB取代:

#ifdef __ARM_NEON__ 

有:

#if 0 

,並在else分支的代碼將被用來代替。我還沒有正確識別任何板材,但它根本不識別我所在地區的板材,因此我不打算進一步研究它。

順便說一句,日誌消息是這個樣子:如何問

 
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 [email protected] #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 [email protected]~..... 
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 ([email protected] 
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 [email protected]\ 
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 [email protected]/..... 
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 [email protected] 
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 ...][email protected] 
01-08 11:18:29.496 2529-2529/? I/DEBUG﹕ 5cc164b8 00000000 00000000 56403770 5d770300 [email protected]] 
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..][email protected]] 
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 [email protected]]5!T]#..^ 
01-08 11:18:29.496 2529-2529/? I/DEBUG﹕ 5d88fc5c 5cc16498 0000010a 41c677f8 409d7e9b .d.\[email protected] 
01-08 11:18:29.496 2529-2529/? I/DEBUG﹕ 5d88fc6c 40164210 5b9584d0 5cba9420 00000000 [email protected][ ..\.... 
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 ..,@....,[email protected] 
01-08 11:18:29.497 2529-2529/? I/DEBUG﹕ 5cbcae10 00000000 075bcd15 00000000 40447f10 ......[[email protected] 
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.....