Thursday, April 24, 2014

android JNI call at XXXXX problems reported Fatal signal 11 (SIGSEGV), scores for advice everyone! ! ! ! !


RT, Android JNI call to the underlying C code when problems arise, repeated calls for a long time there will be such a problem, but I do not see the C code and what problems reported after this error, written in C code also print information, which is not good positioning error in the line, the expert reference articles http://zzhhui.blog.sohu.com/266543920.html, which has a lot of confusion, we kind that usually JNI is how to debug, and if you can be able to locate the address of the prompts XXXXX with SO file to a function or line of code problematic enough, the older articles have when it comes to using addr2line command, I have tried This command does not get the information wrong line of code plus the directory where the files of my SO, but after the implementation of the NDK
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Post your own print information in the following
LogCat
Curiously program has been given, the following are printed information written in C, is it not wrong JNI C code immediately stop running yet
Reply:
I perform Results addr2line-e libavplayer.so 61b5c482 get under my SO file NDK is? ? : 0
Is not I right this way, I was SO SO file after file
produced a document compiled several static
Reply:
LOG did not see ah generally hang stack information like this
 
04-15 11:06:53.859 F / libc (2398): Fatal signal 11 (SIGSEGV) at 0x00000000 (code = 1)

04-15 11:06:53.869 I / DEBUG (1274): *********************************** *************

04-15 11:06:53.869 I / DEBUG (1274): Build fingerprint: 'Xiaomi / mione_plus / mione_plus: 4.0.4/IMM76D/ICS24.0: user / release-keys'

04-15 11:06:53.869 I / DEBUG (1274): pid: 2398, tid: 2555 >>> org.linphone <<<< br />
04-15 11:06:53.869 I / DEBUG (1274): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000

04-15 11:06:53.869 I / DEBUG (1274): r0 00fad7d0 r1 00000000 r2 000000a0 r3 00000050

04-15 11:06:53.869 I / DEBUG (1274): r4 00fbf180 r5 00000000 r6 5cfd59a0 r7 00000000

04-15 11:06:53.869 I / DEBUG (1274): r8 5cfd5820 r9 5cfd5814 10 5cfd58a0 fp 5cfd5818

04-15 11:06:53.869 I / DEBUG (1274): ip 00000001 sp 5cfd5804 lr 5c8546e4 pc 40050cc8 cpsr 80000010

04-15 11:06:53.869 I / DEBUG (1274): d0 0000000000000000 d1 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d2 0000000000000000 d3 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d4 0000000000000000 d5 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d6 0000000000000000 d7 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d8 400d9aa353e247de d9 401c3fb69984a0e5

04-15 11:06:53.869 I / DEBUG (1274): d10 412e848000000000 d11 408f400000000000

04-15 11:06:53.869 I / DEBUG (1274): d12 3feccccccccccccd d13 4059000000000000

04-15 11:06:53.869 I / DEBUG (1274): d14 3fb9999999999998 d15 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d16 0000000000000000 d17 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d18 0000000000000000 d19 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d20 0000000000000000 d21 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d22 0000000000000000 d23 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d24 0000000000000000 d25 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d26 0000000000000000 d27 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d28 0000000000000000 d29 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d30 ffffffffffffffff d31 ffffffffffffffff

04-15 11:06:53.869 I / DEBUG (1274): scr 60000012


There should have hung up the stack, then the stack is the last place to hang, there must be a symbol library with addr2line file, that is, not the libs directory obj directory
Reply:
reference to the third floor luowenlong860502 reply:
LOG did not see ah generally hang stack information like this
 
04-15 11:06:53.859 F / libc (2398): Fatal signal 11 (SIGSEGV) at 0x00000000 (code = 1)

04-15 11:06:53.869 I / DEBUG (1274): *********************************** *************

04-15 11:06:53.869 I / DEBUG (1274): Build fingerprint: 'Xiaomi / mione_plus / mione_plus: 4.0.4/IMM76D/ICS24.0: user / release-keys'

04-15 11:06:53.869 I / DEBUG (1274): pid: 2398, tid: 2555 >>> org.linphone <<<< br />
04-15 11:06:53.869 I / DEBUG (1274): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000

04-15 11:06:53.869 I / DEBUG (1274): r0 00fad7d0 r1 00000000 r2 000000a0 r3 00000050

04-15 11:06:53.869 I / DEBUG (1274): r4 00fbf180 r5 00000000 r6 5cfd59a0 r7 00000000

04-15 11:06:53.869 I / DEBUG (1274): r8 5cfd5820 r9 5cfd5814 10 5cfd58a0 fp 5cfd5818

04-15 11:06:53.869 I / DEBUG (1274): ip 00000001 sp 5cfd5804 lr 5c8546e4 pc 40050cc8 cpsr 80000010

04-15 11:06:53.869 I / DEBUG (1274): d0 0000000000000000 d1 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d2 0000000000000000 d3 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d4 0000000000000000 d5 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d6 0000000000000000 d7 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d8 400d9aa353e247de d9 401c3fb69984a0e5

04-15 11:06:53.869 I / DEBUG (1274): d10 412e848000000000 d11 408f400000000000

04-15 11:06:53.869 I / DEBUG (1274): d12 3feccccccccccccd d13 4059000000000000

04-15 11:06:53.869 I / DEBUG (1274): d14 3fb9999999999998 d15 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d16 0000000000000000 d17 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d18 0000000000000000 d19 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d20 0000000000000000 d21 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d22 0000000000000000 d23 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d24 0000000000000000 d25 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d26 0000000000000000 d27 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d28 0000000000000000 d29 0000000000000000

04-15 11:06:53.869 I / DEBUG (1274): d30 ffffffffffffffff d31 ffffffffffffffff

04-15 11:06:53.869 I / DEBUG (1274): scr 60000012


There should have hung up the stack, then the stack is the last place to hang, there must be a symbol library with addr2line file, which is the obj directory, rather than libs directory

No ah, I just saw Fatal signal 11 (SIGSEGV) at XXXXX, cut like you do not see something like that, oh
FigureThis is my Eclipse prompts to print the information, and why I do not like you cut diagram inside Debug information


Reply:
reference to the third floor luowenlong860502 reply:
LOG did not see ah generally hang stack information like this

There should have hung up the stack, then the stack is the last place to hang, there must be a symbol library with addr2line file, which is the obj directory, rather than libs directory


Searching for a moment, you can use Android ndk-stack tool
To see the cause of this error, but the error did not see me when Eclipse prompts
those beginning with *
I am using the real machine testing, jni file in the project directory folder Application.mk add APP_OPTIM: = debug, my C files are compiled with the NDK-BUILD
Reply:
reference to the third floor luowenlong860502 reply:
LOG did not see ah generally hang stack information like this

There should have hung up the stack, then the stack is the last place to hang, there must be a symbol library with addr2line file, which is the obj directory, rather than libs directory


The strange thing is this line after printing the error message, it should be my C program out of the question, collapsed, as well as information on how to print the next line, those red font, all the C code to print the information, and normally crash the case, they should not have those red following information, why still running ah
Reply:
The reply was deleted administrator at 2014-04-18 11:42:33

Reply:
reference to the third floor luowenlong860502 reply:
LOG did not see ah generally hang stack information like this

There should have hung up the stack, then the stack is the last place to hang, there must be a symbol library with addr2line file, which is the obj directory, rather than libs directory

I used the most stupid way to come is a problem which line of code, so add a lot of printed information in Fatal signal 11 appears, is attached to the front and rear print information, such
if (play-> m_vo_ctx)
{
LOGE ("before free_video_render1 exist!!");
free_video_render (play-> m_vo_ctx);
LOGE ("after free_video_render1 exist!!");
play-> m_vo_ctx = NULL;
}

if (bFreeThread)
{
bFreeThread = FALSE;
JavaVM * av2_vm = av_get_jvm ();
(* Av2_vm) -> DetachCurrentThread (av2_vm);
LOGE ("DetachCurrentThread 3 exit!!");
}


LOGE ("video_render_thrd exist!!");

When printed after free_video_render1 exist!! After Baocuo, but behind DetachCurrentThread 3 exit!! Contact video_render_thrd exist!! Still continue to print, as shown above, the test many times, at this time there may be errors printed between av_stop 3 with av_stop 4, or between other print information, but does not print information between these two is nothing wrong, so do not know how to determine in the end is where the code out of the question
Reply:
reference to the third floor luowenlong860502 reply:
LOG did not see ah generally hang stack information like this

There should have hung up the stack, then the stack is the last place to hang, there must be a symbol library with addr2line file, which is the obj directory, rather than libs directory

Seniors say LOG, is still in Eclipse LogCat?
Reply:
reference to the 9th floor lanjian1111 reply:
Quote: references to the third floor luowenlong860502 reply:

