5

I am working on a app, where I will use android NDK & JNI. Whenever I run my app on any android 4.0 or higher version... my app will crash and gives the following error...

A/libc(18556): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)
D/libEGL(18606): loaded /system/lib/egl/libGLES_android.so
D/libEGL(18606): loaded /system/lib/egl/libEGL_adreno200.so
D/libEGL(18606): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
D/libEGL(18606): loaded /system/lib/egl/libGLESv2_adreno200.so
I/Adreno200-EGLSUB(18606): <ConfigWindowMatch:2078>: Format RGBA_8888.
D/OpenGLRenderer(18606): Enabling debug mode 0

Main problem is Fatal signal 11 (SIGSEGV) at 0xdeadbaad(code=1)

If anyone know about this... then tell me the reason.

Sam
  • 86,580
  • 20
  • 181
  • 179
Vivek Bansal
  • 2,471
  • 2
  • 19
  • 24
  • Your .SO broke. You have a segmentation fault in the C code. Post source, format the answer and maybe we can get somewhere. – Shark Oct 05 '12 at 15:54
  • Indeed. SIGSEGV should be a dead give-away. – TJ Thind Oct 05 '12 at 16:40
  • 1
    There usually is more info in the log, see for example http://stackoverflow.com/questions/5314036/how-to-use-addr2line-in-android – Alex Cohn Oct 05 '12 at 20:44

1 Answers1

0

initially, the segmentation fault and, specially the 0xdeadbaad, would mean a memory corruption or similar but, I recently found that, with the NDK, this is also the default behaviour for assertions: on assert fail it sends SIGSEGV, instead of SIGTRAP, and sets the memory pointer to this hex string.

You should check that your code is calling to assert or, in case you're using third party's software, check that you're passing the proper values to every call. A quick way to check this would be building your library with NDEBUG set to 1 (by default if you set APP_OPTIM := release in your Application.mk) and check if you still have exactly the same problem.

Hope this helps.

jcm
  • 2,568
  • 14
  • 18