Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6709011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:49:46+00:00 2026-05-26T07:49:46+00:00

I got the below error while fetching some data from sever. While fetching data,

  • 0

I got the below error while fetching some data from sever. While fetching data, i m displaying an custom alert view with activity indicator. Alert is using main thread while data fetching is done by NSThread. This problem occurs only at some time, not always. I m not able to understand what to do.

* Terminating app due to uncaught exception ‘NSGenericException’, reason: ‘* Collection was mutated while being enumerated.(
“”,
“”,
“”
)’

* Call stack at first throw:
(

0   CoreFoundation                      0x00f2abe9 __exceptionPreprocess + 185
1   libobjc.A.dylib                     0x0107f5c2 objc_exception_throw + 47
2   CoreFoundation                      0x00f2a6a9 __NSFastEnumerationMutationHandler + 377
3   UIKit                               0x00371b8e -[UIView(Hierarchy) _findFirstSubviewWantingToBecomeFirstResponder] + 189
4   UIKit                               0x00366a13 -[UIView(Hierarchy) _promoteDescendantToFirstResponderIfNecessary] + 42
5   MyApplnName                        0x00015154 -[SecondViewController getDataFromServer] + 1798
6   Foundation                          0x000a1d4c -[NSThread main] + 81
7   Foundation                          0x000a1cd8 __NSThread__main__ + 1387
8   libSystem.B.dylib                   0x928db7fd _pthread_start + 345
9   libSystem.B.dylib                   0x928db682 thread_start + 34

)

terminate called after throwing an instance of ‘NSException’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:49:47+00:00Added an answer on May 26, 2026 at 7:49 am

    The problem is in part of your code where you enumerate some object, for example, NSMutableArray or NSMutableSet, using for-loop (for (id _obj in object)) and in that loop removing or adding some objects to the same object. It is not possible and causes exception.

    You can replace that for-loop with for-loop using index variable:

     for (int i=0; i<[object count]; i++)
     {
        //add or remove objects if you want
     } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got below code from http://msdn.microsoft.com/en-us/library/dd584174(office.11).aspx for adding custom property in webpart tool pane.
I am starting an activity from one by passing some data in the intent.
I got this error while trying to compile the below code. I would like
I first got an error usign the code below, explaining that DataGridLinkButton' must be
I got a very similar error to the one below: How can I fix
I've got the code below, and I'm trying to set the from field to
When I perform SELECT * FROM table I got results like below: 1 item1
I've got the code below to pull hex values from a database and create
While testing the below SQL code for another stackoverflow answer , I got the
Hello Everybody! I got the following error, while trying to test a code for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.