Skip to content

Several different problems during TC initialization produce app crashes #20

@Kerstin2020

Description

@Kerstin2020

We face several different serious problem caused by TC and let our app crash.
These crashes seams to happen during initialization of TagCommander instance during the first 3 seconds during the startup of the app.

The crashes happen sporadically in various SDK/Core version (including latest)

  1. TCHTTPOperation.m line 61 (90x during the last 7 days)
  2. TCDynamicStore.m line 52 (38x during the last 7 days)
  3. TCDynamicStore.m line 37 (16x during the last 7 days)
  4. TCDynamicStore.m line 49 (5x during the last 7 days)
  5. TCDynamicStore.m line 47 (5x during the last 7 days)
  6. TCDynamicStore.m line 58 (3x during the last 7 days)

One finding is, that you have a problem with concurrency problem accessing values.

Here are some details I know about the stack traces. A bit difficult because TC is acting in different thread

  1. Fatal Exception: NSInvalidArgumentException
    [__NSCFNumber hasPrefix:]: unrecognized selector sent to instance 0x99fb4c6b00c2ef4c
CoreFoundation  __exceptionPreprocess
libobjc.A.dylib objc_exception_throw
CoreFoundation  +[NSObject(NSObject) _copyDescription]
CoreFoundation  ___forwarding___
CoreFoundation  _CF_forwarding_prep_0
TCCore  TCHTTPOperation.m - Line 61 -[TCHTTPOperation main] + 61

Calling stack by us (myApp):

TCCore  TCCoreVariables.m - Line 185    -[TCCoreVariables userAgent] + 185
TCCore  TCCoreVariables.m - Line 36     -[TCCoreVariables init] + 36
TCCore  TCCoreVariables.m - Line 19     __33+[TCCoreVariables sharedInstance]_block_invoke + 19
libdispatch.dylib                       _dispatch_client_callout + 20
libdispatch.dylib                       _dispatch_once_callout + 32
TCCore  once.h - Line 84                +[TCCoreVariables sharedInstance] + 84
TCCore  TCCoreInitialisation.m - Line 23-[TCCoreInitialisation init] + 23
TCSDK   TCSDKInitialisation.m - Line 26 -[TCSDKInitialisation init] + 26
TCSDK   TagCommander.m - Line 169       -[TagCommander initWithSiteID:containerID:notificationCenter:andDefaultBehaviour:] + 169
TCSDK   TagCommander.m - Line 144       -[TagCommander initWithSiteID:andContainerID:] + 144
myApp   TrackingService.swift - Line 138 specialized TrackingService.tagCommanderInstance.getter + 138
  1. EXC_BAD_ACCESS KERN_INVALID_ADDRESS (Heap Damage?)
libobjc.A.dylib   objc_msgSend + 8
CoreFoundation    mdict_rehashd + 180
CoreFoundation                          -[__NSDictionaryM setObject:forKeyedSubscript:] + 836
TCCore  TCDynamicStore.m - Line 52      -[TCDynamicStore addData:withValue:] + 52
TCSDK   TCPredefinedVariables.m - Line 1585 -[TCPredefinedVariables addData:withValue:] + 1585
TCSDK   TCPredefinedVariables.m - Line 201  -[TCPredefinedVariables setVisitorIDCurrentCallUniqueID] + 201
TCSDK   TCPredefinedVariables.m - Line 107  -[TCPredefinedVariables predefinedVariableInitialisation] + 107
TCSDK   TCPredefinedVariables.m - Line 58   -[TCPredefinedVariables init] + 58
TCSDK   TCPredefinedVariables.m - Line 26   __39+[TCPredefinedVariables sharedInstance]_block_invoke + 26
libdispatch.dylib  _dispatch_client_callout + 16
libdispatch.dylib   _dispatch_once_callout + 28
TCSDK   once.h - Line 84                +[TCPredefinedVariables sharedInstance] + 84
TCSDK   TCSDKInitialisation.m - Line 28 -[TCSDKInitialisation init] + 28
TCSDK   TagCommander.m - Line 169       -[TagCommander initWithSiteID:containerID:notificationCenter:andDefaultBehaviour:] + 169
TCSDK   TagCommander.m - Line 144       -[TagCommander initWithSiteID:andContainerID:] + 144
myApp   TrackingService.swift - Line 138    specialized TrackingService.tagCommanderInstance.getter + 138

ATTENTION: another TC thread was sending data synchronous in parallel

TCCore  TCHTTPOperation.m - Line 182    -[TCHTTPOperation sendSynchronousRequest:withResponse:withError:] + 182
TCCore  TCHTTPOperation.m - Line 80     -[TCHTTPOperation main] + 80

3)Fatal Exception: NSGenericException
*** Collection <__NSArrayM: 0x282d759b0> was mutated while being enumerated.

CoreFoundation __exceptionPreprocess
CoreFoundation  -[__NSSingleObjectEnumerator init]
TCCore  TCDynamicStore.m - Line 37         -[TCDynamicStore addData:] + 37
TCSDK   TCPredefinedVariables.m - Line 1579 -[TCPredefinedVariables addData:] + 1579
TCSDK   TCSDKInitialisation.m - Line 29     -[TCSDKInitialisation init] + 29
TCSDK   TagCommander.m - Line 169           -[TagCommander initWithSiteID:containerID:notificationCenter:andDefaultBehaviour:] + 169
TCSDK   TagCommander.m - Line 144           -[TagCommander initWithSiteID:andContainerID:] + 144
myApp   TrackingService.swift - Line 138    specialized TrackingService.tagCommanderInstance.getter + 138

ATTENTION: another TC thread was sending data synchronous in parallel

TCCore  TCHTTPOperation.m - Line 182    -[TCHTTPOperation sendSynchronousRequest:withResponse:withError:] + 182
TCCore  TCHTTPOperation.m - Line 80     -[TCHTTPOperation main] + 80
  1. SIGBART ABORT (Heap Damage?)
libsystem_kernel.dylib  __pthread_kill + 8
libsystem_pthread.dylib pthread_kill + 208
libsystem_c.dylib       abort + 124
libsystem_malloc.dylib  _malloc_put + 546
libsystem_malloc.dylib  malloc_report + 60
libsystem_malloc.dylib  free + 284
CoreFoundation  -[__NSArrayM insertObject:atIndex:] + 348
TCCore  TCDynamicStore.m - Line 49      -[TCDynamicStore addData:withValue:] + 49
TCSDK   TCPredefinedVariables.m - Line 400  -[TCPredefinedVariables setModelAndVersion] + 400
TCSDK   TCPredefinedVariables.m - Line 121  -[TCPredefinedVariables predefinedVariableInitialisation] + 121
TCSDK   TCPredefinedVariables.m - Line 58   -[TCPredefinedVariables init] + 58
TCSDK   TCPredefinedVariables.m - Line 26   __39+[TCPredefinedVariables sharedInstance]_block_invoke + 26
libdispatch.dylib   _dispatch_client_callout + 16
libdispatch.dylib   _dispatch_once_callout + 28
TCSDK   once.h - Line 84                    +[TCPredefinedVariables sharedInstance] + 84
TCSDK   TCSDKInitialisation.m - Line 28     -[TCSDKInitialisation init] + 28
TCSDK   TagCommander.m - Line 169           -[TagCommander initWithSiteID:containerID:notificationCenter:andDefaultBehaviour:] + 169
TCSDK   TagCommander.m - Line 144           -[TagCommander initWithSiteID:andContainerID:] + 144
myApp   TrackingService.swift - Line 138    specialized TrackingService.tagCommanderInstance.getter + 138
  1. EXC_BAD_ACCESS KERN_INVALID_ADDRESS
libobjc.A.dylib objc_msgSend + 8
CoreFoundation  -[__NSDictionaryM objectForKeyedSubscript:] + 180
TCCore  TCDynamicStore.m - Line 47          -[TCDynamicStore addData:withValue:] + 47
TCSDK   TCPredefinedVariables.m - Line 1585 -[TCPredefinedVariables addData:withValue:] + 1585
TCSDK   TCPredefinedVariables.m - Line 1116 -[TCPredefinedVariables initLastCallLastVisit] + 1116
TCSDK   TCPredefinedVariables.m - Line 105  -[TCPredefinedVariables predefinedVariableInitialisation] + 105
TCSDK   TCPredefinedVariables.m - Line 58   -[TCPredefinedVariables init] + 58
TCSDK   TCPredefinedVariables.m - Line 26   __39+[TCPredefinedVariables sharedInstance]_block_invoke + 26
libdispatch.dylib   _dispatch_client_callout + 16
libdispatch.dylib   _dispatch_once_callout + 28
TCSDK   once.h - Line 84                    +[TCPredefinedVariables sharedInstance] + 84
TCSDK   TCSDKInitialisation.m - Line 28     -[TCSDKInitialisation init] + 28
TCSDK   TagCommander.m - Line 169           -[TagCommander initWithSiteID:containerID:notificationCenter:andDefaultBehaviour:] + 169
TCSDK   TagCommander.m - Line 144           -[TagCommander initWithSiteID:andContainerID:] + 144
myApp   TrackingService.swift - Line 138    specialized TrackingService.tagCommanderInstance.getter + 138

ATTENTION: another TC thread was sending data synchronous in parallel

TCCore  TCHTTPOperation.m - Line 182    -[TCHTTPOperation sendSynchronousRequest:withResponse:withError:] + 182
TCCore  TCHTTPOperation.m - Line 80     -[TCHTTPOperation main] + 80
  1. EXC_BAD_ACCESS KERN_INVALID_ADDRESS
libobjc.A.dylib objc_msgSend + 8
CoreFoundation  -[__NSDictionaryM objectForKeyedSubscript:] + 180
TCCore  TCDynamicStore.m - Line 58          -[TCDynamicStore getData:] + 58
TCCore  TCDynamicStore.m - Line 39          -[TCDynamicStore addData:] + 39
TCSDK   TCPredefinedVariables.m - Line 1579 -[TCPredefinedVariables addData:] + 1579
TCSDK   TCSDKInitialisation.m - Line 29     -[TCSDKInitialisation init] + 29
TCSDK   TagCommander.m - Line 169           -[TagCommander initWithSiteID:containerID:notificationCenter:andDefaultBehaviour:] + 169
TCSDK   TagCommander.m - Line 144           -[TagCommander initWithSiteID:andContainerID:] + 144
myApp   TrackingService.swift - Line 138    specialized TrackingService.tagCommanderInstance.getter + 138

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions