Search code examples
iosobjective-cgoogle-fabric

Fabric have a BUG on iOS


I use the method to upload my custom backtrace

[[Crashlytics sharedInstance] recordCustomExceptionName:@"test" reason:@"error" frameArray:myArray];

in "myArray" have two address 0x10005f35b and 0x10005f1b7

on my macbook, i use "dwarfdump" to parse 0x10005f35b and 0x10005f1b7 can get correct symbol.

but i upload 0x10005f35b and 0x10005f1b7 to fabric, fabric cannot symbol 0x10005f35b

fabric result :

0x10005f35b (Missing) 
0x10005f1b7 -[ViewController fabricStackTest:]

why fabric cannot parse address 0x10005f35b??

the same IPA file and same DSym file,i did upload DSym file to fabric


Solution

  • I solved this problem, it's my app bug, thank you

    When you see "(Missing)" on Crashlytics UI, You can first check the memory offset is the same as fabric?

    memory_offset = _dyld_get_image_vmaddr_slide(i)

    _dyld_get_image_vmaddr_slide() returns the virtural memory address slide amount of the image indexed by image_index. If image_index is out of range zero is returned.

    memory_offset is different in every app launch.

    memory_address - memory_offset = file_address

    file_address and .dSYM can corrent symbolicate a address.

    my bug is i save memory_address to the file and next app launch, i pass to fabric SDK, next app launch the memory_offset is different, so fabric cannot symbolicate the address.


    My Solution: I save file_address to the file, and next app launch, i do addition, file_address + memory_offset = now_address, i pass now_address to SDK, can corrent symbolication