1 Reply
      Latest reply on Aug 10, 2018 1:46 AM by eskimo
      loveaeris Level 1 Level 1 (0 points)

            My App has a lot of crashe about CFNetwork. It now is the second most crash in my App. I have use Address Sanitizer and Zombile Objects to debug it, but useless。I also try to find the problem by Instrument leaks, but also useless. Is it a system bug? I need help.

         

        Date/Time:           2018-07-23 02:23:56.1927 +0800
        Launch Time:         2018-07-23 02:23:26.4595 +0800
        OS Version:          iPhone OS 11.2.6 (15D100)
        Baseband Version:    4.30.02
        Report Version:      104
        
        Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
        Exception Subtype: KERN_INVALID_ADDRESS at 0x52574c4b00000020
        VM Region Info: 0x52574c4b00000020 is not in any region.  Bytes after previous region: 5933294911037112353  
              REGION TYPE                      START - END             [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
              MALLOC_NANO (reserved) 00000001d8000000-00000001e0000000 [128.0M] rw-/rwx SM=NUL  ...(unallocated)
        --->  
              UNUSED SPACE AT END
        
        
        Termination Signal: Segmentation fault: 11
        Termination Reason: Namespace SIGNAL, Code 0xb
        Terminating Process: exc handler [0]
        Triggered by Thread:  8
        
        Thread 8 name:
        Thread 8 Crashed:
        0   libobjc.A.dylib               0x0000000180ef443c objc_msgSend + 28
        1   CFNetwork                     0x00000001823fd22c _merge_array_string(void const*, void const*, void*) + 44 (HTTPHeaderDict.cpp:165)
        2   CoreFoundation                 0x0000000181b74938 __CFDictionaryApplyFunction_block_invoke + 24 (CFDictionary.c:505)
        3   CoreFoundation                 0x0000000181b5be98 CFBasicHashApply + 132 (CFBasicHash.c:988)
        4   CoreFoundation                 0x0000000181b659ec CFDictionaryApplyFunction + 288 (CFDictionary.c:503)
        5   CFNetwork                     0x00000001823fce58 HTTPHeaderDict::copyAsOrdinaryDict(__CFAllocator const*) const + 80 (HTTPHeaderDict.cpp:183)
        6   CFNetwork                     0x00000001822e09b4 HTTPMessage::copyHeadersWithShadowedArrayValues() + 36 (HTTPMessage.cpp:568)
        7   CFNetwork                     0x00000001822cad78 URLResponse::createArchiveList(__CFAllocator const*, long*, void const***, long*) + 216 (URLResponse.cpp:655)
        8   CFNetwork                     0x00000001822cb27c URLResponse::copyPropertyList(__CFAllocator const*) + 64 (URLResponse.cpp:783)
        9   CFNetwork                     0x0000000182289834 invocation function for block in __CFURLCache::CreateAndStoreCacheNode(__CFURLCacheNode*, _CFCachedURLResponse const*, __CFString const*, _CFURLRequest const*, void const*, bool, bool&) + 756 (URLResponse.h:242)
        10  libdispatch.dylib             0x0000000181616a54 _dispatch_call_block_and_release + 24 (init.c:994)
        11  libdispatch.dylib             0x0000000181616a14 _dispatch_client_callout + 16 (object.m:502)
        12  libdispatch.dylib             0x000000018162096c _dispatch_queue_serial_drain$VARIANT$mp + 528 (inline_internal.h:2500)
        13  libdispatch.dylib             0x00000001816212fc _dispatch_queue_invoke$VARIANT$mp + 340 (queue.c:5302)
        14  libdispatch.dylib             0x0000000181621d20 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 404 (queue.c:5920)
        15  libdispatch.dylib             0x000000018162a03c _dispatch_workloop_worker_thread$VARIANT$mp + 644 (source.c:2529)
        16  libsystem_pthread.dylib       0x00000001818bef1c _pthread_wqthread + 932 (pthread.c:2207)
        17  libsystem_pthread.dylib       0x00000001818beb6c start_wqthread + 4
        
        
        Thread 8 crashed with ARM Thread State (64-bit):
            x0: 0x00000001c0200420   x1: 0x0000000182807a06   x2: 0x00000001c0670d80   x3: 0x00000001c42284a0
            x4: 0x0000000000000001   x5: 0x0000000000000000   x6: 0x0000000000000065   x7: 0x000000000000000c
            x8: 0x00000001b161a000   x9: 0x00000001b2e900b0  x10: 0x52574c4b00000020  x11: 0x0000000000000000
           x12: 0x52574c4b00000020  x13: 0x000001a1b2e900b1  x14: 0x00000001c001b49d  x15: 0x00000001c001b49d
           x16: 0x00000001b2e900b0  x17: 0x0000000181c3024c  x18: 0xfffffff00869925c  x19: 0x00000001c0670d80
           x20: 0x00000001b1640058  x21: 0x00000001c0200420  x22: 0x0000000000000001  x23: 0x0000000000000007
           x24: 0x000000016d1de6a8  x25: 0x00000001c40351a0  x26: 0x0000000000000000  x27: 0x0000000000000000
           x28: 0x00000001c02e2580   fp: 0x000000016d1de4b0   lr: 0x00000001823fd22c
            sp: 0x000000016d1de490   pc: 0x0000000180ef443c cpsr: 0x200

        Looking forward to your suggestions。

        • Re: Crash CFNetwork:_merge_array_string
          eskimo Apple Staff Apple Staff (9,405 points)

          My App has a lot of crashe about CFNetwork.

          Please post the full crash report (as opposed to the excerpt that you’ve posted here).

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"