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

  • SEARCH
  • Home
  • 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 6077643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:44:39+00:00 2026-05-23T10:44:39+00:00

This is how i declare my NSMutablearray self.otherDealsList = [[NSMutableArray alloc] init]; I’ll get

  • 0

This is how i declare my NSMutablearray

 self.otherDealsList = [[NSMutableArray alloc] init];

I’ll get some values from a webservice and insert it into this array. This mutable array is used to populate my tableview data. But when user clicks a button, I want to get new data from the webservice and insert it back to the mutable array.

During the process of replacing the content of the mutable array, if the user clicks or scrolls the tableview, the app will crash. So to avoid this, I tried to empty the table view first by emptying the mutable array and reload the table. This is my code to make the array empty

if ([self.otherDealsList count] > 0) {

                [self.otherDealsList removeAllObjects];
                [tableView reloadData];
            }

But my app keeps crashing ("Bad access") when it run on 'removeallobjects' line. I’m pretty sure I didn’t release it anywhere.

I also tried to run it using NSZombie thingy. But it won’t crash at all.

  • 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-23T10:44:39+00:00Added an answer on May 23, 2026 at 10:44 am

    I am linking you another SO question very similar to yours. You are most likely releasing some objects in the NSMutableArray before calling removeAllObjects and that is what is causing your problem. Please read more here – NSMutableArray removeAllObjects crash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone run into this before? When I choose to delete a row from
This is how I initialize my NSMutablearray. I copy the content of cityList into
I used some modified code found from another question on this website. I am
I have built a T-SQL query like this: DECLARE @search nvarchar(1000) = 'FORMSOF(INFLECTIONAL,hills) AND
I guess the procedure should be something like this: declare @db varchar(100) declare @user
Let's say I declare this: int [a][b][c]; Does a stand for the level/page, b
Considering this xml document: DECLARE @X XML (DOCUMENT search.SearchParameters) = '<parameters xmlns=http://www.educations.com/Search/Parameters.xsd xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance> <parameter
I have this code: dojo.declare(City, null, { constructor : function(cityid, cityinfo){ } }); dojo.declare(TPolyline,
I've this cursor declaration: DECLARE CursorArticulo CURSOR FOR SELECT HstAt.IdArticulo, SUM(HstAt.Cantidad) As SumaCantidad, HstAt.Precio
Ok, I have a hardcoded string I declare like this name = uPar Catégorie

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.