0

I came across a crashlog of my application today in the HockeyApp console where I see a method name in the hierarchy which is not invoked anywhere (really anywhere) across the application but is just defined. This method name in the hierarchy seemed to be prefixed with the term 'merged'. What does this mean? What is the possibility of having such method in the log hierarchy?

The log is as below:

Exception Type:  SIGABRT
Exception Codes: #0 at 0x1ad01acc
Crashed Thread:  12

Application Specific Information:
*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSCFSet: 0x15665e00> was mutated while being enumerated.'

Last Exception Backtrace:

0   CoreFoundation                       0x1b533b3d __exceptionPreprocess + 129
1   libobjc.A.dylib                      0x1a7bb067 objc_exception_throw + 36
2   CoreFoundation                       0x1b5335e1 __NSFastEnumerationMutationHandler + 122
3   CoreData                             0x1d4ad57f -[NSManagedObjectContext executeFetchRequest:error:] + 2564
4   <app_name>                           0x01033d40 appName.ClassName.fetchAllWithRequest(_: __C.NSFetchRequest<__C.NSFetchRequestResult>, managedObjectContext: __C.NSManagedObjectContext) -> (managedObjects: [__C.NSManagedObject]?, error: Error?) (ClassName.swift:533)
5   <app_name>                           0x01160bb0 merged appName.ClassName.fetchOtherTeamsReference(_: User, managedObjectContext: __C.NSManagedObjectContext) -> (managedObjects: [__C.NSManagedObject]?, error: Error?) + 666 
6   <app_name>                           0x0116090c appName.ClassName.fetchTeamsReference(_: User, managedObjectContext: __C.NSManagedObjectContext) -> (managedObjects: [__C.NSManagedObject]?, error: Error?) + 42
7   <app_name>                           0x005773c0 appName.ClassName.start() -> () (DownloadTeamsOperation.swift:50)
8   <app_name>                           0x00578040 @objc appName.ClassName.start() -> () (DownloadTeamsOperation.swift:0) 
9   Foundation                           0x1be5bd39 __NSOQSchedule_f + 188
10  libdispatch.dylib                    0x1ac0e59d _dispatch_queue_serial_drain + 852
11  libdispatch.dylib                    0x1ac04b71 _dispatch_queue_invoke + 884

The line 5 in the above trace contains the method name (`fetchOtherTeamsReference) which is not actually invoked anywhere in the entire application code.

XiOS
  • 1,665
  • 2
  • 18
  • 22

1 Answers1

0

It shows that you are updating any collection while enumerating it. Like you are iterating an array and inside the same loop you are making changes to it.

You can get more help from this link:

Collection <__NSArrayM: 0x7fa1f2711910> was mutated while being enumerated

Mahak Mittal
  • 121
  • 1
  • 10
  • Hi thanks for your response, but my question was all about the line 5 in the above log segment where I see a method name which was not invoked anywhere in the code.. Could you please pour in any suggestion if you came across any such instance. – XiOS Sep 17 '18 at 08:23
  • Could you please provide more detail about it. Are you using local db? It looks like it is performing some merging operation internally. – Mahak Mittal Sep 17 '18 at 09:06
  • It looks like, it is merging the objects from two different references like either from two different managed object contexts or if you are using some method of saving in two different threads. – Mahak Mittal Sep 17 '18 at 09:40