LOG did not see ah generally hang stack information like this

There should have hung up the stack, then the stack is the last place to hang, there must be a symbol library with addr2line file, which is the obj directory, rather than libs directory

Seniors say LOG, is still in Eclipse LogCat?

Eclipse of the log to choose All messages, can not use the filter, or else see it. Preferably directly with adb logcat task, so compare the whole
Reply:
reference to the 10th floor luowenlong860502 reply:
Quote: references to the 9th floor lanjian1111 reply:

Quote: references to the third floor luowenlong860502 reply:

LOG did not see ah generally hang stack information like this

There should have hung up the stack, then the stack is the last place to hang, there must be a symbol library with addr2line file, which is the obj directory, rather than libs directory

Seniors say LOG, is still in Eclipse LogCat?

Eclipse of the log to choose All messages, can not use the filter, or else see it. Preferably directly with adb logcat task, so compare all

Seniors say adb logcat means what? I can try
Reply:
reference to the 11th floor lanjian1111 reply:
seniors say adb logcat refers to what? I can try

window-> show views-> logcat
Reply:
reference to the 10th floor luowenlong860502 reply:
Quote: references to the 9th floor lanjian1111 reply:

Quote: references to the third floor luowenlong860502 reply:

LOG did not see ah generally hang stack information like this

There should have hung up the stack, then the stack is the last place to hang, there must be a symbol library with addr2line file, which is the obj directory, rather than libs directory

Seniors say LOG, is still in Eclipse LogCat?

Eclipse of the log to choose All messages, can not use the filter, or else see it. Preferably directly with adb logcat task, so compare all

adb logcat it is set in Eclipse
Reply:

Select All messages can really see this, my dynamic library file is libavplayer.so, the picture is not selected is reported that an error function, the project does have update_textures_with_yuv this function
Reply:
reference to the 12th floor hjywyj reply:
Quote: references to the 11th floor lanjian1111 reply:

Seniors say adb logcat means what? I can try

window-> show views-> logcat

That is the LogCat in Eclipse
Reply:
Learn! ! ! ! ! ! ! ! ! !
Reply:
reference to the 14th floor lanjian1111 reply:

Select All messages can really see this, my dynamic library file is libavplayer.so, the picture is not selected is reported that an error function, the project does have update_textures_with_yuv this function

Obviously, a place to hang in libavplayer.so positioning 00,140,160 to know which line problems
Reply:
I've put these errors into a TXT file export

reference to the 10th floor luowenlong860502 reply:
Quote: references to the 9th floor lanjian1111 reply:

Quote: references to the third floor luowenlong860502 reply:

LOG did not see ah generally hang stack information like this

There should have hung up the stack, then the stack is the last place to hang, there must be a symbol library with addr2line file, which is the obj directory, rather than libs directory

Seniors say LOG, is still in Eclipse LogCat?

Eclipse of the log to choose All messages, can not use the filter, or else see it. Preferably directly with adb logcat task, so compare all

I have it exported these errors become a TXT file, and then perform in accordance with this method
$ NDK / ndk-stack-sym $ PROJECT_PATH / obj / local / armeabi-dump log.txt

log.txt file is exported wrong, I placed it in this document NDK directory, and then perform in NDK in
ndk-stack-sym E :/ myEclipseWorkPlace/Android_855play/obj/local/armeabi-dump log.txt

To analyze the results had nothing to do with the program

Reply:
cited 17 floor luowenlong860502 reply:
Quote: references to the 14th floor lanjian1111 reply:


Select All messages can really see this, my dynamic library file is libavplayer.so, the picture is not selected is reported that an error function, the project does have update_textures_with_yuv this function

Obviously, a place to hang in libavplayer.so positioning 00,140,160 to know which line problems

How to locate

cited 17 floor luowenlong860502 reply:
Quote: references to the 14th floor lanjian1111 reply:


Select All messages can really see this, my dynamic library file is libavplayer.so, the picture is not selected is reported that an error function, the project does have update_textures_with_yuv this function

Obviously, a place to hang in libavplayer.so positioning 00,140,160 to know which line problems

Thanks for pointing predecessors, can really use this command
addr2line-e E :/ myEclipseWorkPlace/Android_855play/obj/local/armeabi/libavplayer.so 00140160

But I do not know why, I used Android ndk-stack, can not locate

No comments:

Post a Comment