Error fatal signal 11 - android

I am doing an application with native code.
I have a bug, that sometimes produces this error in the logcat, but not produces runtime error:
06-27 18:14:47.526: A/libc(32659): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 592 (Thread-1045)
I have read at internet and it says that could be produces for native code, in concret for the bad acess to memory.
Someone knows somethig?
Thanks

This is a seg fault. Its occurring at address 0, which means you're dereferencing a NULL pointer. Its occuring in libc, so its certainly happening in native code, which may be through you calling it directly or through the framework calling it. That's all you can tell from that one line.

I had the same error with the same address. After "googeling" for days i was stucked.
Today i found the solution (in my case): i use win 8 x64 with eclipse Juno. The problem was solved when i have disabled the UAC from windows.
Both the adb.exe and eclipse (in my case) were runned in admin mode.
Hope will help someone.

Related

Every runtime error reported as SIGSEGV error in android studio

I have linked some c++ codes to android studio project and it works with no problem, but every time I encounter with a runtime error in java code, android studio won't tell me the problem precisely and reports only this error in debugger:
Signal = SIGSEGV (signal SIGSEGV: invalid address (fault address: 0xc))
What is the problem?
This primarily occurs due to one of the 2 reasons :
1) Invalid memory reference.
2) Eating up too much memory.
Now, debugging this issue can be a bit intimidating.
So start finding out points where your code may be doing INVALID MEMORY ACCESS causing SIGSEGV error or points where your code is starting too many threads.
And You have to find out if this issue is regularly occuring or 1 in 5(or so) times.
Because I encountered the problem in one project and that occured 1 in 5-6 times.

Eclipse : Fatal signal 11 (SIGSEGV) at 0x0000ffec (code=1), thread 1557 (Thread-106) error

I'm developing an android game, but when i tried to test it in the genymotion, I've got this error "Fatal signal 11 (SIGSEGV) at 0x0000ffec (code=1), thread 1557 (Thread-106) error" and don't know how to fix it, can anyone help me please?
I'm using eclipse.
Thank you,
Is usually crashed in your native code. Check the native code and see where cause this crash. Maybe you can print more logs in your native code to check where the code reached.

Android caffe built demo shows error

Being new to Android NDK Caffe, I would like to use built version in my Android project. I tried to run this built sample demo, but while running, it showed the following:
03-26 14:46:35.697 2800-3042/com.sh1r0.caffe_android_demo A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 3042 (AsyncTask #1)
(the app crashed)
I can see that the sigsev signal is thrown through android AsyncTask.
The problem could come from this function.
caffeMobile.predictImage(strings[0])[0]; //line 160 of MainActivity
This signal comes from JNI and it is very difficult to know where is the problem unless you can debug natively (through ndk) the app. The caffe-sample is not configured to debug on native method.
Try this issues to manage the error:
Ensure that your image path in this string[0] arrays are not empty. and exists.
Ensure that the other caffeMobile functions are able to exec without
problems, for example:
caffeMobile = new CaffeMobile();
caffeMobile.setNumThreads(4);
caffeMobile.loadModel("/sdcard/caffe_mobile/bvlc_reference_caffenet/deploy.prototxt", "/sdcard/caffe_mobile/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel");
If you are able to execute the other functions, probably your image path is not correct, check.
If you are not able to execute loadModel or setNumThreads function, probably the apk is not loading libjni.so library correctly , or the jni bridge is not able to locate jni functions.

How could I print the stack-trace of my "libxxx.so" when error occured?

I am trying to have my app run on my Nexus 5(4.4.4).By the way, the app runs just fine on my other devices.However there is something wrong with my "libxxx.so". The error message is like this:
invalid address or address of corrupt block 0x2d6e7459 passed to dlfree
Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 4382 (Thread-15350)
Nothing more details.
I have tried the ndk-stack tool, but it didn't work.
I was wondering how could I get the crash backtrace/stack-trace printed in the Eclipse's logcat or shown in other places. So that I can locate where the error is in my C code.
Any idea how to solve this?

Is "Process terminated by signal (11)" always related to NDK?

I am tracking a bug in my project. From time to time, my app gets killed and in the logcat there is always the following line:
D/Zygote ( xx): Process xxxx terminated by signal (11)
I have been searching about this error and I always find mentions to NDK.
I am developing a project that uses a third-party C library. I do not know the library in great detail, but I can tell you that it does some network communication with a server. In my project there are several Services, some of which use this library.
So my question is, does this error always imply that the problem comes from the C library?
If not, could you give me examples of Java code in Android, that could cause this error as well?
Thanks.
EDIT: By the way, in the logcat output there is no stack trace before the previous line.
Most likely, SIGSEGV was reported before in your log. It may be quite a while earlier than the final message. This is an actual snapshot of one of such crashes in my logs:
01-29 16:00:39.124 F/libc ( 3033): Fatal signal 11 (SIGSEGV) at 0x0000002c (code=1)
... many more ...
01-29 16:00:48.367 D/Zygote ( 116): Process 3033 terminated by signal (11)
You can see that it took almost 10 sec for Zygote to report process termination after the fatal signal was received. Your milage may vary.
The actual reasons for SIGSEGV may be within the third-party C library, or in your Java, or in the way you call the C library. Note, for example, that it's forbidden to make most of JNI calls while a Java Exception is raised.

Categories

Resources