Saturday, 22 September 2018

SIGSEGV CRASH while setting value in NSDIctionary

Fabric Log:

    Crashed: com.apple.main-thread
    SIGSEGV 0x000000210000003f
 CFDictionaryGetValue + 24
1  Foundation                     0x19e5ba4ac <redacted> + 272
2  MYAPP                            0x10116a594 -[MYAPPGGGUser setValuesForKeysWithDictionary:] (MYAPPGGGUser.m:444)
3  MYAPP                            0x10109ebc4 -[MYAPPUser setValuesForKeysWithDictionary:] (MYAPPUser.m:79)
4  MYAPP                            0x101169c40 -[MYAPPGGGUser resetOptionalFieldsAndSetFullStateValuesForKeysWithDictionary:] (MYAPPGGGUser:338)
5  MYAPP                            0x10109eb4c -[MYAPPUser resetOptionalFieldsAndSetFullStateValuesForKeysWithDictionary:] (MYAPPUser.m:70)
6  MYAPP                            0x100fa1708 -[MYAPPLiveMap addElements:resetElementValues:] (MYAPPLiveMap.m:230)
7  MYAPP                            0x100fa20f0 -[MYAPPLiveMap handleJSONMessage:messageType:listId:] (MYAPPLiveMap.m:309)
8  MYAPP                            0x100f78760 -[MYAPPConnection lockAndHandleMessage:consumer:dataType:listID:] (MYAPPConnection.m:554)
9  MYAPP                            0x100f78628 __67-[MYAPPConnection dispatchAndHandleMessage:consumer:dataType:listID:]_block_invoke (MYAPPConnection.m:545)
10 libdispatch.dylib              0x19d64b6c8 _dispatch_call_block_and_release + 24
11 libdispatch.dylib              0x19d64c484 _dispatch_client_callout + 16
12 libdispatch.dylib              0x19d5f89ec _dispatch_main_queue_callback_4CF$VARIANT$mp + 1068
13 CoreFoundation                 0x19dba21bc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
14 CoreFoundation                 0x19db9d084 __CFRunLoopRun + 1964
15 CoreFoundation                 0x19db9c5b8 CFRunLoopRunSpecific + 436
16 GraphicsServices               0x19fe0d584 GSEventRunModal + 100
17 UIKitCore                      0x1ca1947ac UIApplicationMain + 212
18 MYAPP                            0x100eeeb6c main (main.m:19)
19 libdyld.dylib                  0x19d65cc0c start + 4

Codes:

    propValue = newValues[@“AAA”];
    if (propValue && propValue != self.isAAA) {
      [self setValue:propValue forKey:@"isAAA”];
    }

    propValue = newValues[@“BBB”];
    if (propValue && propValue != self.isBBB) {
      [self setValue:propValue forKey:@"isBBB”];
    }

//LIne 444
    propValue = newValues[@“CCC”];
    if (propValue && (self.CCC== nil || [[NSNumber numberWithUnsignedLongLong: strtoull([propValue UTF8String], nil, 10)] isEqualToNumber:self.CCC] == NO)) {
      self.CCC= [NSNumber numberWithUnsignedLongLong: strtoull([propValue UTF8String], nil, 10)];
    }

    propValue = newValues[@“DDD”];
    NSAssert(propValue == nil || propValue == [NSNull null] || [propValue isKindOfClass:[NSString class]], @"propValue is of wrong type");
    if (propValue && ![propValue isEqualToString:self.DDD]) {
      self.DDD = propValue;
    }

Input Data when the crash took place. Note key DDD (line 444) is missing in input Data.

{ A1 = 1143749791; A2 = Available; A3 = "Yudi Hartanto \U5ed6 \U53ef \U767c"; A4 = DEFRSVX; A5 = 0; A6 = 1; AAA = 0; BBB = 0; A7 = 192; A8 = ""; A9 = 1522125793; pins = ( 55a86fc1 ); A10 = 100011430136; A11 = 0; A12 = 0; A13 = Default; A14 = "pim://user/id/1"; A15 = equator; }

To me, this crash doesn't seem to be due to missing key or unexpected object key as its SIGSEGV also each statement is guarded. Googled to map this to any other symmetrical issue but no luck. What can be the possible reasons for this crash?



from SIGSEGV CRASH while setting value in NSDIctionary

No comments:

Post a Comment