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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:52:57+00:00 2026-06-09T13:52:57+00:00

Hello! I try to extract the values from an array ( prepTime ), but

  • 0

Hello!

I try to extract the values from an array (prepTime), but it don’t show them. When I compile the program I get an error:

0xec80b0:  cmpl   (%eax), %ecx        Thread 1: EXC_BAD_ACCESS (code=1, address=0xff31e10)

Here I created the array:

{
    NSArray *tableData;
    NSArray *thumbnails;
    NSArray *prepTime;    //Here I created the array
}

Here I filled it with values:

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Initialize table data
    tableData = [NSArray arrayWithObjects:@"Egg Benedict", ... @"Angry Birds Cake", @"Ham and Cheese Panini", nil];

    // Initialize thumbnails
    thumbnails = [NSArray arrayWithObjects:@"egg_benedict.jpg", ... @"angry_birds_cake.jpg", @"ham_and_cheese_panini.jpg", nil];

    //Initialize prep time
    prepTime=[NSArray arrayWithObjects: @"90 min", "60 min", "45 min", ... "10 min", "60 min", "40 min",   nil];
}

As you can see there are three arrays in my code were defined and filled with values, but only ‘prepTime‘ array don’t show it values in my table cell and give an error when compile it instead.

Why it happens?

Thanks a lot!

  • 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-06-09T13:52:58+00:00Added an answer on June 9, 2026 at 1:52 pm

    It looks like you have missed a few @ signs in some of your string literals:

    prepTime=[NSArray arrayWithObjects: @"90 min", "60 min", "45 min", ... "10 min", "60 min", "40 min",   nil];
    //                                             ^Here     ^Here         ^Here     ^Here     ^Here
    

    Trying to access the resultant C strings as NSString causes bad access.

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

Sidebar

Related Questions

hello everyone i am try to extract value from the field of a JSF
Hello I try to connect F# and MySQL database, but i got fallowing error
Hello guys i try to get an object global/persistent over more than one php
hello guys i am try to eliminate all the duplicate strings from a string
hello guys i am try to use the StringUtils.remove Method but the below exception
Hello I am getting these LNK errors when I try to compile my MySQL
hello i try to use simple application in android but i have many problems
Hello I need to get N numbers from range between 2 big numbers, without
Hello I try to write a HTTP Request in C# (Post), but I need
Hello I getting not visible IFrame in IE I try print it, but IE

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.