Skip to content
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

the demo app crashes with torch init. #111

Open
canneltigrou opened this issue Mar 25, 2019 · 0 comments
Open

the demo app crashes with torch init. #111

canneltigrou opened this issue Mar 25, 2019 · 0 comments

Comments

@canneltigrou
Copy link

canneltigrou commented Mar 25, 2019

Hi,
I succeeded to build your project, and I try to make it work with your demo facedetector e-lab on my mobile phone.
I added the permission to the camera. But when I clicked on a button, the app still crashes.
It stops to the instruction torchandroid.cpp : inittorch(AAssetManager* manager, const char* libpath) : luaopen_landroidprint(L)
I think that is the initialization of L that fails but I don't know why.

PS: What surprised me, is that the variable current_cpath that comes from L, contains some absolute paths from my computer. Is it normal?

I saw the issue #92 (I don't use CUDA)
but I think this issue is already fixed since I don't see the library to remove into the Android.mk or main.lua ?

edit: It misses a return to that function luaopen_landroidprint(L)
(I added a return 0 and now it stops at the function ret = luaL_dobuffer(L, filebytes, size, "main") from the function Java_com_torchandroid_facedemo_CameraClass_initTorch from torchdemo.cpp

Maybe if it's helpfull, I have these log with adb logcat :
03-25 17:30:27.844 16961 16961 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 16961 (ndroid.facedemo)
03-25 17:30:27.897 782 782 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-25 17:30:27.898 782 782 F DEBUG : Build fingerprint: 'Xiaomi/markw/markw:6.0.1/MMB29M/V10.2.1.0.MBEMIXM:user/release-keys'
03-25 17:30:27.898 782 782 F DEBUG : Revision: '0'
03-25 17:30:27.898 782 782 F DEBUG : ABI: 'arm64'
03-25 17:30:27.898 782 782 F DEBUG : pid: 16961, tid: 16961, name: ndroid.facedemo >>> com.torchandroid.facedemo <<<
03-25 17:30:27.899 782 782 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
03-25 17:30:27.925 782 782 F DEBUG : x0 0000005597bce4f0 x1 0000000000000000 x2 fffffffffffffff4 x3 0000000000000001
03-25 17:30:27.925 782 782 F DEBUG : x4 fffa007f91070c38 x5 fffa007f91070c38 x6 0000007f90d1d760 x7 00000000deae2e6d
03-25 17:30:27.926 782 782 F DEBUG : x8 7f7f7f7f7f7f7f7f x9 0000000000000046 x10 000000000000006f x11 00000000c32249d3
03-25 17:30:27.926 782 782 F DEBUG : x12 0000000000000069 x13 0000000000000000 x14 0000000008000000 x15 fffffffffffffff7
03-25 17:30:27.926 782 782 F DEBUG : x16 0000007f91455778 x17 0000007f916b6800 x18 0000000000000004 x19 0000007f91065378
03-25 17:30:27.926 782 782 F DEBUG : x20 0000007f91079f90 x21 0000007f91065530 x22 0000007f910653d8 x23 0000007f91065378
03-25 17:30:27.926 782 782 F DEBUG : x24 fff9000000000000 x25 00000000fff90000 x26 ffffffffffffffff x27 0000007f90d1d7e8
03-25 17:30:27.926 782 782 F DEBUG : x28 0000007f90d1d750 x29 0000007fc9cdc6f0 x30 0000007f916b6814
03-25 17:30:27.926 782 782 F DEBUG : sp 0000007fc9cdc6d0 pc 0000000000000000 pstate 0000000060000000
03-25 17:30:27.930 782 782 F DEBUG :
03-25 17:30:27.930 782 782 F DEBUG : backtrace:
03-25 17:30:27.930 782 782 F DEBUG : #00 pc 0000000000000000
03-25 17:30:27.930 782 782 F DEBUG : #1 pc 00000000001bc810 /data/app/com.torchandroid.facedemo-1/lib/arm64/libTH.so (THFile_close+16)
03-25 17:30:27.930 782 782 F DEBUG : #2 pc 000000000003bd44 /data/app/com.torchandroid.facedemo-1/lib/arm64/libtorch.so (torch_File_close+28)
03-25 17:30:27.930 782 782 F DEBUG : #3 pc 0000000000049af0 /data/app/com.torchandroid.facedemo-1/lib/arm64/libluajit.so (lj_BC_FUNCC+40)
03-25 17:30:27.930 782 782 F DEBUG : #4 pc 0000000000038290 /data/app/com.torchandroid.facedemo-1/lib/arm64/libluajit.so (lua_pcall+136)
03-25 17:30:27.930 782 782 F DEBUG : #5 pc 00000000000024f8 /data/app/com.torchandroid.facedemo-1/lib/arm64/libtorchdemo.so (Java_com_torchandroid_facedemo_CameraClass_initTorch+436)
03-25 17:30:27.930 782 782 F DEBUG : #6 pc 00000000000074d4 /data/app/com.torchandroid.facedemo-1/oat/arm64/base.odex (offset 0x5000) (long com.torchandroid.facedemo.CameraClass.initTorch(android.content.res.AssetManager, java.lang.String)+184)
03-25 17:30:27.930 782 782 F DEBUG : #7 pc 000000000000729c /data/app/com.torchandroid.facedemo-1/oat/arm64/base.odex (offset 0x5000) (void com.torchandroid.facedemo.CameraClass.init()+320)
03-25 17:30:27.930 782 782 F DEBUG : #8 pc 0000000000007998 /data/app/com.torchandroid.facedemo-1/oat/arm64/base.odex (offset 0x5000) (void com.torchandroid.facedemo.CameraClass.surfaceCreated(android.view.SurfaceHolder)+60)
03-25 17:30:27.930 782 782 F DEBUG : #9 pc 000000007599a118 /data/dalvik-cache/arm64/system@framework@boot.oat (offset 0x2564000)

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

No branches or pull requests

1 participant