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

jni error #15

Closed
haophancs opened this issue Sep 18, 2017 · 11 comments
Closed

jni error #15

haophancs opened this issue Sep 18, 2017 · 11 comments

Comments

@haophancs
Copy link


Build fingerprint: 'Xiaomi/libra/libra:5.1.1/LMY47V/5.11.1:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 10250, tid: 10273, name: ImageListener >>> org.tensorflow.tensorflowdemo <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'jni_utils.cc:92 'asset' Must be non NULL'
r0 00000000 r1 00002821 r2 00000006 r3 00000000
r4 e29c4dd8 r5 00000006 r6 00000000 r7 0000010c
r8 e29c3ad4 r9 e29c39d8 sl 00000000 fp 00000000
ip 00002821 sp e29c3980 lr f7072e89 pc f709972c cpsr 600f0010

backtrace:
#00 pc 0003a72c /system/lib/libc.so (tgkill+12)
#1 pc 00013e85 /system/lib/libc.so (pthread_kill+52)
#2 pc 00014aa3 /system/lib/libc.so (raise+10)
#3 pc 0001131d /system/lib/libc.so (__libc_android_abort+36)
#4 pc 0000f54c /system/lib/libc.so (abort+4)
#5 pc 0053d03c /data/app/org.tensorflow.tensorflowdemo-1/lib/arm/libtensorflow_demo.so
#6 pc 0053d1bc /data/app/org.tensorflow.tensorflowdemo-1/lib/arm/libtensorflow_demo.so
#7 pc 0053d1d8 /data/app/org.tensorflow.tensorflowdemo-1/lib/arm/libtensorflow_demo.so
#8 pc 000746b4 /data/app/org.tensorflow.tensorflowdemo-1/lib/arm/libtensorflow_demo.so
#9 pc 00075594 /data/app/org.tensorflow.tensorflowdemo-1/lib/arm/libtensorflow_demo.so (ReadFileToProto(AAssetManager*, char const*, google::protobuf::MessageLite*)+1144)
#10 pc 00077bdc /data/app/org.tensorflow.tensorflowdemo-1/lib/arm/libtensorflow_demo.so (Java_org_tensorflow_demo_TensorFlowClassifier_initializeTensorFlow+1084)
#11 pc 000a2511 /system/lib/libart.so (art_quick_generic_jni_trampoline+32)
#12 pc 00136c1c /dev/ashmem/dalvik-main space (deleted)

@haophancs
Copy link
Author

In TensorflowClassifier.java i got an error at jni native function: "cannot corresponding JNI function Java_org_tensorflow_demo_TensorflowClassifier_initializeTensorflow..." Please help me :(

@Shefali-Upadhyaya
Copy link

How did you resolve this error?
In TensorflowClassifier.java i got an error at jni native function: "cannot corresponding JNI function Java_org_tensorflow_demo_TensorflowClassifier_initializeTensorflow..."

@haophancs
Copy link
Author

Download android-yolo.pb (link is in README) and put it into assets folder

@Shefali-Upadhyaya
Copy link

It is the link for android_graph.pb. I have downloaded it and I put it in the assets folder but the error is still there in TensorflowClassifier.java and ImageUtils.java.
Is it the same as android-yolo.pb?

@haophancs
Copy link
Author

Oh I was wrong, android_yolo.pb is correct

@Shefali-Upadhyaya
Copy link

Can you please provide me the link? because when I open this link -
https://drive.google.com/file/d/0B2fFW2t9-qW3MVJlQ29LRzlLT2c/view
I get android_graph.pb and not android_yolo.pb

@haophancs
Copy link
Author

It's correct link. Maybe I remember wrongly or the repository owner changed the file name

@Shefali-Upadhyaya
Copy link

Ohh okay. Actually the error is not removed. Do you know what will be affected if it is not corrected? And any idea about how to provide the definitions for JNI function?

@haophancs
Copy link
Author

So sorry but actually I don't know. I just put .pb file to assets and after that, the code run well

@Shefali-Upadhyaya
Copy link

Shefali-Upadhyaya commented Sep 30, 2017

Ohh okay no problem.
Can you please tell me the procedure whether its correct or not?

  1. Cloning the repository.
  2. Adding android_graph.pb file
  3. Link C++ project with gradle using ndk-build and Android.mk file?
  4. Run the project
    Are all these steps correct?

@defaultUser3214
Copy link

I have the same problem. could please help us somebody?

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

No branches or pull requests

3 participants