ios - Segfault from NSLog? -
i'm seeing segfault using nslog , specifically, on 64 bit device, segv_accerr
. i'm new ios, i'm little confused.
here's stack trace:
exception type: sigsegv exception codes: segv_accerr @ 0x108074000 crashed thread: 0 thread 0 crashed: 0 libsystem_platform.dylib 0x00000001826ea31c _platform_memmove + 300 1 libsystem_asl.dylib 0x00000001825289a4 asl_string_append_no_encoding_len + 92 2 libsystem_asl.dylib 0x0000000182522fc8 asl_string_new + 108 3 libsystem_asl.dylib 0x0000000182522df4 asl_msg_to_string_raw + 68 4 libsystem_asl.dylib 0x00000001825228dc _asl_send_message + 828 5 libsystem_asl.dylib 0x00000001825224fc asl_send + 8 6 corefoundation 0x0000000182a6fa1c __cflogcstring + 568 7 corefoundation 0x0000000182a6f7ac _cflogvex2 + 300 8 corefoundation 0x0000000182a6fc14 _cflogvex3 + 152 9 foundation 0x0000000183435dd8 _nslogv + 128 10 foundation 0x000000018336ae04 nslog + 28
here code calls this:
nsstring *truncated = [nsstring stringwithutf8string:buffer]; // using original nslog print. #undef nslog nslog(@"%@", truncated);
and crashes nslog
call.
where buffer
char buffer.
my questions are:
- is possible crash using apple's provided
nslog
? or stack trace wrong? - what
seg_accerr
mean in context? - how go finding if caused bad memory issue or not?
- is blowing asl file under multiple threads?
- how should approach debugging this?
any appreciated! thanks!
you buffer char buffer. if case, should initialize string this
nsstring *truncated = [[nsstring alloc] initwithbytes:buffer length:len nsutf8stringencoding];
where len length of characters in buffer.
Comments
Post a Comment