Bus error: 10 when using NSLog with DoraemonKit

I am using DoraemonKit for debugging purposes. My NSLOG calls catching by DoraemonKit. I am getting crash reports from some of my users and I couldn't figure it out.

Crash log:

0   libsystem_platform.dylib      	0x00000001e1622e2c _platform_memset + 140
1   libsystem_malloc.dylib        	0x00000001a75a34cc small_malloc_should_clear + 1352 (magazine_small.c:0)
2   libsystem_malloc.dylib        	0x00000001a759fd38 szone_malloc_should_clear + 136 (magazine_malloc.c:238)
3   libsystem_malloc.dylib        	0x00000001a75ae618 _malloc_zone_calloc + 88 (malloc.c:1546)
4   Foundation                    	0x000000019946abf8 -[_NSJSONReader parseData:options:] + 544 (NSJSONSerialization.m:2279)
5   Foundation                    	0x000000019946a900 +[NSJSONSerialization JSONObjectWithData:options:error:] + 76 (NSJSONSerialization.m:2459)
6   DoraemonKit                   	0x000000010ba7ffa4 -[NSDictionary(DoraemonUnicodeReadable) descriptionWithLocale:indent:] + 1024
7   Foundation                    	0x0000000199564640 _NS_os_log_callback + 288 (NSPlatform.m:187)
8   libsystem_trace.dylib         	0x00000001ae4cf15c _os_log_fmt_flatten_NSCF + 64 (format.m:54)
9   libsystem_trace.dylib         	0x00000001ae4ce908 _os_log_fmt_flatten_object + 216 (format.m:316)
10  libsystem_trace.dylib         	0x00000001ae4db940 _os_log_impl_flatten_and_send + 1736 (format.c:799)
11  libsystem_trace.dylib         	0x00000001ae4de524 _os_log_with_args_impl + 388 (log.c:2604)
12  CoreFoundation                	0x00000001981f39ec _CFLogvEx3 + 188 (CFUtilities.c:1224)
13  Foundation                    	0x0000000199566b84 _NSLogv + 108 (NSPlatform.m:0)
14  Foundation                    	0x0000000199566be0 NSLog + 56 (NSPlatform.m:1321)
15  MyApp                    	0x0000000106a3b914 -[Manager handleReceivedData:] + 72 (Manager.m:119)
16  CoreFoundation                	0x000000019816d9a0 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:706)

My Code:

- (void)handleReceivedData:(NSNotification *)notify {
    NSDictionary *receivedDic = [notify userInfo];
    
    NSLog(@"receivedDicbt: %@",receivedDic);

It is pretty basic, actually. I am catching an NSNotification and printing to NSLOG. Then DoraemonKit catches it, as you can see in the stack trace.

I've inspected the DoraemonKit and found the Frame 6's file; it is here:

https://github.com/didi/DoKit/blob/bf05430692e7b549f4b89d2abec877cd79dafaf4/iOS/DoraemonKit/Src/Core/Category/Foundation%2BDoraemon.m#L45

Exception Type:

Exception Type:  EXC_CRASH (SIGBUS)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Signal: Bus error: 10
Termination Reason: Namespace SIGNAL, Code 0xa

What can cause to this problem and how to resolve it?

What can cause to this problem and how to resolve it?

Please post a full crash report, using the process described in Posting a Crash Report.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Bus error: 10 when using NSLog with DoraemonKit
 
 
Q