sh1r0 / caffe-android-lib

Porting caffe to android platform
Other
510 stars 204 forks source link

run caffee demo error #131

Open StellaSong12 opened 5 years ago

StellaSong12 commented 5 years ago

I use armeabi-v7a with virtual Emulator API 23, while it makes something wrong when it goes to Net<float> *t = new Net<float>(modelproto, TEST);

message here: ` --------- beginning of crash 11-26 13:51:05.058 4363-4363/com.mogoweb.caffe.xorusingcaffe A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 4363 (e.xorusingcaffe) 11-26 13:51:05.194 660-660/? A/DEBUG: 11-26 13:51:05.199 660-660/? A/DEBUG: Build fingerprint: 'Android/sdk_google_phone_armv7/generic:6.0/MASTER/5056751:userdebug/test-keys' 11-26 13:51:05.201 660-660/? A/DEBUG: Revision: '0' 11-26 13:51:05.202 660-660/? A/DEBUG: ABI: 'arm' 11-26 13:51:05.207 660-660/? A/DEBUG: pid: 4363, tid: 4363, name: e.xorusingcaffe >>> com.mogoweb.caffe.xorusingcaffe <<< 11-26 13:51:05.208 660-660/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- 11-26 13:51:05.368 660-660/? A/DEBUG: r0 00000000 r1 0000110b r2 00000006 r3 b6f91b7c 11-26 13:51:05.369 660-660/? A/DEBUG: r4 b6f91b84 r5 b6f91b34 r6 0000001e r7 0000010c 11-26 13:51:05.370 660-660/? A/DEBUG: r8 a388e230 r9 befafc48 sl a3881bec fp a3886bb0 11-26 13:51:05.372 660-660/? A/DEBUG: ip 00000006 sp befafb20 lr b6d06ef9 pc b6d08340 cpsr 40000010 11-26 13:51:05.489 660-660/? A/DEBUG: backtrace: 11-26 13:51:05.491 660-660/? A/DEBUG: #00 pc 00040340 /system/lib/libc.so (tgkill+12) 11-26 13:51:05.492 660-660/? A/DEBUG: #01 pc 0003eef5 /system/lib/libc.so (pthread_kill+32) 11-26 13:51:05.493 660-660/? A/DEBUG: #02 pc 0001b55b /system/lib/libc.so (raise+10) 11-26 13:51:05.496 660-660/? A/DEBUG: #03 pc 0001870f /system/lib/libc.so (__libc_android_abort+34) 11-26 13:51:05.499 660-660/? A/DEBUG: #04 pc 00017490 /system/lib/libc.so (abort+4) 11-26 13:51:05.500 660-660/? A/DEBUG: #05 pc 00242733 /data/app/com.mogoweb.caffe.xorusingcaffe-2/lib/arm/libcaffe.so 11-26 13:51:05.501 660-660/? A/DEBUG: #06 pc 00243fc7 /data/app/com.mogoweb.caffe.xorusingcaffe-2/lib/arm/libcaffe.so (google::LogMessage::Fail()+10) 11-26 13:51:05.502 660-660/? A/DEBUG: #07 pc 002465c7 /data/app/com.mogoweb.caffe.xorusingcaffe-2/lib/arm/libcaffe.so (google::LogMessage::SendToLog()+246) 11-26 13:51:05.502 660-660/? A/DEBUG: #08 pc 00243d6f /data/app/com.mogoweb.caffe.xorusingcaffe-2/lib/arm/libcaffe.so (google::LogMessage::Flush()+134) 11-26 13:51:05.503 660-660/? A/DEBUG: #09 pc 002468b9 /data/app/com.mogoweb.caffe.xorusingcaffe-2/lib/arm/libcaffe.so (google::LogMessageFatal::~LogMessageFatal()+4) 11-26 13:51:05.504 660-660/? A/DEBUG: #10 pc 0018ee99 /data/app/com.mogoweb.caffe.xorusingcaffe-2/lib/arm/libcaffe.so (caffe::ReadProtoFromTextFile(char const, google::protobuf::Message)+148) 11-26 13:51:05.505 660-660/? A/DEBUG: #11 pc 0017fcab /data/app/com.mogoweb.caffe.xorusingcaffe-2/lib/arm/libcaffe.so (caffe::ReadNetParamsFromTextFileOrDie(std::string const&, caffe::NetParameter)+10) 11-26 13:51:05.506 660-660/? A/DEBUG: #12 pc 00170aa5 /data/app/com.mogoweb.caffe.xorusingcaffe-2/lib/arm/libcaffe.so (caffe::Net::Net(std::string const&, caffe::Phase, int, std::vector<std::string, std::allocator > const, caffe::Net const*)+504) 11-26 13:51:05.507 660-660/? A/DEBUG: #13 pc 000074d5 /data/app/com.mogoweb.caffe.xorusingcaffe-2/lib/arm/libnative-lib.so (Java_com_mogoweb_caffe_xorusingcaffe_MainActivity_startXORTest+184) 11-26 13:51:05.509 660-660/? A/DEBUG: #14 pc 0066c431 /data/app/com.mogoweb.caffe.xorusingcaffe-2/oat/arm/base.odex (offset 0x2f4000) (java.lang.String com.mogoweb.caffe.xorusingcaffe.MainActivity.startXORTest(java.lang.String, java.lang.String)+116) 11-26 13:51:05.510 660-660/? A/DEBUG: #15 pc 004ee77b /data/app/com.mogoweb.caffe.xorusingcaffe-2/oat/arm/base.odex (offset 0x2f4000) (void com.mogoweb.caffe.xorusingcaffe.MainActivity$1.onClick(android.view.View)+118) 11-26 13:51:05.514 660-660/? A/DEBUG: #16 pc 74190755 /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x1eb1000)

--------- beginning of system

11-26 13:51:07.516 1021-1230/system_process E/NativeCrashListener: Exception dealing with report android.system.ErrnoException: read failed: EAGAIN (Try again) at libcore.io.Posix.readBytes(Native Method) at libcore.io.Posix.read(Posix.java:169) at libcore.io.BlockGuardOs.read(BlockGuardOs.java:230) at android.system.Os.read(Os.java:367) at com.android.server.am.NativeCrashListener.consumeNativeCrashData(NativeCrashListener.java:240) at com.android.server.am.NativeCrashListener.run(NativeCrashListener.java:138) 11-26 13:51:08.147 660-660/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_03 11-26 13:51:08.147 660-660/? E/DEBUG: AM write failed: Broken pipe ` what should I do?

StellaSong12 commented 5 years ago

The demo can run, but when c++ code gose to caffe model, it crash.

sh1r0 commented 5 years ago

I think it might be the permission issue, please refer to https://github.com/sh1r0/caffe-android-demo/issues/41#issuecomment-264628393, thanks.

StellaSong12 commented 5 years ago

@sh1r0 I tried, but it can NOT work. From the crash code, which is happened when I new "NET", but use model, so I guess the libcaffe.so may wrong. I get it from your README, and I want to know how to get a write one. Thank a lot.