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 6789475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:36:31+00:00 2026-05-26T17:36:31+00:00

I have a UITableView on one of my view controllers, it is updated with

  • 0

I have a UITableView on one of my view controllers, it is updated with log messages from multiple parts of my app, asynchronously. It worked fine, but today I noticed a weird bug. After about 2 hours, the entire tableview turned blank. there are no cells, no line separators, just the background color.

There are only 2 entry paths into this tableview.

NSMutableArray* tableViewCellData;

//in the init method:
 tableViewCellData = [[NSMutableArray alloc]initWithCapacity:15];

 -(void)setContextActionWithTitle:(NSString *)title description:(NSString *)description

        ContextConsoleLogItem* temp = [[ContextConsoleLogItem alloc] initWithDate:[NSDate date] title:title message:description contextAction:kNoContextAction];
        [tableViewCellData insertObject:temp atIndex:0];  
        [contextActionTableView reloadData];
    }

//pretty standard data source management
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{

    // Return the number of sections.
    return kNumberOfSections;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    // Return the number of rows in the section.
    return [tableViewCellData count];
}

//here's how the cell displays itself.
    #pragma mark -
    #pragma mark Cell customization
    -(void)configureCell:(UITableViewCell*) cell atIndexPath:(NSIndexPath*) indexPath
    {
        ContextConsoleLogItem* logItem = [tableViewCellData objectAtIndex:indexPath.row];

        cell.backgroundColor = [UIColor blackColor];
        cell.textLabel.textColor = [UIColor whiteColor];
        cell.textLabel.font = [UIFont systemFontOfSize:9];
        cell.detailTextLabel.textColor = [UIColor whiteColor];
        cell.textLabel.text = logItem.message;
        cell.textLabel.numberOfLines =3;
    }

What could be causing the tableview to “lose” all of it’s data and stop responding to

-(void)setContextActionWithTitle:(NSString *)title description:(NSString *)description

One thing that I suspect is that the NSMutableArray was allocated with insufficient capacity. It would reach maximum capacity pretty quickly. Some of the messages posted using the method above are coming from calls to performSelectorInBackground . Could it be that one of my background selectors hits the capacity of the NSMutableArray and fails to re-allocate it? But then again, even an empty tableview should still have cells, so I should be able to see line separators.

Should I wrap my calls to setContextActionWithTitle:description: with performSelectorOnMainThread ?

Could it be that 2 separate calls to update the tableview have been made and somehow they left the table in an inconsistent state? (I’m not getting any exceptions here)

This is a very puzzling behavior, and I’d appreciate any help in debugging it!

  • 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-26T17:36:31+00:00Added an answer on May 26, 2026 at 5:36 pm

    Never touch anything in UIKit from a background thread. Ever.

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

Sidebar

Related Questions

I have a UITabbar with multiple view controllers. One of them is a UITableView.
I have an app, where there's one UIWebView and a UITableView. I don't want
I've got the following code in one of my view controllers: - (void)tableView:(UITableView *)tableView
I have two view controllers, one is main and second is detail. Whenever I
I have a ViewBased App. I added a UITableView on one of the UIViewControllers.
In one of my view controllers, i have a lot of different formats for
I have two view controllers. In one of them I have a UITextField within
Let's say I have a simple view controller with one UITableView property: @interface MyViewController
I have UITableView.when i click on it's 1 st row one another UITableView opens
I have UITableView with very large cells with lots of content (more than one

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.