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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:37:55+00:00 2026-06-04T10:37:55+00:00

I am trying to initialize two NSArrays with the following code self.fillingTypes = [[NSArray

  • 0

I am trying to initialize two NSArrays with the following code

self.fillingTypes = [[NSArray alloc] initWithObjects:@"Ham",@"Turkey",@"Peanut Butter", @"Tuna Salad",@"Roast Beef",@"Vegemite", nil];

self.breadTypes = [[NSArray alloc] initWithObjects:@"White",@"Whole Wheat", @"Rye", "@Sourdough", @"Seven Grain", nil];`

The fillingTypes array works but the breadTypes array crashes sending a EXC_BAD_ACCESS error. When I step through it the breadTypes array says “Variable is not a CFArray”. Why would one array work and the other fail?

  • 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-04T10:37:56+00:00Added an answer on June 4, 2026 at 10:37 am

    Problem is you “@Sourdough” in there instead of @”Sourdough” which like the comments say generates a warning and will crash the program..the line should read

    self.breadTypes = [[NSArray alloc] initWithObjects:@"White",@"Whole Wheat", @"Rye", @"Sourdough", @"Seven Grain", nil];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to initialize NSDictionary but it gives me following error: Program received
How do I initialize a 2D array in Perl? I am trying the following
I'm trying out Code First. I've two seperate contexts using the same database. My
I'm trying to do two things from the code below: If the geocode is
I have following two Entities that I am trying to relate (one to one)
I am trying to initialize my controls in Silverlight. I am looking for something
I'm trying to initialize string with iterators and something like this works: ifstream fin(tmp.txt);
I am trying to initialize directX, but for some reason it can't create d3d
I'm trying to initialize a dictionary with string elements as keys and int[] elements
I'm a beginner at Objective-C and am trying to initialize an NSMutableArray with objects

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.