-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Crash on android in torch.load() #96
Comments
Write the file to disk and try to load it like I've had no luck using the load-from-assets functions, so I've reverted to write the .t7 file to disk and load it dynamically from a path when initializing torch. My first step was to manually put the .t7 file on the device disk and "hard code" the path in my .lua script. |
The crash is caused by the "torch-android/src/THApkFile.c" The "THFileVTable" data structure has slightly changed in the new version torch7. Here we do not need to implement the "THApkFile_readHalf" "THApkFile_writeHalf", just use NULL to fill the table. --- a/src/THApkFile.c @@ -634,6 +635,7 @@ THFile *THApkFile_new(const char *name, const char *mode, int isQuiet) |
added the missing fclose(). maybe a resource leaks diff --git a/src/torchandroid.cpp b/src/torchandroid.cpp |
Hi,
I am getting the following crash on loading a torch model in assets folder.
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 15381 (AsyncTask #1)
I loaded the model like this-
torch.load("model.t7", "apkbinary64")
I also converted the model.t7 to ascii format and tried loading it like this-
torch.load("modelascii.t7", "apkascii")
But i faced the same issue.
Please help resolve this issue.
The text was updated successfully, but these errors were encountered: