-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[android_deploy] CRASH caused by Module.load
func while running App on Android Device with
#4884
Comments
Module.load
func while running App on Android Device with Module.load
func while running App on Android Device with
Can you see if #4871 resolved your problem, please make sure to rebuild the native app along with the java source |
Thanks for your quick reply! As you said in [REFACTOR][PY][API-Change] Polish tvm.runtime, tvm.runtime.module API update
However, the tvm.module related codes did not change yet, even I keep my dev branch the same with newest master branch.
Finally, I get the same crash error ,and I m not sure what's the problem?
|
@tqchen Yes! I find the answer finally! Your answer is right! TVM4J is Java Frontend for TVM Runtime, and the CRASH occurs at calling Module.load func. As #4871 said, runtime PackedFunc is changed at this commit. Namely, the corresponding Java interface for TVM runtime changed. So, even I synced my branch with remote master newest branch and rebuild the android apk, I get the same CRASH due to I forget to rebuild TVM4J to get a new java interface after #4871. The key is rebuild TVM4J before rebuild the android apk I am glad to learn more about Java as a Java newcomer and thanks for your kind help very much!
|
Glad that the problem is resolved. For future trouble shooting questions, you are more than welcomed to open new threads on https://discuss.tvm.ai/ |
I install the apk in vivo X6S A, according to the Android TVM Demo
vivo X6S A is arm64-v8a with android-22, so I modify config.mk as following:
However, I run app in device, the app crash immediately, so I add some lines for debug:
Then, I use
adb logcat -b main -v time>app.log
command to capture crash on android device machine to get the following log fileapp.log
Here is some important information of app.log
As you can see,
libCacheFilePath
occurs whileFinish Module.load
not, which means thatModule modelLib = Module.load(libCacheFilePath);
failed. Meanwhile, the app.log saysCaused by: java.lang.NullPointerException
.So, I locate the crash is caused by
Module.load
func orlibCacheFilePath
, howeverlibCacheFilePath=/data/data/org.apache.tvm.android.demo/cache/tvm4j_demo_-856121318/deploy_lib_cpu.so
, and I finddeploy_lib_cpu.so
indeed exist inFinally, I conclude the crash is caused by
Module.load
func.But, I don' t know how to sovle the crash problem, begging for your kind-hearted help sincerely!
The text was updated successfully, but these errors were encountered: