Welcome
Login
Sign up
Home
Solutions
Forums
How can we help you today?
Enter your search term here...
Search
Login
or
Signup
to submit a new ticket
Check ticket status
Start a new topic
Discussions
Kinvey Forums
iOS
Offline saving throwing errors
I
Igor
started a topic
over 7 years ago
When my app comes online with a non-empty persistent queue, I get the following error :
'Collection was mutated while being enumerated'
Thread view:
```Thread 16, Queue : com.apple.root.background-priority
0 0x3c1f1350 in __pthread_kill ()
1 0x3c167fb6 in pthread_kill ()
2 0x3c1a436a in abort ()
3 0x3b74cdde in abort_message ()
4 0x3b74a098 in default_terminate() ()
5 0x3bcfda5a in _objc_terminate() ()
6 0x3b74a11a in safe_handler_caller(void (*)()) ()
7 0x3b74a1b4 in std::terminate() ()
8 0x3b74b59e in __cxa_throw ()
9 0x3bcfd9a2 in objc_exception_throw ()
10 0x33e72ec0 in __NSFastEnumerationMutationHandler ()
11 0x00225796 in -[KCSSaveQueue encodeWithCoder:] at /Users/mike/work/ios-library/tags/1.17.3/KinveyKit/KinveyKit/Source/KCSSaveQueue.m:278
12 0x346ecdb6 in _encodeObject ()
13 0x346ee286 in -[NSKeyedArchiver _encodeArrayOfObjects:forKey:] ()
14 0x34728180 in -[NSDictionary(NSDictionary) encodeWithCoder:] ()
15 0x346ecdb6 in _encodeObject ()
16 0x00224988 in -[KCSSaveQueues persistQueues] at /Users/mike/work/ios-library/tags/1.17.3/KinveyKit/KinveyKit/Source/KCSSaveQueue.m:139
17 0x3c117792 in _dispatch_call_block_and_release ()
18 0x3c11b656 in _dispatch_root_queue_drain ()
19 0x3c11b7d8 in _dispatch_worker_thread2 ()
20 0x3c13f7f0 in _pthread_wqthread ()
21 0x3c13f684 in start_wqthread ()```
variable view:
```self KCSSaveQueues * 0x1cd9fa60 0x1cd9fa60
NSObject NSObject
_queues __NSDictionaryM * 3 key/value pairs 0x1d880f20
[0] (null) @"events_list" : (no summary)
key __NSCFString * @"cards_list" 0x1d882d20
value KCSSaveQueue * 0x1d882500 0x1d882500
[1] (null) @"" : (no summary)
key __NSCFString * @"" 0x1d882d40
value KCSSaveQueue * 0x1d8827b0 0x1d8827b0
[2] (null) @"" : (no summary)
key __NSCFString * @"" 0x1d882d70
value KCSSaveQueue * 0x1d882bd0 0x1d882bd0```
Any pointers?
2 Comments
Oldest First
Popular
Newest First
Sorted by
Oldest First
C
Caroline
said
over 7 years ago
Hi Igor,
This seems like it may be a threading issue. What is the use case?
I
Igor
said
over 7 years ago
Caroline,
my app saves some records while offline, I can see them in KCSSaveQueue. When I go online, queue processing starts and then the above.
Login
or
Signup
to post a comment
More topics in
iOS
Why do I get "Undefined symbols" errors when building with KinveyKit?
How do I register push tokens?
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
How can I assign additional properties to users?
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
Authorization Token Invalid or Expired
BOOL and how it is stored in the database.
Custom endpoint not able to form request object
Security through business logic
See all 437 topics
Igor
'Collection was mutated while being enumerated'
Thread view:
```Thread 16, Queue : com.apple.root.background-priority
0 0x3c1f1350 in __pthread_kill ()
1 0x3c167fb6 in pthread_kill ()
2 0x3c1a436a in abort ()
3 0x3b74cdde in abort_message ()
4 0x3b74a098 in default_terminate() ()
5 0x3bcfda5a in _objc_terminate() ()
6 0x3b74a11a in safe_handler_caller(void (*)()) ()
7 0x3b74a1b4 in std::terminate() ()
8 0x3b74b59e in __cxa_throw ()
9 0x3bcfd9a2 in objc_exception_throw ()
10 0x33e72ec0 in __NSFastEnumerationMutationHandler ()
11 0x00225796 in -[KCSSaveQueue encodeWithCoder:] at /Users/mike/work/ios-library/tags/1.17.3/KinveyKit/KinveyKit/Source/KCSSaveQueue.m:278
12 0x346ecdb6 in _encodeObject ()
13 0x346ee286 in -[NSKeyedArchiver _encodeArrayOfObjects:forKey:] ()
14 0x34728180 in -[NSDictionary(NSDictionary) encodeWithCoder:] ()
15 0x346ecdb6 in _encodeObject ()
16 0x00224988 in -[KCSSaveQueues persistQueues] at /Users/mike/work/ios-library/tags/1.17.3/KinveyKit/KinveyKit/Source/KCSSaveQueue.m:139
17 0x3c117792 in _dispatch_call_block_and_release ()
18 0x3c11b656 in _dispatch_root_queue_drain ()
19 0x3c11b7d8 in _dispatch_worker_thread2 ()
20 0x3c13f7f0 in _pthread_wqthread ()
21 0x3c13f684 in start_wqthread ()```
variable view:
```self KCSSaveQueues * 0x1cd9fa60 0x1cd9fa60
NSObject NSObject
_queues __NSDictionaryM * 3 key/value pairs 0x1d880f20
[0] (null) @"events_list" : (no summary)
key __NSCFString * @"cards_list" 0x1d882d20
value KCSSaveQueue * 0x1d882500 0x1d882500
[1] (null) @"" : (no summary)
key __NSCFString * @"" 0x1d882d40
value KCSSaveQueue * 0x1d8827b0 0x1d8827b0
[2] (null) @"" : (no summary)
key __NSCFString * @"" 0x1d882d70
value KCSSaveQueue * 0x1d882bd0 0x1d882bd0```
Any pointers?