This repository was archived by the owner on Aug 28, 2024. It is now read-only.
This repository was archived by the owner on Aug 28, 2024. It is now read-only.
HellowWorld app immediately crashes on launch #79
Open
Description
With a clone of the repo as of Aug 14, 2020, no modifications, the HelloWorld app crashes at launch trying to read the model.pt asset:
/AndroidRuntime: FATAL EXCEPTION: main
Process: org.pytorch.helloworld, PID: 6473
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.pytorch.helloworld/org.pytorch.helloworld.MainActivity}: com.facebook.jni.CppException: version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at ../caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at ../caffe2/serialize/inline_container.cc:132)
(no backtrace available)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: com.facebook.jni.CppException: version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at ../caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at ../caffe2/serialize/inline_container.cc:132)
The crash is consistent even if I recreate the model with the trace_model script using a couple different versions of torch and torchvision:
With torch==1.6.0 torchvision==0.7.0
, Run python trace_model.py
, clean and launch, app crashes with same error.
With torch==1.4.0 torchvision==0.5.0
, Run python trace_model.py
, clean and launch, app crashes with same error.
It may be worth noting that I have multiple versions of the Android NDK installed and specify ndkVersion "21.1.6352462"
Metadata
Metadata
Assignees
Labels
No labels