PDA

View Full Version : crash on startup, android



darkchazz
12-27-2011, 06:51 PM
my app and all the proton examples crash on startup for some reason, both in the emulator and my phone.
I'm using the latest sdk r16 and ndk r7, and newest proton source.

Tried debugging with ndk-gdb, it gives me this single line when the apps crash

Program terminated with signal SIGSEGV, Segmentation fault.
Any ideas???

Seth
12-28-2011, 01:29 AM
Weird. I'm still using NDK r6, might try that? I think r7 adds a new toolchain setup so we don't need cygwin anymore, I plan to play with that at some point.

Also, do a full rebuild if you haven't, if headers change it isn't smart enough to figure out what needs to be rebuilt properly.

darkchazz
12-28-2011, 06:59 PM
r6 and a full rebuild did not solve the problem :(
Tried both 64bit and 32bit JDK , no difference..

It must be something I did since it was working fine before I did the format and reinstalled everything on my new SSD...

sdk r16, ndk r7, ant 1.8.2, JDK 6 Update 30

Loaded sdk packages:
sdk tools + platform tools
android 4.0.3 + 2.3.3 + 2.2 (platform and google APIs)
google market licensing + USB driver packages

Added environment vars:
ANT_HOME C:\Android\apache-ant-1.8.2
CYGWIN_DIR C:\cygwin
JAVA_HOME C:\Program Files (x86)\Java\jdk1.6.0_30
Path C:\Android\android-sdk\platform-tools;C:\Android\android-sdk\tools;C:\Android\apache-ant-1.8.2\bin;C:\Android\android-ndk-r7

What android sdk version are you using ???

Seth
12-28-2011, 09:52 PM
I think I am using SDK r15 with ndk r6.

The only tips I can think of:

To debug your problem I'd stick with RTBareBones (the simplest), and in android/jni/Application.mk, change APP_OPTIM=release to APP_OPTIM=debug if you didn't already, gdb might give better info.

Also, run ViewLogDefaultPhone.bat (or the one for the emulator) and watch that log closely, may be some clue there.

If that fails, I'd step back and try to compile some examples the NDK comes with (not using Proton) to just make sure everything is kosher there.

darkchazz
12-30-2011, 11:13 AM
Will do and report back later.

EDIT:
Ok, now I feel like an idiot xD
Turns out it was crashing because I forgot to generate the rttex files, so build.bat did not copy anything and the apk was empty, and crashes on startup because it couldn't find the background image file...
Can't believe I had to debug to find that out :sweatdrop:

I noticed though that compiling for armeabi-v7a gives a nice speed boost to the irrlicht collision detector, the frame rate in the quake map is constant 60fps and never drops at all, whereas with armeabi it drops to the 30s a lot especially when running into a wall or going up the stairs...

softa
01-27-2012, 03:34 AM
Thanks for this topic darkchazz. I have experienced the same problem. A bit frustrating but, I need to find a solution for it. Luckily, I saw this topic. I will continue watch this thread and will contribute whenever I resolved it.