victorprad / InfiniTAM

A Framework for the Volumetric Integration of Depth Images
http://www.infinitam.org
Other
918 stars 351 forks source link

Android startup crash #31

Closed johoe closed 8 years ago

johoe commented 8 years ago

Hello, Thanks for publishing your code. I compiled your code according to the instructions, but the App crashes right after starting. Debugging did not reveal much, except that the app crashes right after all call to StartProcessing.

Maybe someone encountered the same issue and found the cause.

olafkaehler commented 8 years ago

Which tablet and which version of Android are you using? I've got an Nvidia Shield with 5.0.1 and it appears to be working here, but that doesn't mean anything... :)

Also, do you have OpenNI enabled or did you copy any of the sample sequences across?

johoe commented 8 years ago

I also usa a Nvidia Shiled but with 5.1.1. Currently I only copied the sample sequences. I used ubuntu 14.04 with Nvidia AndoridWorks and Windows 8.1 with Visual Studio 2013 and AndroidWorks (without CUDA) to create the app. In both cases with the same crashes.

olafkaehler commented 8 years ago

Another idea might be memory: you could reduce the value for "SDF_LOCAL_BLOCK_NUM" in ITMLib/Utils/ITMLibDefines.h and try again.

If that doesn't help, I guess you'll have to go through things step by step, printing something to the Android log every couple of lines of code, and see where exactly things go wrong.

johoe commented 8 years ago

After some debugging in the last few days, I found out that somehow the percent sign within the absolute path of the demo data got corrupted. Therefore no data is loaded and the app crashes. After explicitly saving the source file as UTF-8 everything works fine. I have still no clue which tool was the culprit.

Thank you for your help.

chiwunau commented 8 years ago

Hello, I also got a Shield tablet with 5.1.1. and would really like to try the source code on it. For some reason I cannot access to the internet under my Ubuntu system.

Is cuda for android only supported on ubuntu?? any workaround or places that I can download the CodeWorksforAndroid on my windows system and transfer it to ubuntu?

I also tried to build the code without cuda and with Asus Xtion it works on my other tablet running Android 4.4,2(with extremely low frame rate), however the same apk does not work on Shield. I noticed that Openni2 have some problem right now with Android Lollipop[https://github.com/occipital/OpenNI2/issues/43]

any ideas? by any chance could you share me the apk you have built?

johoe commented 8 years ago

Hello,
last time I checked Cuda for android cross-compilation is only supported for Ubuntu x64. Since I prefer to use Nsight Tegra tools I used an Ubuntu x64 VM to compile libITMlib.so, transferred the lib + some files form to toolkit to windows and build the apk there. Currently the app just uses the demo teddy files.

I am too struggling with this Openni2 – Lollipop issues, since we use a Kinect is does not get easier. I will let you know when I make some progress.

olafkaehler commented 8 years ago

I have definitely used AndroidWorks in OpenSUSE Linux before, so while it might still be Linux only it's almost certainly not limited to Ubuntu. I have never tried any Windows versions and not upgraded to CodeWorks for Android, though. As Johoe suggested, VMs might be the easiest workaround you could try.

Regarding the OpenNI issues, I've commented extensively in the linked thread in the OpenNI2 issues on how to make it work on Android L without root access, but it's a pain. I believe the latest development version of OpenNI2 might be slightly better behaved than the master branch, but getting the original Kinect to cooperate with Android will certainly still be a challenge! There should not be a massively big difference between Android versions 4.4.2 and 5.1, though...

chiwunau commented 8 years ago

Thank you so much, I eventually got the Shield SDK installed in my Ubuntu 14.04 and with @olafkaehler Openni workaround I am now able to run the program on my Nvidia Shield.